SyTen
syten::IPEPS Namespace Reference

IPEPS-related functionality and tools. More...

Namespaces

 Lat
 Lattice generators for iPEPS lattices.
 

Classes

struct  AOneOp
 A one-site operator acting on a single defined site. More...
 
struct  ATwoOp
 Two-site gate acting on two defined sites. More...
 
class  FullCTM
 Represents the full CTM surrounding the entire unit cell. More...
 
class  Horz2CTM
 A horizontal two-site environment consisting of six tensors surrounding those on two neighbouring sites. More...
 
struct  Lattice
 An IPEPS lattice. More...
 
struct  OneOp
 A local operator acting on an undefined site. More...
 
struct  ProdOp
 Represents a product of two-site gates acting on different sites, e.g. More...
 
class  State
 Represents an IPEPS state on a square lattice. More...
 
struct  SumOp
 Represents a sum of two-site gates acting on different sites, e.g. More...
 
class  Vert2CTM
 A vertical two-site environment consisting of six tensors surrounding those on two neighbouring sites. More...
 

Typedefs

using Coord = std::array< int, 2 >
 Coordinate type used for square IPEPS lattices. More...
 

Functions

Tensor< 5 > barTensor (Tensor< 5 > const &in)
 Given \( M \), builds \( \overline{M} \) which has complex-conjugated entries and the correct ii/oo nodes as well as swap gates inserted. More...
 
Index c2i (Coord coord, int const width, int const depth)
 Given a coordinate, a unit cell width, and a unit cell depth, calculates the linear offset of the (potentially re-mapped) site in the unit cell. More...
 
SRDef cond_number (Tensor< 2 > const &inp)
 Returns the condition number of a rank-2 tensor by calculating the ratio of its largest and smallest-larger-than-SYTEN_SMALL_THRESHOLD singular value. More...
 
SRDef cond_number (Tensor< 4 > const &inp)
 Calculates the condition number of a rank-4 tensor suitable for use in IPEPS::gauge_fix. More...
 
Index dist (Coord const &a, Coord const &b)
 Returns the Manhattan distance between sites a and b. More...
 
ATwoOp dot (AOneOp const &a, AOneOp const &b)
 Dot product of two AOneOp. More...
 
ATwoOp dot (ATwoOp const &a, ATwoOp const &b)
 Calculates the dot product of two two-site gates. More...
 
ProdOp exp (SDef const tau, SumOp const &op, Lattice const &lat, Index const order=1)
 Compute exp{τ·O} term-wise (first-order Trotter). More...
 
SDef expectation (State const &psi, ATwoOp const &op, Truncation const &trunc=Truncation())
 Calculates a single expectation value of the supplied two-site operator with respect to the state psi. More...
 
SDef expectation (State const &psi, SumOp const &op, Truncation const &trunc=Truncation())
 For each two-site operator in op, calculates the expectation value and returns their sum. More...
 
std::tuple< Tensor< 4 >, Tensor< 2 >, Tensor< 2 >, Tensor< 2 >, Tensor< 2 > > gauge_fix (Tensor< 4 > const &inp, bool use_svd)
 Returns a tuple <N_fixed, L, L^-1, R, R^-1> More...
 
State genRandomCompleteState (Lattice const &lat, Basis const &sector, Index max_blocksize)
 Attempts to generate an IPEPS compatible with the lattice, transforming as the desired sector per unit cell and with the lattice vacuum basis on inter-unit cell sites. More...
 
State genRandomCompleteState (Lattice const &lat, Basis const &sector, std::vector< Basis > const &backwards_bases, std::vector< Basis > const &right_bases, Index max_blocksize=Maximum())
 Attempts to generate an IPEPS compatible with the lattice and the specified bases. More...
 
Tensor< 5 > genRandomTensor (Basis const &phys, Basis const &left, Basis const &forw, Basis const &right, Basis const &back)
 Generates a random rank-5 tensor with the specified bases on every site. More...
 
State genRandomTreeLike (Lattice const &lat, Basis const &sector)
 Builds a IPEPS initial state much like a tree with only the lowest horizontal rungs not having vacuum quantum numbers. More...
 
void grow_bottom_rung (Vec< Cached< Tensor< 3 > > > &br, Vec< Basis > &brb, Tensor< 2 > &blc, Tensor< 2 > &brc, State const &psi, int const d, Tensor< 3 > const &lnr, Tensor< 3 > const &rnr, Basis const &lnrb, Basis const &rnrb, Truncation const &trunc)
 Grows the supplied bottom rung br and corner tensors blc and brc by rung d of the state psi. More...
 
