API Overview

This page is the authoritative inventory for the public names exported by tensor0.__all__ and tensor0.structure.__all__. Tests check both inventories against these lists.

Root API

Sector Families

  • Trivial
  • U1Irrep
  • SU2Irrep
  • Z2Irrep
  • Z3Irrep
  • Z4Irrep
  • FermionParity
  • FermionNumber
  • FermionParityU1Irrep
  • U1SU2Irrep
  • FermionParitySU2Irrep
  • FermionParityU1SU2Irrep

Spaces and Public Values

  • ComplexSpace
  • space
  • hom
  • Vect
  • ElementarySpace
  • ProductSpace
  • HomSpace
  • SectorType
  • FusionTree
  • SectorDict
  • dim
  • reduced_dim
  • storage_dim
  • sector_spec
  • fuse
  • unit_space
  • zero_space
  • infimum
  • supremum
  • direct_sum
  • is_isomorphic
  • is_monomorphic
  • is_epimorphic

Tensor Storage and Construction

  • TensorMap
  • DiagonalTensorMap
  • SectorVector
  • VectorStorage
  • zeros
  • ones
  • zero_like
  • from_blocks
  • identity
  • isomorphism
  • unitary
  • isometry
  • random_isometry
  • random_normal
  • diag
  • diagm
  • is_diagonal
  • scalar
  • to_dense
  • from_dense

Tensor Operations and Comparison

  • add
  • scale
  • dot
  • inner
  • norm
  • normalize
  • tr
  • adjoint
  • real
  • imag
  • complex
  • equal
  • allclose
  • tensor_product
  • inverse
  • pseudoinverse
  • left_solve
  • right_solve
  • is_isometric
  • is_unitary
  • is_positive_definite

Transforms

  • permute
  • braid
  • transpose
  • repartition
  • flip
  • twist
  • insertleftunit
  • insertrightunit
  • removeunit

Contractions

  • idx
  • tensorcontract
  • tensortrace
  • contract
  • ncon

Automatic Differentiation

  • grad
  • value_and_grad

Factorizations and Truncation

  • qr_compact
  • lq_compact
  • left_orth
  • right_orth
  • eigh_vals
  • eigh_full
  • eigh_trunc
  • is_hermitian
  • svd_vals
  • svd_compact
  • svd_full
  • svd_trunc
  • rank
  • cond
  • notrunc
  • truncrank
  • trunctol
  • truncspace
  • truncerror

Use Vect(dim) for the default no-symmetry space, Vect[Sector](...) for an explicit sector family, and ComplexSpace(dim) as the supported compatibility spelling for Vect(dim).

See the usage guide for construction, comparison, transforms, and factorization examples. See the contraction guide for axes, labels, output partitions, order, and scalar-result conventions.

Structure API

These names are public from tensor0.structure. The layout records and accessors are intentionally not re-exported from the package root.

  • ComplexSpace
  • BlockStructure
  • DegeneracyStructure
  • SectorDict
  • SectorStructure
  • SectorType
  • SubblockStructure
  • Vect
  • dim
  • direct_sum
  • fuse
  • get_blockstructure
  • get_degeneracystructure
  • get_sectorstructure
  • hom
  • infimum
  • is_epimorphic
  • is_isomorphic
  • is_monomorphic
  • reduced_dim
  • sector_spec
  • space
  • storage_dim
  • supremum
  • unit_space
  • zero_space

For code written against the earlier alpha surface, replace imports such as from tensor0 import get_degeneracystructure with from tensor0.structure import get_degeneracystructure. This is an immediate pre-v1 cleanup; no deprecated root aliases are retained.