Uni20
Asynchronous tensor and runtime library.
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions
uni20::models Namespace Reference

Classes

struct  SpinHalfU1Site
 U(1)-symmetric spin-half local space and its two state charges. More...
 

Typedefs

template<RealOrComplex Scalar>
using SpinHalfU1Mpo = tensor_network::FiniteMpo< Scalar, LocalSpace, LocalSpace, PackedSparseBlockStorage<> >
 Packed finite MPO type produced by the spin-half model builders.
 
template<RealOrComplex Scalar, BlockTensorStorage Storage = PackedSparseBlockStorage<>>
using SpinHalfU1Mps = tensor_network::FiniteMps< Scalar, BlockSpace, LocalSpace, Storage >
 Finite MPS type produced by the spin-half model builders.
 

Enumerations

enum class  SpinHalfState { up , down }
 Physical state selected at the first site of a spin-half product pattern. More...
 

Functions

template<RealOrComplex Scalar = double, BlockTensorStorage Storage = PackedSparseBlockStorage<>>
requires ImmediateLocalBlockStorageFor<Storage, Scalar, 3, 2>
auto make_neel_product_mps (std::size_t length, SpinHalfU1Site const &local, SpinHalfState first=SpinHalfState::up) -> SpinHalfU1Mps< Scalar, Storage >
 Construct a normalized alternating spin-half product MPS.
 
template<RealOrComplex Scalar = double>
auto make_spin_half_heisenberg_mpo (std::size_t length, SpinHalfU1Site const &local, make_real_t< Scalar > exchange=make_real_t< Scalar >{1}, make_real_t< Scalar > longitudinal_field=make_real_t< Scalar >{}) -> SpinHalfU1Mpo< Scalar >
 Construct the open spin-half Heisenberg Hamiltonian as a finite MPO.
 
auto make_spin_half_u1_site (std::string_view charge_name="Sz") -> SpinHalfU1Site
 Construct the standard U(1)-symmetric spin-half local space.
 

Typedef Documentation

◆ SpinHalfU1Mpo

template<RealOrComplex Scalar>
using uni20::models::SpinHalfU1Mpo = typedef tensor_network::FiniteMpo<Scalar, LocalSpace, LocalSpace, PackedSparseBlockStorage<> >

Packed finite MPO type produced by the spin-half model builders.

◆ SpinHalfU1Mps

template<RealOrComplex Scalar, BlockTensorStorage Storage = PackedSparseBlockStorage<>>
using uni20::models::SpinHalfU1Mps = typedef tensor_network::FiniteMps<Scalar, BlockSpace, LocalSpace, Storage>

Finite MPS type produced by the spin-half model builders.

Template Parameters
ScalarReal or complex tensor element type.
StorageBlock storage policy used by every MPS site.

Enumeration Type Documentation

◆ SpinHalfState

enum class uni20::models::SpinHalfState
strong

Physical state selected at the first site of a spin-half product pattern.

Enumerator
up 
down 

Function Documentation

◆ make_neel_product_mps()

template<RealOrComplex Scalar = double, BlockTensorStorage Storage = PackedSparseBlockStorage<>>
requires ImmediateLocalBlockStorageFor<Storage, Scalar, 3, 2>
auto uni20::models::make_neel_product_mps ( std::size_t  length,
SpinHalfU1Site const &  local,
SpinHalfState  first = SpinHalfState::up 
) -> SpinHalfU1Mps<Scalar, Storage>

Construct a normalized alternating spin-half product MPS.

Every bond contains one cumulative-charge sector of dimension one, and every site contains one scalar block with value one. The resulting product state is canonical from either direction.

Template Parameters
ScalarReal or complex MPS element type.
StorageImmediate local block storage policy used by every MPS site.
Parameters
lengthPositive number of sites.
localU(1) spin-half local space.
firstState placed on site zero; later sites alternate.
Returns
Finite MPS in the corresponding total-charge sector.
Exceptions
std::invalid_argumentIf length is zero.

◆ make_spin_half_heisenberg_mpo()

template<RealOrComplex Scalar = double>
auto uni20::models::make_spin_half_heisenberg_mpo ( std::size_t  length,
SpinHalfU1Site const &  local,
make_real_t< Scalar >  exchange = make_real_t<Scalar>{1},
make_real_t< Scalar >  longitudinal_field = make_real_t<Scalar>{} 
) -> SpinHalfU1Mpo<Scalar>

Construct the open spin-half Heisenberg Hamiltonian as a finite MPO.

The Hamiltonian is exchange * sum_i S_i.S_(i+1) + longitudinal_field * sum_i S_i^z. Interior auxiliaries use [start, pending S-, pending S+, pending Sz, finish] with charges [0,-1,+1,0,0]. Both boundary auxiliaries contain only the scalar charge, so boundary index zero is the complete open-chain contraction.

Template Parameters
ScalarReal or complex MPO element type.
Parameters
lengthPositive number of sites.
localU(1) spin-half local space.
exchangeNearest-neighbor exchange coefficient.
longitudinal_fieldOn-site longitudinal field coefficient.
Returns
Packed finite MPO with reduced one-state boundaries.
Exceptions
std::invalid_argumentIf length is zero.

◆ make_spin_half_u1_site()

auto uni20::models::make_spin_half_u1_site ( std::string_view  charge_name = "Sz") -> SpinHalfU1Site
inline

Construct the standard U(1)-symmetric spin-half local space.

Parameters
charge_nameName of the conserved U(1) component, normally "Sz".
Returns
Local state space and charges in up-then-down order.
Exceptions
std::invalid_argumentIf charge_name is empty.