void grow_left_rung (Vec< Cached< Tensor< 3 > > > &lr, Vec< Basis > &lrb, Tensor< 2 > &tlc, Tensor< 2 > &blc, State const &psi, int const w, Tensor< 3 > const &tnr, Tensor< 3 > const &bnr, Basis const &tnrb, Basis const &bnrb, Truncation const &trunc)
 Grows the supplied left rung lr and corner tensors tlc and blc by rung w of the state psi. More...
 
void grow_right_rung (Vec< Cached< Tensor< 3 > > > &rr, Vec< Basis > &rrb, Tensor< 2 > &trc, Tensor< 2 > &brc, State const &psi, int const w, Tensor< 3 > const &tnr, Tensor< 3 > const &bnr, Basis const &tnrb, Basis const &bnrb, Truncation const &trunc)
 Grows the supplied right rung rr and corner tensors trc and brc by rung w of the state psi. More...
 
void grow_top_rung (Vec< Cached< Tensor< 3 > > > &tr, Vec< Basis > &trb, Tensor< 2 > &tlc, Tensor< 2 > &trc, State const &psi, int const d, Tensor< 3 > const &lnr, Tensor< 3 > const &rnr, Basis const &lnrb, Basis const &rnrb, Truncation const &trunc)
 Grows the supplied top rung tr and corner tensors tlc and trc by rung d of the state psi. More...
 
SRDef horizontal_simple_update (State &psi, ATwoOp const &op, Truncation trunc)
 Applies the horizontal two-site operator op onto the state psi. More...
 
Tensor< 4 > horz2_norm (Horz2CTM const &env, State const &psi, Tensor< 4 > &lq, Tensor< 3 > &a, Tensor< 4 > &rq, Tensor< 3 > &b, bool gauge_fix, bool use_svd)
 Calculates a rank-4 norm tensor from a horizontal two-site environment and the supplied left- and right QR'ed auxiliary tensors. More...
 
bool is_internal (Coord const &left, Coord const &right, int const width, int const depth)
 Returns true if an operator acting on sites [left,right] on a unit cell of size [width,depth] is internal to that unit cell. More...
 
bool isLeft (Coord const &f, Coord const &s)
 Returns true if site f is to the left of site s. More...
 
AOneOp ldot (AOneOp const &a, AOneOp const &b)
 Locally takes the dot product of two applied single-site operators. More...
 
AOneOp lmult (AOneOp const &a, AOneOp const &b)
 Locally multiplies two applied single-site operators into a new single-site operator. More...
 
ATwoOp mult (AOneOp const &a, AOneOp const &b)
 Multiplies two applied one-operators such that this is applied first. More...
 
ATwoOp mult (ATwoOp const &a, ATwoOp const &b)
 Multiplies two applied two-site operators such that a is applied first and b is applied second. More...
 
ATwoOp operator* (ATwoOp a, SDef const c)
 Evaluates the scalar-ATwoOp product and returns the scaled ATwoOp. More...
 
SumOp operator* (SDef c, SumOp a)
 Returns a copy of the operator a scaled by a scalar factor c. More...
 
ATwoOp operator* (SDef const c, ATwoOp a)
 Evaluates the scalar-ATwoOp product and returns the scaled ATwoOp. More...
 
SumOp operator* (SumOp a, SDef c)
 Returns a copy of the operator a scaled by a scalar factor c. More...
 
SumOp operator+ (ATwoOp other, SumOp a)
 Adds the applied two-site operator other to a. More...
 
SumOp operator+ (SumOp a, ATwoOp other)
 Adds the applied two-site operator other to a. More...
 
SumOp operator+ (SumOp a, SumOp b)
 Adds two sum operators together. More...
 
std::ostreamoperator<< (std::ostream &out, AOneOp const &op)
 Pretty-prints an applied one-site operator. More...
 
std::ostreamoperator<< (std::ostream &out, ATwoOp const &op)
 Pretty-prints a two-site operator to the specified stream. More...
 
std::ostreamoperator<< (std::ostream &out, Lattice const &lat)
 Pretty-prints a lattice. More...
 
std::ostreamoperator<< (std::ostream &out, ProdOp const &op)
 Pretty-printing of a ProdOp. More...
 
