Skip to content

Commit

Permalink
[ITensors] Don't export ITensorMPS (#1432)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman authored May 12, 2024
1 parent 7f9803a commit 9f2b26e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 13 deletions.
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

2 comments on commit 9f2b26e

@mtfishman
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/106648

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.2 -m "<description of version>" 9f2b26e0ec4aa9a21c3ad7d657da77162c9361f9
git push origin v0.6.2

Please sign in to comment.