Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ITensors] Don't export ITensorMPS #1432

Merged
merged 3 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensors"
uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5"
authors = ["Matthew Fishman <mfishman@flatironinstitute.org>", "Miles Stoudenmire <mstoudenmire@flatironinstitute.org>"]
version = "0.6.1"
version = "0.6.2"

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

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

[extensions]
# ITensorsChainRulesCoreExt = "ChainRulesCore"
ITensorsHDF5Ext = "HDF5"
ITensorsObserversExt = "Observers"
ITensorsPackageCompilerExt = "PackageCompiler"
Expand All @@ -65,7 +62,6 @@ PackageExtensionCompat = "1"
Pkg = "1.6"
Printf = "1.6"
Random = "1.6"
Reexport = "1"
Requires = "1.1"
SerializedElementArrays = "0.1"
SimpleTraits = "0.9.4"
Expand Down
15 changes: 12 additions & 3 deletions src/ITensors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,18 @@ include("lib/ITensorsOpsExt/src/ITensorsOpsExt.jl")
include("fermions/fermions.jl")
export fparity, isfermionic
include("lib/ITensorMPS/src/ITensorMPS.jl")
# TODO: `using .ITensorMPS: ITensorMPS, ...` and
# explicit export list.
@reexport using .ITensorMPS
using .ITensorMPS: ITensorMPS
# Reexport everything exported by `ITensors.ITensorMPS`
# except for `ITensorMPS` itself. Ideally we would use
# `Reexport.jl` but that is not supported right now:
# https://github.com/simonster/Reexport.jl/issues/27
# https://github.com/simonster/Reexport.jl/issues/39
for name in names(ITensorMPS)
if name ≠ :ITensorMPS
@eval using .ITensorMPS: $name
@eval export $name
end
end
include("lib/ITensorsNamedDimsArraysExt/src/ITensorsNamedDimsArraysExt.jl")
using .ITensorsNamedDimsArraysExt: ITensorsNamedDimsArraysExt
include("../ext/ITensorsChainRulesCoreExt/ITensorsChainRulesCoreExt.jl")
Expand Down
1 change: 0 additions & 1 deletion src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# global_variables.jl
@deprecate disable_tblis!() ITensors.disable_tblis()
@deprecate disable_warn_order!() ITensors.disable_warn_order()
Expand Down
1 change: 0 additions & 1 deletion src/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ export
diagitensor,
diagITensor,
directsum,
dot,
eachnzblock,
firstind,
filterinds,
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ITensorMPS/src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# mps/abstractmps.jl
@deprecate orthoCenter(args...; kwargs...) orthocenter(args...; kwargs...)
@deprecate store(m::AbstractMPS) data(m)
@deprecate store(m::AbstractMPS) data(m) false
@deprecate replacesites!(args...; kwargs...) ITensors.replace_siteinds!(args...; kwargs...)
@deprecate applyMPO(args...; kwargs...) contract(args...; kwargs...)
@deprecate applympo(args...; kwargs...) contract(args...; kwargs...)
Expand Down
2 changes: 2 additions & 0 deletions src/lib/ITensorMPS/src/exports.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using LinearAlgebra: ⋅
export
# dmrg.jl
dmrg,
Expand Down Expand Up @@ -51,6 +52,7 @@ export
MPS,
# Methods
⋅,
dot,
correlation_matrix,
expect,
inner,
Expand Down
1 change: 1 addition & 0 deletions src/lib/ITensorMPS/src/mpo.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Adapt: adapt
using LinearAlgebra: dot
using Random: Random
using ..SiteTypes: SiteTypes, siteind, siteinds

Expand Down
1 change: 1 addition & 0 deletions src/lib/ITensorMPS/test/base/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
ITensors = "9136182c-28ba-11e9-034c-db9fb085ebd5"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
NDTensors = "23ae76d9-e61a-49c4-8f12-3f1a16adf9cf"
Suppressor = "fd094767-a336-5f1f-9728-57cf17d0bbfb"
1 change: 0 additions & 1 deletion src/usings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ using NDTensors.RankFactorization: Spectrum, eigs, entropy, truncerror
using Pkg
using Printf
using Random
using Reexport
using SerializedElementArrays
using StaticArrays
using TimerOutputs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const ITENSORS_EXPORTED_NAMES = [
:DMRGMeasurement,
:DMRGObserver,
:ITensor,
:ITensorMPS,
:ITensors,
:Index,
:IndexSet,
Expand Down
Loading