std::ostreamoperator<< (std::ostream &out, SumOp const &op)
 Pretty-printing of a SumOp. More...
 
SRDef simple_update (State &psi, ProdOp const &op, Truncation const &trunc)
 Sequentially applies all two-site operators to the state. More...
 
Tensor< 2 > sldlmap (Basis const &first, Basis const &second)
 Given two bases a and b which are compatible and correspond to a single-layer leg, this tensor constructs a map between the two fused double-layer bases constructed from the single-layer bases. More...
 
Tensor< 4 > vert2_norm (Vert2CTM const &env, State const &psi, Tensor< 4 > &fq, Tensor< 3 > &a, Tensor< 4 > &bq, Tensor< 3 > &b, bool gauge_fix, bool use_svd)
 Calculates a rank-4 norm tensor from a vertical two-site environment and the supplied left- and right QR'ed auxiliary tensors. More...
 
Tensor< 4 > vert2r_norm (Vert2CTM const &env, State const &psi, Tensor< 5 > &fq, Tensor< 3 > &a, Tensor< 4 > &bq, Tensor< 3 > &b, bool gauge_fix, bool use_svd)
 Calculates the same rank-4 norm tensor as vert2_norm but for a link which straddles the remover. More...
 
SRDef vertical_simple_update (State &psi, ATwoOp const &op, Truncation trunc)
 Applies the vertical two-site operator op onto the state psi. More...
 
SRDef vertical_simple_update_remover (State &psi, ATwoOp const &op, Truncation trunc)
 Applies the vertical two-site operator with right-hand focus site [0,0] (straddling the remover) onto the state. More...
 
IPEPS directional QRs to move physical indices.

All these operations result in an auxiliary rank-4 tensor and a rank-3 tensor sitting on the directional link. Tensor directions for the auxiliary tensor are l,f,r,b, the physical tensor has direction away,phys,to_tensor for left- and front-variants and to_tensor,phys,away for backwards and right-variants. For all versions, there is also an inv_* version which reconstructs the original IPEPS tensor.

std::tuple< Tensor< 4 >, Tensor< 3 > > qr_to_right (Tensor< 5 > in)
 Moves the physical leg onto the RHS bond. More...
 
Tensor< 5 > inv_qr_to_right (Tensor< 4 > const &lq, Tensor< 3 > const &a)
 Recovers the original tensor from the result of qr_to_right(). More...
 
std::tuple< Tensor< 4 >, Tensor< 3 > > qr_to_left (Tensor< 5 > in)
 Moves the physical leg onto the LHS bond. More...
 
Tensor< 5 > inv_qr_to_left (Tensor< 4 > const &rq, Tensor< 3 > const &b)
 Recovers the original tensor from the result of qr_to_left(). More...
 
std::tuple< Tensor< 4 >, Tensor< 3 > > qr_to_front (Tensor< 5 > in)
 Moves the physical leg onto the forward bond. More...
 
Tensor< 5 > inv_qr_to_front (Tensor< 4 > const &bq, Tensor< 3 > const &b)
 Recovers the original tensor from the result of qr_to_front(). More...
 
std::tuple< Tensor< 4 >, Tensor< 3 > > qr_to_back (Tensor< 5 > in)
 Moves the physical leg onto the backward bond. More...
 
Tensor< 5 > inv_qr_to_back (Tensor< 4 > const &fq, Tensor< 3 > const &a)
 Recovers the original tensor from the result of qr_to_back(). More...
 
std::tuple< Tensor< 5 >, Tensor< 3 > > qr_to_back_r (Tensor< 5 > in, Tensor< 3 > rem)
 Given an IPEPS state tensor at position [0,-1] and the remover tensor between sites [0,-1] and [0,0], folds the remover into the auxiliary state tensor and returns a rank-3 tensor living on the edge between the remover and [0,0] tensor with the physical leg from the [0,-1] tensor. More...
 
std::tuple< Tensor< 5 >, Tensor< 3 > > inv_qr_to_back_r (Tensor< 5 > aux, Tensor< 3 > a, Truncation const &trunc)
 Reconstructs the lower state tensor at position [0,-1] and the remover on the backward link from the auxiliary tensor containing the remover physical index and the physical bond tensor constructed in qr_to_back_r. More...
 

Detailed Description

IPEPS-related functionality and tools.