Environments
Reference for MPSKit's environment machinery — the caches that store the partially contracted tensor networks reused throughout the algorithms. For an explanation of what environments are and why they exist see the concept page on Environments; this page only lists the API. The full, canonical docstrings for the whole package live in the Library index.
Constructing environments
MPSKit.environments Function
environments(below, operator, above, [alg]; kwargs...)
environments(below, above)Construct the environments for the operator sandwiched between the states below (bra) and above (ket). The keyword arguments or alg struct can be used to control the settings needed for computing the environments.
The two-argument form environments(below, above) (with two states) constructs the overlap environments, i.e. the operator-free environments between the bra below and the ket above.
Note
The operator form requires an explicit above; there is no two-argument environments(below, operator) shorthand. Because a two-argument call is the overlap form, the second argument cannot be disambiguated between a ket (overlap) and an operator — this is genuinely undecidable for density matrices, where states and operators share a representation.
Querying environments
MPSKit.leftenv Function
leftenv(envs, site, state)Return the left environment stored in envs at site for the given state: the contraction of everything to the left of site in the network the environments were built for. The result is gauge-compatible with the tensor of state at site and can be contracted onto it directly.
See also rightenv and environments.
MPSKit.rightenv Function
rightenv(envs, site, state)Return the right environment stored in envs at site for the given state: the contraction of everything to the right of site in the network the environments were built for. The result is gauge-compatible with the tensor of state at site and can be contracted onto it directly.
See also leftenv and environments.
Environment types
The concrete environment types below are returned by environments and are managed automatically by the algorithms. They are implementation details — you normally obtain them from environments rather than constructing them directly — and are not part of the public API.
MPSKit.AbstractMPSEnvironments Type
abstract type AbstractEnvironments endAbstract supertype for all environment types.
sourceMPSKit.FiniteEnvironments Type
struct FiniteEnvironments <: AbstractMPSEnvironmentsEnvironment manager for FiniteMPS and WindowMPS. This structure is responsible for automatically checking if the queried environment is still correctly cached and if not recalculates.
MPSKit.InfiniteEnvironments Type
InfiniteEnvironments <: AbstractMPSEnvironmentsEnvironments for an infinite MPS-MPO-MPS combination. These solve the corresponding fixedpoint equations:
where T_LL and T_RR are the (regularized) transfer matrix operators on a give site for AL-O-AL and AR-O-AR respectively.
MPSKit.InfiniteQPEnvironments Type
InfiniteQPEnvironments <: AbstractMPSEnvironmentsEnvironments for an infinite QP-MPO-QP combination. These solve the corresponding fixedpoint equations:
where T_BL, T_BR, T_RL and T_LR are the (regularized) transfer matrix operators on a given site for B-O-AL, B-O-AR, AR-O-AL and AL-O-AR respectively.