diff --git a/Project.toml b/Project.toml index c3f97ec..6ca6918 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "ITensorsITensorBaseCompat" uuid = "06001d2b-06b1-4bfe-9828-8c6ae543e18d" -version = "0.1.0" +version = "0.2.0" authors = ["ITensor developers and contributors"] [workspace] diff --git a/docs/Project.toml b/docs/Project.toml index a242a5d..33f0b37 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -9,4 +9,4 @@ path = ".." [compat] Documenter = "1" ITensorFormatter = "0.2.27" -ITensorsITensorBaseCompat = "0.1" +ITensorsITensorBaseCompat = "0.2" diff --git a/examples/Project.toml b/examples/Project.toml index baceb52..10fa7e4 100644 --- a/examples/Project.toml +++ b/examples/Project.toml @@ -5,4 +5,4 @@ ITensorsITensorBaseCompat = "06001d2b-06b1-4bfe-9828-8c6ae543e18d" path = ".." [compat] -ITensorsITensorBaseCompat = "0.1" +ITensorsITensorBaseCompat = "0.2" diff --git a/src/ITensors.jl b/src/ITensors.jl index e25b668..65fe53e 100644 --- a/src/ITensors.jl +++ b/src/ITensors.jl @@ -1,13 +1,11 @@ # The legacy `ITensors.jl` API implemented over the next-gen `ITensorBase.jl` backend. -# The export list below is the spec for what this compat layer covers. # -# Export vs `public`: used as `using ITensorBase; using ITensorsITensorBaseCompat`, the -# names ITensorBase also exports (`apply`, `prime`, `noprime`, `state`) would ideally be -# declared `public` rather than `export`ed, so they don't shadow ITensorBase's versions -# — a consumer wanting the legacy semantics imports them explicitly. Here every name is -# exported instead: consumers reach for this API through `using -# ITensorsITensorBaseCompat.ITensors`, where there is no collision to avoid, and -# `public` would force Julia >= 1.11 while this package still supports 1.10. +# Names that would shadow a `Base`, `LinearAlgebra`, or `ITensorBase` function (`exp`, the +# `svd`/`qr`/`eigen`/`factorize` factorizations, and `inds`/`prime`/`noprime`/`apply`/`state`) +# are defined below but deliberately not exported, so they don't collide when one of those +# packages is also in scope. Reach them qualified, e.g. `ITensors.svd`, as with `tr`. (They +# would ideally be `public` instead, but that needs Julia >= 1.11 and this package still +# supports 1.10.) Everything else is exported for `using ITensorsITensorBaseCompat.ITensors`. module ITensors # Re-export the names that live in the `NDTensors` submodule — legacy `ITensors` @@ -28,24 +26,22 @@ using .SiteTypes: @OpName_str, @SiteType_str, OpName, SiteType, op, state export # Index access and set algebra - inds, commoninds, commonind, uniqueinds, noncommonind, noncommoninds, unioninds, + commoninds, commonind, uniqueinds, noncommonind, noncommoninds, unioninds, hascommoninds, # Index operations - sim, dag, prime, noprime, replaceind, replaceinds, dim, swapind, + sim, dag, replaceind, replaceinds, dim, swapind, # ITensor construction itensor, random_itensor, scalar, delta, onehot, combiner, combinedind, # Factorizations - qr, svd, eigen, factorize, factorize_svd, + factorize_svd, # Diagonal manipulation map_diag, map_diag!, - # Operator exponential - exp, # Storage / element-type accessors scalartype, datatype, array, data, # Dense / quantum-number no-ops denseblocks, dense, hasqns, - # Contraction, inner product, gate application - contract, inner, apply, + # Contraction and inner product + contract, inner, # Direct sum and misc legacy helpers directsum, disable_warn_order, # Algorithm dispatch tag @@ -53,7 +49,7 @@ export # Tags hastags, # Operator / named-state system - state, op, OpName, SiteType, @OpName_str, @SiteType_str, + op, OpName, SiteType, @OpName_str, @SiteType_str, # Bond truncation (bound to `Base.truncate`) truncate diff --git a/test/Project.toml b/test/Project.toml index b94ab7e..b32ed38 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -10,5 +10,5 @@ path = ".." [compat] Aqua = "0.8.9" ITensorPkgSkeleton = "0.3.42" -ITensorsITensorBaseCompat = "0.1" +ITensorsITensorBaseCompat = "0.2" Test = "1.10"