Skip to content
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ITensorsITensorBaseCompat"
uuid = "06001d2b-06b1-4bfe-9828-8c6ae543e18d"
version = "0.1.0"
version = "0.2.0"
authors = ["ITensor developers <support@itensor.org> and contributors"]

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ path = ".."
[compat]
Documenter = "1"
ITensorFormatter = "0.2.27"
ITensorsITensorBaseCompat = "0.1"
ITensorsITensorBaseCompat = "0.2"
2 changes: 1 addition & 1 deletion examples/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ITensorsITensorBaseCompat = "06001d2b-06b1-4bfe-9828-8c6ae543e18d"
path = ".."

[compat]
ITensorsITensorBaseCompat = "0.1"
ITensorsITensorBaseCompat = "0.2"
28 changes: 12 additions & 16 deletions src/ITensors.jl
Original file line number Diff line number Diff line change
@@ -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`
Expand All @@ -28,32 +26,30 @@ 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
Algorithm, @Algorithm_str,
# 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

Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ path = ".."
[compat]
Aqua = "0.8.9"
ITensorPkgSkeleton = "0.3.42"
ITensorsITensorBaseCompat = "0.1"
ITensorsITensorBaseCompat = "0.2"
Test = "1.10"
Loading