Skip to content

Commit 21abb0a

Browse files
authored
[ITensors] Excise ITensors.ITensorMPS (#1551)
1 parent 239b64e commit 21abb0a

File tree

135 files changed

+112
-17227
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+112
-17227
lines changed

.github/workflows/Downstream.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
package:
1818
- {user: ITensor, repo: ITensorGaussianMPS.jl}
1919
- {user: ITensor, repo: ITensorMPS.jl}
20-
- {user: ITensor, repo: ITensorTDVP.jl}
2120
- {user: ITensor, repo: ITensorUnicodePlots.jl}
2221
- {user: ITensor, repo: ITensorVisualizationBase.jl}
2322

.github/workflows/test_itensormps_ubuntu.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

Project.toml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ITensors"
22
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
33
authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"]
4-
version = "0.6.23"
4+
version = "0.7.0"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -12,11 +12,8 @@ Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4"
1212
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
1313
Functors = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
1414
IsApprox = "28f27b66-4bd8-47e7-9110-e2746eb8bed7"
15-
KrylovKit = "0b1a1467-8014-51b9-945f-bf0ae24f4b77"
1615
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
17-
LinearMaps = "7a12625a-238d-50fd-b39a-03d52299707e"
1816
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
19-
PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"
2017
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2118
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
2219
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
@@ -31,15 +28,11 @@ Zeros = "bd1ec220-6eb4-527a-9b49-e79c3db6233b"
3128

3229
[weakdeps]
3330
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
34-
Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0"
35-
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
3631
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
3732
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
3833

3934
[extensions]
4035
ITensorsHDF5Ext = "HDF5"
41-
ITensorsObserversExt = "Observers"
42-
ITensorsPackageCompilerExt = "PackageCompiler"
4336
ITensorsVectorInterfaceExt = "VectorInterface"
4437
ITensorsZygoteRulesExt = "ZygoteRules"
4538

@@ -53,13 +46,8 @@ DocStringExtensions = "0.9.3"
5346
Functors = "0.2, 0.3, 0.4"
5447
HDF5 = "0.14, 0.15, 0.16, 0.17"
5548
IsApprox = "0.1, 1, 2"
56-
KrylovKit = "0.4.2, 0.5, 0.6, 0.7, 0.8"
5749
LinearAlgebra = "1.6"
58-
LinearMaps = "3"
5950
NDTensors = "0.3.34"
60-
Observers = "0.2"
61-
PackageCompiler = "1, 2"
62-
PackageExtensionCompat = "1"
6351
Pkg = "1.6"
6452
Printf = "1.6"
6553
Random = "1.6"
@@ -78,7 +66,5 @@ julia = "1.10"
7866
[extras]
7967
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
8068
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
81-
Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0"
82-
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
8369
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
8470
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"

docs/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
44
ITensorMPS = "0d1a4710-d33b-49a5-8f18-73bdf49b47e2"
5+
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
56
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
67
Strided = "5e0ebb24-38b0-5f93-81fe-25c709ecae67"
78

docs/settings.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
using Documenter
22
using ITensors
3+
using ITensorMPS
34

5+
# Allows using ITensorMPS.jl docstrings in ITensors.jl documentation:
6+
# https://github.com/JuliaDocs/Documenter.jl/issues/1734
47
DocMeta.setdocmeta!(ITensors, :DocTestSetup, :(using ITensors); recursive=true)
8+
DocMeta.setdocmeta!(ITensorMPS, :DocTestSetup, :(using ITensorMPS); recursive=true)
59

610
sitename = "ITensors.jl"
711

812
settings = Dict(
9-
:modules => [ITensors],
13+
# Allows using ITensorMPS.jl docstrings in ITensors.jl documentation:
14+
# https://github.com/JuliaDocs/Documenter.jl/issues/1734
15+
:modules => [ITensors, ITensorMPS],
1016
:pages => [
1117
"Introduction" => "index.md",
1218
"Getting Started with ITensor" => [

docs/src/MPSandMPO.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -32,125 +32,125 @@ MPO(::Type{<:Number}, ::Vector{<:Index}, ::String)
3232
## Copying behavior
3333

3434
```@docs
35-
copy(::ITensors.AbstractMPS)
36-
deepcopy(::ITensors.AbstractMPS)
35+
copy(::ITensorMPS.AbstractMPS)
36+
deepcopy(::ITensorMPS.AbstractMPS)
3737
```
3838

3939
## Properties
4040

4141
```@docs
42-
eltype(::ITensors.AbstractMPS)
43-
flux(::ITensors.AbstractMPS)
44-
hasqns(::ITensors.AbstractMPS)
45-
length(::ITensors.AbstractMPS)
46-
maxlinkdim(::ITensors.AbstractMPS)
42+
eltype(::ITensorMPS.AbstractMPS)
43+
flux(::ITensorMPS.AbstractMPS)
44+
hasqns(::ITensorMPS.AbstractMPS)
45+
length(::ITensorMPS.AbstractMPS)
46+
maxlinkdim(::ITensorMPS.AbstractMPS)
4747
```
4848

4949
## Obtaining and finding indices
5050

5151
```@docs
52-
siteinds(::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS, ::Int)
53-
siteinds(::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS, ::Int)
52+
siteinds(::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS, ::Int)
53+
siteinds(::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS, ::Int)
5454
findsite
5555
findsites
5656
firstsiteinds
57-
linkind(::ITensors.AbstractMPS,::Int)
57+
linkind(::ITensorMPS.AbstractMPS,::Int)
5858
siteind(::MPS, ::Int)
5959
siteind(::typeof(first), ::MPS, ::Int)
6060
siteinds(::MPS)
6161
siteind(::MPO, ::Int)
6262
siteinds(::MPO)
63-
siteinds(::ITensors.AbstractMPS, ::Int)
63+
siteinds(::ITensorMPS.AbstractMPS, ::Int)
6464
```
6565

6666
## Priming and tagging
6767

6868
```@docs
69-
prime(::ITensors.AbstractMPS)
70-
prime(::typeof(siteinds), ::ITensors.AbstractMPS)
71-
prime(::typeof(linkinds), ::ITensors.AbstractMPS)
72-
prime(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
73-
prime(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
74-
75-
swapprime(::ITensors.AbstractMPS, args...; kwargs...)
76-
77-
setprime(::ITensors.AbstractMPS)
78-
setprime(::typeof(siteinds), ::ITensors.AbstractMPS)
79-
setprime(::typeof(linkinds), ::ITensors.AbstractMPS)
80-
setprime(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
81-
setprime(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
82-
83-
noprime(::ITensors.AbstractMPS)
84-
noprime(::typeof(siteinds), ::ITensors.AbstractMPS)
85-
noprime(::typeof(linkinds), ::ITensors.AbstractMPS)
86-
noprime(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
87-
noprime(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
88-
89-
addtags(::ITensors.AbstractMPS)
90-
addtags(::typeof(siteinds), ::ITensors.AbstractMPS)
91-
addtags(::typeof(linkinds), ::ITensors.AbstractMPS)
92-
addtags(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
93-
addtags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
94-
95-
removetags(::ITensors.AbstractMPS)
96-
removetags(::typeof(siteinds), ::ITensors.AbstractMPS)
97-
removetags(::typeof(linkinds), ::ITensors.AbstractMPS)
98-
removetags(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
99-
removetags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
100-
101-
replacetags(::ITensors.AbstractMPS)
102-
replacetags(::typeof(siteinds), ::ITensors.AbstractMPS)
103-
replacetags(::typeof(linkinds), ::ITensors.AbstractMPS)
104-
replacetags(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
105-
replacetags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
106-
107-
settags(::ITensors.AbstractMPS)
108-
settags(::typeof(siteinds), ::ITensors.AbstractMPS)
109-
settags(::typeof(linkinds), ::ITensors.AbstractMPS)
110-
settags(::typeof(siteinds), ::typeof(commoninds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
111-
settags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensors.AbstractMPS, ::ITensors.AbstractMPS)
69+
prime(::ITensorMPS.AbstractMPS)
70+
prime(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
71+
prime(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
72+
prime(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
73+
prime(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
74+
75+
swapprime(::ITensorMPS.AbstractMPS, args...; kwargs...)
76+
77+
setprime(::ITensorMPS.AbstractMPS)
78+
setprime(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
79+
setprime(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
80+
setprime(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
81+
setprime(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
82+
83+
noprime(::ITensorMPS.AbstractMPS)
84+
noprime(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
85+
noprime(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
86+
noprime(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
87+
noprime(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
88+
89+
addtags(::ITensorMPS.AbstractMPS)
90+
addtags(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
91+
addtags(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
92+
addtags(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
93+
addtags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
94+
95+
removetags(::ITensorMPS.AbstractMPS)
96+
removetags(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
97+
removetags(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
98+
removetags(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
99+
removetags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
100+
101+
replacetags(::ITensorMPS.AbstractMPS)
102+
replacetags(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
103+
replacetags(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
104+
replacetags(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
105+
replacetags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
106+
107+
settags(::ITensorMPS.AbstractMPS)
108+
settags(::typeof(siteinds), ::ITensorMPS.AbstractMPS)
109+
settags(::typeof(linkinds), ::ITensorMPS.AbstractMPS)
110+
settags(::typeof(siteinds), ::typeof(commoninds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
111+
settags(::typeof(siteinds), ::typeof(uniqueinds), ::ITensorMPS.AbstractMPS, ::ITensorMPS.AbstractMPS)
112112
```
113113

114114
## Operations
115115

116116
```@docs
117117
expect(::MPS, ::Any)
118118
correlation_matrix(::MPS, ::AbstractString, ::AbstractString)
119-
dag(::ITensors.AbstractMPS)
120-
dense(::ITensors.AbstractMPS)
121-
movesite(::ITensors.AbstractMPS, ::Pair{Int, Int};orthocenter::Int,kwargs...)
119+
dag(::ITensorMPS.AbstractMPS)
120+
dense(::ITensorMPS.AbstractMPS)
121+
movesite(::ITensorMPS.AbstractMPS, ::Pair{Int, Int};orthocenter::Int,kwargs...)
122122
orthogonalize!
123123
replacebond!(::MPS, ::Int, ::ITensor)
124124
sample(::MPS)
125125
sample!(::MPS)
126126
sample(::MPO)
127-
swapbondsites(::ITensors.AbstractMPS, ::Int; kwargs...)
127+
swapbondsites(::ITensorMPS.AbstractMPS, ::Int; kwargs...)
128128
truncate!
129129
```
130130

131131
## Gate evolution
132132

133133
```@docs
134-
product(::ITensor, ::ITensors.AbstractMPS)
135-
product(::Vector{ITensor}, ::ITensors.AbstractMPS)
134+
product(::ITensor, ::ITensorMPS.AbstractMPS)
135+
product(::Vector{ITensor}, ::ITensorMPS.AbstractMPS)
136136
```
137137

138138
## Algebra Operations
139139

140140
```@docs
141-
inner(::MPST, ::MPST) where {MPST <: ITensors.AbstractMPS}
142-
dot(::MPST, ::MPST) where {MPST <: ITensors.AbstractMPS}
143-
loginner(::MPST, ::MPST) where {MPST <: ITensors.AbstractMPS}
144-
logdot(::MPST, ::MPST) where {MPST <: ITensors.AbstractMPS}
141+
inner(::MPST, ::MPST) where {MPST <: ITensorMPS.AbstractMPS}
142+
dot(::MPST, ::MPST) where {MPST <: ITensorMPS.AbstractMPS}
143+
loginner(::MPST, ::MPST) where {MPST <: ITensorMPS.AbstractMPS}
144+
logdot(::MPST, ::MPST) where {MPST <: ITensorMPS.AbstractMPS}
145145
inner(::MPS, ::MPO, ::MPS)
146146
dot(::MPS, ::MPO, ::MPS)
147147
inner(::MPO, ::MPS, ::MPO, ::MPS)
148148
dot(::MPO, ::MPS, ::MPO, ::MPS)
149-
norm(::ITensors.AbstractMPS)
150-
normalize(::ITensors.AbstractMPS)
151-
normalize!(::ITensors.AbstractMPS)
152-
lognorm(::ITensors.AbstractMPS)
153-
+(::ITensors.AbstractMPS...)
149+
norm(::ITensorMPS.AbstractMPS)
150+
normalize(::ITensorMPS.AbstractMPS)
151+
normalize!(::ITensorMPS.AbstractMPS)
152+
lognorm(::ITensorMPS.AbstractMPS)
153+
+(::ITensorMPS.AbstractMPS...)
154154
contract(::MPO, ::MPS)
155155
apply(::MPO, ::MPS)
156156
contract(::MPO, ::MPO)

docs/src/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Development of ITensor is supported by the Flatiron Institute, a division of the
2929

3030
## News
3131

32+
- October 24, 2024: ITensors.jl v0.7 has been released. This is a major breaking change, since all of the MPS/MPO functionality from this package has been moved to [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl), along with all of the functionality of [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl). If you want to use MPS/MPO types and related functionality, such as `MPS`, `MPO`, `dmrg`, `siteinds`, `OpSum`, `op`, etc. you now must install and load the ITensorMPS.jl package. Additionally, if you are using ITensorTDVP.jl in your code, please change `using ITensorTDVP` to `using ITensorMPS`. ITensorMPS.jl has all of the same functionality as ITensorTDVP.jl, and ITensorTDVP.jl will be deprecated in favor of ITensorMPS.jl. **Note:** If you are using `ITensors.compile`, you must now install and load the ITensorMPS.jl package in order to trigger it to load properly, since it relies on running MPS/MPO functionality as example code for Julia to compile.
33+
3234
- May 9, 2024: A new package [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl) has been released. We plan to move all of the MPS/MPO functionality in [ITensors.jl](https://github.com/ITensor/ITensors.jl) to [ITensorMPS.jl](https://github.com/ITensor/ITensorMPS.jl). For now, ITensorMPS.jl just re-exports the MPS/MPO functionality of ITensors.jl (as well as of [ITensorTDVP.jl](https://github.com/ITensor/ITensorTDVP.jl)), such as `dmrg`, `siteinds`, `MPS`, `MPO`, etc. To prepare for the change over to ITensorMPS.jl, please change `using ITensors` to `using ITensors, ITensorMPS` in any code that makes use of MPS/MPO functionality, and if you are using ITensorTDVP.jl change `using ITensorTDVP` to `using ITensorMPS` in your code.
3335

3436
- May 8, 2024: ITensors.jl v0.6 has been released. This version deletes the experimental "combine-contract" contraction backend, which was enabled by `ITensors.enable_combine_contract()`. This feature enabled performing ITensor contractions by first combining indices and then performing contractions as matrix multiplications, which potentially could lead to speedups for certain contractions involving higher-order QN-conserving tensors. However, the speedups weren't consistent with the current implementation, and this feature will be incorporated into the library in a more systematic way when we release our new non-abelian symmetric tensor backend.
@@ -321,5 +323,5 @@ After sweep 4 energy=-138.940086009318 maxlinkdim=100 maxerr=1.05E-10 time=11.64
321323
After sweep 5 energy=-138.940086058840 maxlinkdim=96 maxerr=1.00E-10 time=12.771
322324
Final energy = -138.94008605883985
323325
```
324-
You can find more examples of running `dmrg` and related algorithms [here](https://github.com/ITensor/ITensors.jl/tree/main/src/lib/ITensorMPS/examples).
326+
You can find more examples of running `dmrg` and related algorithms [here](https://github.com/ITensor/ITensorMPS.jl/tree/main/examples).
325327

ext/ITensorsChainRulesCoreExt/ITensorsChainRulesCoreExt.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ include("indexset.jl")
1515
include("itensor.jl")
1616
include("LazyApply/LazyApply.jl")
1717
include("non_differentiable.jl")
18-
include("itensormps.jl")
1918
include("smallstrings.jl")
2019
end

ext/ITensorsChainRulesCoreExt/itensormps.jl

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)