Skip to content

Commit d0a1cc8

Browse files
authored
Merge pull request #9 from apkille/mps
Fix README examples
2 parents 042fefa + 7df85cc commit d0a1cc8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
This package provides conversions between TensorTrain objects in `TensorCrossInterpolation.jl` and MPS/MPO objects in `ITensors.jl`.
77

88
## Usage
9-
### From TCI2 to TT and ITensors.MPS
9+
### From TCI2 to TT and ITensorMPS.MPS
1010
We first construct a TCI2 object:
1111
```julia
1212
import QuanticsGrids as QG
@@ -30,24 +30,24 @@ One can create a tensor train object from the TCI2 object, and then convert it t
3030
import TensorCrossInterpolation as TCI
3131

3232
# Construct a TensorTrain object from the TensorCI2 object
33-
tt = TCI.TensorTrain(ci.tt)
33+
tt = TCI.TensorTrain(ci.tci)
3434

35-
# Convert the TensorTrain object to an ITensor MPS object
35+
# Convert the TensorTrain object to an ITensorMPS MPS object
3636
using TCIITensorConversion
37-
using ITensors
37+
using ITensorMPS: MPS
3838

39-
M = ITensors.MPS(tt)
39+
M = MPS(tt)
4040
```
4141

4242
### TT to MPO conversion and back
4343

4444
```julia
45-
using ITensors
45+
using ITensorMPS: MPO, dim, siteinds
4646
import TensorCrossInterpolation as TCI
4747
using TCIITensorConversion
4848

4949
tt = TCI.TensorTrain([rand(1, 4, 3, 4), rand(4, 2, 4, 2), rand(2, 5, 1, 7), rand(7, 9, 4, 1)])
50-
mpo = ITensors.MPO(tt)
50+
mpo = MPO(tt)
5151
@assert linkdims(mpo) == [4, 2, 7]
5252
@assert dim.(siteinds(mpo)[1]) == [4, 3]
5353
@assert dim.(siteinds(mpo)[2]) == [2, 4]

0 commit comments

Comments
 (0)