xerus issueshttps://git.hemio.de/xerus/xerus/-/issues2019-04-12T11:18:01+02:00https://git.hemio.de/xerus/xerus/-/issues/215Not truncating properly in TT-SVD2019-04-12T11:18:01+02:00lljbashNot truncating properly in TT-SVDI notice the tSVD in TT-SVD is implemented as
```
1468 // Find rank due to the Epsilon (NOTE the scaling factor can be ignored, as it does not change the ratios).
1469 for(size_t j = 1; j < rank; ++j) {
1470 ...I notice the tSVD in TT-SVD is implemented as
```
1468 // Find rank due to the Epsilon (NOTE the scaling factor can be ignored, as it does not change the ratios).
1469 for(size_t j = 1; j < rank; ++j) {
1470 if (tmpS[j] <= _eps*tmpS[0]) {
1471 rank = j;
1472 break;
1473 }
1474 }
```
which is different from Oseledets's TT paper and will make the desired error tolerance not met. I'm not sure if there will be any side effects if I simply modify the truncation procedure.
The corresponding MATLAB codes in TT-toolbox are as follows.
```
...
pos=1;
ep=eps/sqrt(d-1);
for i=1:d-1
m=n(i)*r(i); c=reshape(c,[m,numel(c)/m]);
[u,s,v]=svd(c,'econ');
s=diag(s); r1=my_chop2(s,ep*norm(s));
u=u(:,1:r1); s=s(1:r1);
r(i+1)=r1;
core(pos:pos+r(i)*n(i)*r(i+1)-1, 1)=u(:);
v=v(:,1:r1);
v=v*diag(s); c=v';
pos=pos+r(i)*n(i)*r(i+1);
end
...
function [r] = my_chop2(sv,eps)
sv0=cumsum(sv(end:-1:1).^2);
ff=find(sv0<eps.^2);
if (isempty(ff) )
r=numel(sv);
else
r=numel(sv)-ff(end);
end
return
end
```
Would you pls fix this problem? Thanks for your time!Version 4.0RoteKekseRoteKeksehttps://git.hemio.de/xerus/xerus/-/issues/262Slice TTTensor2020-04-21T10:19:54+02:00Nando FarchminSlice TTTensorWould be good to get a subtensor, i.e. slice of the tensor (a subtensor from dimensions (l_1,...,l_n) to dimensions (u_1,...,u_n) where 0 <= l_i <= u_i <= tensor_dim_i, see code below.)
```
def slice_tt(tt, lower, upper):
"""
Sl...Would be good to get a subtensor, i.e. slice of the tensor (a subtensor from dimensions (l_1,...,l_n) to dimensions (u_1,...,u_n) where 0 <= l_i <= u_i <= tensor_dim_i, see code below.)
```
def slice_tt(tt, lower, upper):
"""
Slice TTTensor in each component from lower to (not including) upper dimension.
"""
assert len(lower) == len(upper) == len(tt.dimensions)
assert np.all(np.array(lower) < np.array(upper))
assert np.all(np.array(upper) <= np.array(tt.dimensions))
diff = [u-l for l,u in zip(lower,upper)]
# TODO there should be a more elegant way to slice TTTensors!
tmp = xe.TTTensor(tt)
for pos in range(tt.order()):
tmp.move_core(pos)
cmp = np.asarray(tmp.get_component(pos))
cmp[:, :lower[pos], :] = 0
cmp[:, upper[pos]:, :] = 0
tmp.set_component(pos, xe.Tensor.from_buffer(cmp))
tmp.move_core(0)
tt_slice = xe.TTTensor.random(diff, tmp.ranks())
for pos in range(tt.order()):
cmp = np.asarray(tmp.get_component(pos))
cmp = np.array(cmp[:, lower[pos]:upper[pos], :])
tt_slice.set_component(pos, xe.Tensor.from_buffer(cmp))
return tt_slice
```Version 4.1Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/258test pickling of random tensor networks2019-06-16T22:32:46+02:00Philipp Trunschketest pickling of random tensor networkshttps://git.hemio.de/xerus/xerus/-/issues/249load_from_file shoud raise an IOError instead of returning None if the file d...2019-06-13T12:26:28+02:00Philipp Trunschkeload_from_file shoud raise an IOError instead of returning None if the file does not existVersion 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/247test pybind11 bindings2019-06-12T23:08:00+02:00Philipp Trunschketest pybind11 bindings- [x] `xe.Tensor(xe.TTTensor([2]))` raises `ValueError`
- [ ] segfault in `test_pickle.py` with python2-bindings- [x] `xe.Tensor(xe.TTTensor([2]))` raises `ValueError`
- [ ] segfault in `test_pickle.py` with python2-bindingsVersion 4.0Philipp TrunschkePhilipp Trunschkehttps://git.hemio.de/xerus/xerus/-/issues/242Add a CI test using _GLIBCXX_ASSERTIONS2019-04-02T15:39:55+02:00Sebastian WolfAdd a CI test using _GLIBCXX_ASSERTIONSThe config file allows to use the additional assertions of the GLIBC via `-D _GLIBCXX_ASSERTIONS`. There should be a CI test where this is active as it would directly expose e.g. vector out-of-bounds errors.The config file allows to use the additional assertions of the GLIBC via `-D _GLIBCXX_ASSERTIONS`. There should be a CI test where this is active as it would directly expose e.g. vector out-of-bounds errors.Version 4.0Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/216Add convenience functions for modifying the TensorNetwork graph.2019-02-15T11:43:30+01:00Philipp TrunschkeAdd convenience functions for modifying the TensorNetwork graph.There are some operations on `TensorNetworks` that are not as simple as they should be.
As an example I think that a `TensorNetworks` should have the functions
- `TensorNetwork::remove_node(const size_t _nodeId)` : removes the node from ...There are some operations on `TensorNetworks` that are not as simple as they should be.
As an example I think that a `TensorNetworks` should have the functions
- `TensorNetwork::remove_node(const size_t _nodeId)` : removes the node from the TensorNetwork and inserts the newly created external links at the end of `externalLinks` (in the order they had on the node tensor)
- `TensorNetwork::remove_link(const size_t _nodeId1, const size_t _nodeId2)` : removes the link between the given nodes and inserts the newly created external links at the end of `externalLinks`
The first function is useful when computing the gradient of a `TensorNetwork` w.r.t. the given node.
The second one will probably be used mainly as a subroutine of the first one.
Related tasks like `add_node` can be done using Einstein notation. Maybe we can find something similar for these tasks.https://git.hemio.de/xerus/xerus/-/issues/196either remove or improve xals2017-05-27T19:15:02+02:00Fuchsi*either remove or improve xalsat the moment it still needs some improvements to be part of a stable release:
- [ ] configurable number of iterations
- [ ] modifiable end criterion?
- [ ] perfdataat the moment it still needs some improvements to be part of a stable release:
- [ ] configurable number of iterations
- [ ] modifiable end criterion?
- [ ] perfdataVersion 3.0https://git.hemio.de/xerus/xerus/-/issues/194improve speed of Ax=b solve operations for matrices2017-05-09T16:42:09+02:00Fuchsi*improve speed of Ax=b solve operations for matricesperform checks similar to matlab: https://de.mathworks.com/help/matlab/ref/mldivide.html
for dense matrices:
- [X] not square operator -> use QR or SVD
- [ ] implement check & solver for permuted triangular matrices
- [x] not Hermi...perform checks similar to matlab: https://de.mathworks.com/help/matlab/ref/mldivide.html
for dense matrices:
- [X] not square operator -> use QR or SVD
- [ ] implement check & solver for permuted triangular matrices
- [x] not Hermitian -> LU solver
- [x] all positive / all negative diagonal -> try cholesky
- [X] default to LDL solver otherwise
for sparse:
- [ ] check for diagonality -> scale input
- [ ] check bandwidth < threshold -> banded solver
- [ ] implement check & solver for permuted triangular matrices
- [ ] not Hermitian -> LU solver
- [ ] all positive / all negative diagonal -> try cholesky
- [X] default to LDL solver otherwiseVersion Xhttps://git.hemio.de/xerus/xerus/-/issues/189modifications of Tensor Networks in python2019-04-03T18:53:01+02:00Fuchsi*modifications of Tensor Networks in pythonhttps://git.hemio.de/xerus/xerus/-/issues/181redefine member methods as external functions2017-03-28T21:55:56+02:00Fuchsi*redefine member methods as external functions- [x] TN::measure
- [x] TT::dyadic_product
- [x] TT::entrywise_square
- [x] TT::find_largest_entry- [x] TN::measure
- [x] TT::dyadic_product
- [x] TT::entrywise_square
- [x] TT::find_largest_entryVersion 3.0Fuchsi*Fuchsi*https://git.hemio.de/xerus/xerus/-/issues/180measurementset named constructors2017-03-28T21:55:56+02:00Fuchsi*measurementset named constructorsmeasSet::random with callback that defines the measured value
::random with tensor object that is measured to define the measured values vectormeasSet::random with callback that defines the measured value
::random with tensor object that is measured to define the measured values vectorVersion 3.0https://git.hemio.de/xerus/xerus/-/issues/179TT::kronecker and TT::dirac named constructors2017-03-28T21:55:56+02:00Fuchsi*TT::kronecker and TT::dirac named constructorsVersion 3.0https://git.hemio.de/xerus/xerus/-/issues/174create separate library objects2017-03-28T21:55:56+02:00Fuchsi*create separate library objectse.g. libxerus.so, libxerus_misc.so, xerus.so (containing only the python bindings)e.g. libxerus.so, libxerus_misc.so, xerus.so (containing only the python bindings)Version 3.0https://git.hemio.de/xerus/xerus/-/issues/170use boost instead of misc functions where appropriate2017-03-28T21:55:56+02:00Fuchsi*use boost instead of misc functions where appropriatethis might be appropriate for
- [ ] misc::product
- strings:
- [ ] misc::explode by boost::split
- [ ] misc::trim by boost::trimthis might be appropriate for
- [ ] misc::product
- strings:
- [ ] misc::explode by boost::split
- [ ] misc::trim by boost::trimVersion 3.0https://git.hemio.de/xerus/xerus/-/issues/162Use the term 'mode' to refer to the modes of a Tensor.2017-05-29T23:27:28+02:00Sebastian WolfUse the term 'mode' to refer to the modes of a Tensor.This should avoid name collisions and ambiguities when mixing terms like mode, index, dimension, slate...This should avoid name collisions and ambiguities when mixing terms like mode, index, dimension, slate...Version 3.0Fuchsi*Fuchsi*https://git.hemio.de/xerus/xerus/-/issues/152solve operator / for sparse tensors2017-05-29T23:27:28+02:00Fuchsi*solve operator / for sparse tensorsVersion 2.2https://git.hemio.de/xerus/xerus/-/issues/151sparse SVD in TTNetwork(tensor) constructor2017-05-29T23:27:28+02:00Fuchsi*sparse SVD in TTNetwork(tensor) constructorVersion 2.0https://git.hemio.de/xerus/xerus/-/issues/150entrywise_square and entrywise_product for TTTensors with sparse components2017-05-29T23:27:29+02:00Fuchsi*entrywise_square and entrywise_product for TTTensors with sparse componentsVersion 2.2Sebastian WolfSebastian Wolfhttps://git.hemio.de/xerus/xerus/-/issues/147replace allocator should be removed2019-04-03T18:52:55+02:00Fuchsi*replace allocator should be removedVersion 4.0Fuchsi*Fuchsi*