Skip to content

Commit 9f2b26e

Browse files
authored
[ITensors] Don't export ITensorMPS (#1432)
1 parent 7f9803a commit 9f2b26e

File tree

10 files changed

+18
-13
lines changed

10 files changed

+18
-13
lines changed

Project.toml

Lines changed: 1 addition & 5 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.1"
4+
version = "0.6.2"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
@@ -20,7 +20,6 @@ PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"
2020
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
2121
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
2222
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
23-
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
2423
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
2524
SerializedElementArrays = "d3ce8812-9567-47e9-a7b5-65a6d70a3065"
2625
SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
@@ -31,15 +30,13 @@ TupleTools = "9d95972d-f1c8-5527-a6e0-b4b365fa01f6"
3130
Zeros = "bd1ec220-6eb4-527a-9b49-e79c3db6233b"
3231

3332
[weakdeps]
34-
# ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
3533
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
3634
Observers = "338f10d5-c7f1-4033-a7d1-f9dec39bcaa0"
3735
PackageCompiler = "9b87118b-4619-50d2-8e1e-99f35a4d4d9d"
3836
VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8"
3937
ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444"
4038

4139
[extensions]
42-
# ITensorsChainRulesCoreExt = "ChainRulesCore"
4340
ITensorsHDF5Ext = "HDF5"
4441
ITensorsObserversExt = "Observers"
4542
ITensorsPackageCompilerExt = "PackageCompiler"
@@ -65,7 +62,6 @@ PackageExtensionCompat = "1"
6562
Pkg = "1.6"
6663
Printf = "1.6"
6764
Random = "1.6"
68-
Reexport = "1"
6965
Requires = "1.1"
7066
SerializedElementArrays = "0.1"
7167
SimpleTraits = "0.9.4"

src/ITensors.jl

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,18 @@ include("lib/ITensorsOpsExt/src/ITensorsOpsExt.jl")
158158
include("fermions/fermions.jl")
159159
export fparity, isfermionic
160160
include("lib/ITensorMPS/src/ITensorMPS.jl")
161-
# TODO: `using .ITensorMPS: ITensorMPS, ...` and
162-
# explicit export list.
163-
@reexport using .ITensorMPS
161+
using .ITensorMPS: ITensorMPS
162+
# Reexport everything exported by `ITensors.ITensorMPS`
163+
# except for `ITensorMPS` itself. Ideally we would use
164+
# `Reexport.jl` but that is not supported right now:
165+
# https://github.com/simonster/Reexport.jl/issues/27
166+
# https://github.com/simonster/Reexport.jl/issues/39
167+
for name in names(ITensorMPS)
168+
if name :ITensorMPS
169+
@eval using .ITensorMPS: $name
170+
@eval export $name
171+
end
172+
end
164173
include("lib/ITensorsNamedDimsArraysExt/src/ITensorsNamedDimsArraysExt.jl")
165174
using .ITensorsNamedDimsArraysExt: ITensorsNamedDimsArraysExt
166175
include("../ext/ITensorsChainRulesCoreExt/ITensorsChainRulesCoreExt.jl")

src/deprecated.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# global_variables.jl
32
@deprecate disable_tblis!() ITensors.disable_tblis()
43
@deprecate disable_warn_order!() ITensors.disable_warn_order()

src/exports.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export
124124
diagitensor,
125125
diagITensor,
126126
directsum,
127-
dot,
128127
eachnzblock,
129128
firstind,
130129
filterinds,

src/lib/ITensorMPS/src/deprecated.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mps/abstractmps.jl
22
@deprecate orthoCenter(args...; kwargs...) orthocenter(args...; kwargs...)
3-
@deprecate store(m::AbstractMPS) data(m)
3+
@deprecate store(m::AbstractMPS) data(m) false
44
@deprecate replacesites!(args...; kwargs...) ITensors.replace_siteinds!(args...; kwargs...)
55
@deprecate applyMPO(args...; kwargs...) contract(args...; kwargs...)
66
@deprecate applympo(args...; kwargs...) contract(args...; kwargs...)

src/lib/ITensorMPS/src/exports.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using LinearAlgebra:
12
export
23
# dmrg.jl
34
dmrg,
@@ -51,6 +52,7 @@ export
5152
MPS,
5253
# Methods
5354
,
55+
dot,
5456
correlation_matrix,
5557
expect,
5658
inner,

src/lib/ITensorMPS/src/mpo.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Adapt: adapt
2+
using LinearAlgebra: dot
23
using Random: Random
34
using ..SiteTypes: SiteTypes, siteind, siteinds
45

src/lib/ITensorMPS/test/base/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
44
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
55
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
66
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
7+
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"

src/usings.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ using NDTensors.RankFactorization: Spectrum, eigs, entropy, truncerror
1616
using Pkg
1717
using Printf
1818
using Random
19-
using Reexport
2019
using SerializedElementArrays
2120
using StaticArrays
2221
using TimerOutputs

test/base/utils/TestITensorsExportedNames/TestITensorsExportedNames.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const ITENSORS_EXPORTED_NAMES = [
3333
:DMRGMeasurement,
3434
:DMRGObserver,
3535
:ITensor,
36-
:ITensorMPS,
3736
:ITensors,
3837
:Index,
3938
:IndexSet,

0 commit comments

Comments
 (0)