SyTen
syten::IPEPSv2 Namespace Reference

Namespace for the second-generation iPEPS code (iPEPSv2). More...

Classes

struct  A12Op
 iPEPSv2 operator representing a linear combination of an applied one-site operator and an applied two-site operator. More...
 
struct  AOneOp
 iPEPSv2 single-site operator on a specific site. More...
 
struct  ATwoOp
 iPEPSv2 two-site operator on two specific sites. More...
 
struct  CornerTransferMatrix
 iPEPSv2 corner transfer matrix representation. More...
 
struct  FullUpdateReturn
 Helper struct containing the return value of a (fast) full update step. More...
 
struct  Lattice
 iPEPSv2 lattice, storing one-site operators as well as sum and product operators and generating applied operators on-the-fly. More...
 
struct  OneOp
 iPEPSv2 single-site operator not applied to any specific site. More...
 
struct  ProdOp
 iPEPSv2 operator representing a product of one- and two-site operators. More...
 
class  State
 iPEPSv2 State structure. More...
 
struct  SumOp
 iPEPSv2 operator representing a sum of one- and two-site operators. More...
 
struct  UpdateStage
 Configuration for an iPEPSv2 update stage. More...
 

Typedefs

using UpdateConf = Vec< UpdateStage >
 Configuration of an entire calculation, a series of stages. More...
 

Enumerations

enum class  UpdateMode { Simple , Full , Fast }
 Update mode to use during a stage, either simple, full or fast full update. More...
 

Functions

std::tuple< STensor, STensor, SBasisdirectional_qr (STensor const &in, SBasisId const &aux, SBasisId const &phy)
 Decomposes the state tensor in in the direction of the basis aux, moving the physical basis phy into a rank-3 tensor. More...
 
std::tuple< STensor, STensor, SBasisdirectional_svd (STensor const &in, SBasisId const &aux, SBasisId const &phy)
 Like directional_qr, decomposes the state tensor into a rank-3 tensor with auxiliary basis aux and the physical basis phy, but does so using a truncating SVD. More...
 
AOneOp exp (SDef const tau, AOneOp op)
 Returns the exponential \( e^{\tau \hat o} \) for the applied one-site operator op and prefactor tau. More...
 
ATwoOp exp (SDef const tau, ATwoOp op)
 Returns the exponential \( e^{\tau \hat o} \) for the applied two-site operator op and prefactor tau. More...
 
ProdOp exp (SDef const tau, SumOp const &op, Index const order=1)
 Returns a first or second order approximation to \( e^{\tau \hat O} \) for the sum operator op and prefactor tau. More...
 
STensor expectation_value (State const &psi, CornerTransferMatrix const &ctm, A12Op const &op)
 Calculates the expectation value of the state psi with respect to the applied one/two-site operator op using the CTM ctm. More...
 
STensor expectation_value (State const &psi, CornerTransferMatrix const &ctm, AOneOp const &op)
 Calculates the expectation value of the state psi with respect to the applied one-site operator op. More...
 
STensor expectation_value (State const &psi, CornerTransferMatrix const &ctm, ATwoOp const &op)
 Calculates the expectation value of the state psi with respect to the applied two-site operator op using the CTM ctm. More...
 
STensor expectation_value (State const &psi, CornerTransferMatrix const &ctm, ATwoOp const &op1, ATwoOp const &op2)
 Implementation helper: Calculates the expectation value of a state with two applied two-site operators. More...
 
STensor expectation_value (State const &psi, CornerTransferMatrix const &ctm, ProdOp const &op)
 Calculates the expectation value of the state psi with respect to the product operator op using the CTM ctm. More...
 
STensor expectation_value (State const &psi, CornerTransferMatrix const &ctm, SumOp const &op)
 Calculates the expectation value of the state psi with respect to the sum operator op using the CTM ctm. More...
 
SRDef fast_full_update (State &psi, ATwoOp const &op, UpdateStage const &conf, CornerTransferMatrix &ctm)
 Does a fast full update application of a single two-site gate and doing the necessary CTM growth steps afterwards. More...
 
std::tuple< FullUpdateReturn, CornerTransferMatrixfast_full_update (State &psi, ProdOp const &ops, UpdateStage const &conf)
 Does a fast full update step, first calculating the CTM, then doing the updates and finally returning the CTM. More...
 
std::tuple< FullUpdateReturn, CornerTransferMatrixfast_full_update (State &psi, ProdOp const &ops, UpdateStage const &conf, CornerTransferMatrix ctm)
 Does a fast full update step by reusing the supplied CTM, doing the updates and returning the CTM. More...
 
SRDef full_update (State &psi, ATwoOp const &op, UpdateStage const &conf, CornerTransferMatrix const &ctm)
 Does a single full-update application of the two-site operator op onto the state psi using the configuration conf and CTM ctm. More...
 
FullUpdateReturn full_update (State &psi, ProdOp const &ops, UpdateStage const &conf)
 Does a full update step of the state psi (in-place) applying the operator ops according to the configuration conf. More...
 
FullUpdateReturn full_update (State &psi, ProdOp const &ops, UpdateStage const &conf, CornerTransferMatrix ctm)
 Does a full update step of the state psi (in-place) applying the operator ops according to the configuration conf. More...
 
std::tuple< SRDef, SBasisIdfull_update_apply_gate (STensor const &n, ATwoOp const &op, UpdateStage const &conf, STensor &left, STensor &right, SBasis const &lb, SBasis const &rb)
 Internal helper to apply the gate to the reduced site tensors during a full update step. More...
 
SRDef full_update_cond_num (STensor const &in, Pair< SBasisId, SBasisId > upper_basis)
 Internal helper to calculate the condition number of a rank-4 tensor. More...
 
SRDef full_update_cost_function (SDef const &ideal_ideal, STensor const &r_tensor, STensor const &s_tensor, STensor const &als_tensor, SBasisId external_basis, SBasisId central_basis)
 Internal helper calculating the cost of the full update given the squared norm of the ideal state, the norm tensor with two copies of the not-als reduced tensor, the norm tensor with the ideal tensor and one copy of the not-als reduced tensor, the als reduced tensor and the external and central basis of the als reduced tensor. More...
 
void full_update_gauge_fix (STensor &norm_tensor, STensor &l3, STensor &r3, STensor &l4, STensor &r4, SBasis &llb, SBasis &lrb, SBasisId const &ulb, SBasisId const &urb, UpdateStage const &conf)
 Internal helper to gauge fix the norm tensor necessary during the full update. More...
 
SRDef full_update_horizontal (State &psi, ATwoOp const &op, UpdateStage const &conf, CornerTransferMatrix const &ctm)
 A full-update step for a horizontal two-site gate. More...
 
std::tuple< SRDef, STensorfull_update_pseudo_invert_r4 (STensor const &in, Pair< SBasisId, SBasisId > upper_basis, Pair< SBasisId, SBasisId > lower_basis)
 Internal helper to invert a rank-4 tensor. More...
 
void full_update_split_evenly (STensor &left, STensor &right, SBasisId &central_basis)
 Internal helper to evenly split singular values between two reduced tensors. More...
 
SRDef full_update_vertical (State &psi, ATwoOp const &op, UpdateStage const &conf, CornerTransferMatrix const &ctm)
 A full-update step for the vertical two-site gate. More...
 
STensor inv_directional_qr (STensor const &r4, STensor const &r3)
 Inverts the directional_qr operation by multiplying the rank-4 and rank-3 tensors. More...
 
bool is_00_coord (Coord const coord, int width, int depth)
 Returns true if, given a unit cell of width width and depth depth, the coordinate coord corresponds to the 0,0 site. More...
 
STensor make_random_tensor (SBasis const &out_1, SBasis const &out_2, SBasis const &out_3, SBasis const &in_1, SBasis const &in_2)
 Generates a single random iPEPSv2 tensor with the specified bases. More...
 
State make_tree_like (Lattice const &lat)
 Generates a random tree-like IPEPS unit cell. More...
 
std::ostreamoperator<< (std::ostream &, UpdateConf const &)
 Output for the UpdateConf. More...
 
std::ostreamoperator<< (std::ostream &, UpdateMode const &)
 Output for IPEPSv2::UpdateMode. More...
 
std::ostreamoperator<< (std::ostream &, UpdateStage const &)
 Output for an UpdateStage object. More...
 
std::ostreamoperator<< (std::ostream &, Verbose< UpdateConf > const &)
 Verbose output for UpdateConf. More...
 
std::ostreamoperator<< (std::ostream &, Verbose< UpdateStage > const &)
 verbose Output for an UpdateStage object. More...
 
std::ostreamoperator<< (std::ostream &out, CornerTransferMatrix::GrowthMode const &m)
 Output for a CTM growth mode. More...
 
std::ostreamoperator<< (std::ostream &out, FullUpdateReturn const &ret)
 Output for a FullUpdateReturn struct. More...
 
std::ostreamoperator<< (std::ostream &out, Lattice const &lat)
 
std::ostreamoperator<< (std::ostream &out, State const &psi)
 Output for an iPEPSv2 state. More...
 
std::istreamoperator>> (std::istream &, UpdateConf &)
 Input/parsing for the UpdateConf. More...
 
std::istreamoperator>> (std::istream &, UpdateMode &)
 Input/parsing of IPEPSv2::UpdateMode. More...
 
std::istreamoperator>> (std::istream &, UpdateStage &)
 Input/parsing for an UpdateStage object. More...
 
std::istreamoperator>> (std::istream &in, CornerTransferMatrix::GrowthMode &m)
 Input/parsing of a CTM growth mode. More...
 
SRDef simple_update (State &psi, AOneOp const &op, Truncation const &)
 Applies the one-site operator op to the state. More...
 
SRDef simple_update (State &psi, ATwoOp const &op, Truncation const &trunc)
 Applies the two-site operator op to the state using the truncation criterion trunc. More...
 
SRDef simple_update (State &psi, ProdOp const &ops, Truncation const &trunc)
 Applies the series of operators ops to the state using the truncation criterion trunc. More...
 
SRDef simple_update (State &psi, ProdOp const &ops, UpdateStage const &conf)
 Applies the series of operators ops to the state using the truncation criterion stored in the configuration conf. More...
 
Operator output
std::ostreamoperator<< (std::ostream &out, OneOp const &op)
 Outputs an unapplied single-site operator. More...
 
std::ostreamoperator<< (std::ostream &out, AOneOp const &op)
 Outputs a single-site operator applied to a specific site. More...
 
std::ostreamoperator<< (std::ostream &out, ATwoOp const &op)
 Outputs a two-site operator applied to a specific site. More...
 
std::ostreamoperator<< (std::ostream &out, A12Op const &op)
 Outputs a 1-2 operator applied to specific sites. More...
 
std::ostreamoperator<< (std::ostream &out, SumOp const &op)
 Outputs a sum operator. More...
 
std::ostreamoperator<< (std::ostream &out, ProdOp const &op)
 Outputs a product operator. More...
 
Single- and two-site operator addition and multiplication implementations.
AOneOp add (AOneOp a, AOneOp const &b)
 Addition of two one-site operators acting on the same site. More...
 
ATwoOp add (ATwoOp a, ATwoOp const &b)
 Addition of two two-site operators acting on the same sites. More...
 
AOneOp lmult (AOneOp const &a, AOneOp const &b)
 Multiplication of two one-site operators acting on the same site, giving a new one-site operator. More...
 
ATwoOp mult (AOneOp const &a, AOneOp const &b)
 Multiplication of two one-site operators acting on different sites forming a new two-site operator. More...
 
ATwoOp mult (ATwoOp const &a, ATwoOp const &b)
 Multiplication of two two-site operators acting on the same sites forming a new two-site operator. More...
 
ATwoOp mult (ATwoOp a, AOneOp const &b)
 Multiplication of one two-site operator and one one-site operator (acting on one of the sites of the former) giving a new two-site operator. More...
 
ATwoOp mult (AOneOp const &a, ATwoOp b)
 Multiplication of one two-site operator and one one-site operator (acting on one of the sites of the former) giving a new two-site operator. More...
 
A12Op make_12op (AOneOp const &a, ATwoOp const &b)
 Multiplication of an applied one-site and an applied two-site operator to yield an A12Op. More...
 
ATwoOp dot (AOneOp const &a, AOneOp const &b)
 Dot product of two one-site operators. More...
 
ATwoOp dot (ATwoOp const &a, ATwoOp const &b)
 Dot product of two two-site operators. More...
 
AOneOp ldot (AOneOp const &a, AOneOp const &b)
 Dot product of two one-site operators acting on the same site. More...
 
iPEPSv2 operator operators
AOneOp operator+ (AOneOp a, AOneOp const &b)
 Evaluates \( \hat a + \hat b \) for a and b acting on the same site. More...
 
AOneOpoperator+= (AOneOp &a, AOneOp const &b)
 Evaluates \( \hat a \gets \hat a + \hat b \) for a and b acting on the same site. More...
 
ATwoOp operator+ (ATwoOp a, ATwoOp const &b)
 Evaluates \( \hat a + \hat b \) for a and b acting on the same sites. More...
 
ATwoOpoperator+= (ATwoOp &a, ATwoOp const &b)
 Evaluates \( \hat a \gets \hat a + \hat b \) for a and b acting on the same sites. More...
 
AOneOp operator- (AOneOp a, AOneOp const &b)
 Evaluates \( \hat a - \hat b \) for a and b acting on the same site. More...
 
AOneOpoperator-= (AOneOp &a, AOneOp const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \) for a and b acting on the same site. More...
 
ATwoOp operator- (ATwoOp a, ATwoOp const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \) for a and b acting on the same sites. More...
 
ATwoOpoperator-= (ATwoOp &a, ATwoOp const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \) for a and b acting on the same sites. More...
 
ATwoOp operator* (AOneOp const &a, AOneOp const &b)
 Evaluates \( \hat b \hat a \) (a applied first) for a and b acting on different sites. More...
 
ATwoOp operator* (ATwoOp const &a, ATwoOp const &b)
 Evaluates \( \hat b \hat a \) (a applied first) for a and b acting on the same sites. More...
 
AOneOp operator* (AOneOp a, SDef c)
 Evaluates \( c \hat a \). More...
 
AOneOp operator* (SDef c, AOneOp a)
 Evaluates \( c \hat a \). More...
 
ATwoOp operator* (ATwoOp a, SDef c)
 Evaluates \( c \hat a \). More...
 
ATwoOp operator* (SDef c, ATwoOp a)
 Evaluates \( c \hat a \). More...
 
A12Op operator* (A12Op a, SDef c)
 Evaluates \( c \hat a \). More...
 
A12Op operator* (SDef c, A12Op a)
 Evaluates \( c \hat a \). More...
 
SumOpoperator+= (SumOp &a, ATwoOp b)
 Evaluates \( \hat a \gets \hat a + \hat b \). More...
 
SumOpoperator+= (SumOp &a, AOneOp b)
 Evaluates \( \hat a \gets \hat a + \hat b \). More...
 
SumOpoperator+= (SumOp &a, A12Op b)
 Evaluates \( \hat a \gets \hat a + \hat b \). More...
 
SumOpoperator+= (SumOp &a, SumOp b)
 Evaluates \( \hat a \gets \hat a + \hat b \). More...
 
SumOpoperator-= (SumOp &a, ATwoOp const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \). More...
 
SumOpoperator-= (SumOp &a, AOneOp const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \). More...
 
SumOpoperator-= (SumOp &a, A12Op const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \). More...
 
SumOpoperator-= (SumOp &a, SumOp const &b)
 Evaluates \( \hat a \gets \hat a - \hat b \). More...
 
SumOpoperator*= (SumOp &a, SDef c)
 Evaluates \( \hat a \gets c \hat a \). More...
 
SumOp operator+ (SumOp a, SumOp b)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator+ (SumOp a, ATwoOp b)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator+ (ATwoOp b, SumOp a)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator+ (SumOp a, AOneOp b)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator+ (AOneOp b, SumOp a)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator+ (SumOp a, A12Op b)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator+ (A12Op b, SumOp a)
 Evaluates \( \hat a + \hat b \). More...
 
SumOp operator- (SumOp a, SumOp const &b)
 Evaluates \( \hat a - \hat b \). More...
 
SumOp operator- (SumOp a, ATwoOp const &b)
 Evaluates \( \hat a - \hat b \). More...
 
SumOp operator- (ATwoOp b, SumOp a)
 Evaluates \( \hat b - \hat a \). More...
 
SumOp operator- (SumOp a, AOneOp const &b)
 Evaluates \( \hat a - \hat b \). More...
 
SumOp operator- (AOneOp b, SumOp a)
 Evaluates \( \hat b - \hat a \). More...
 
SumOp operator- (SumOp a, A12Op const &b)
 Evaluates \( \hat a - \hat b \). More...
 
SumOp operator- (A12Op b, SumOp a)
 Evaluates \( \hat b - \hat a \). More...
 
SumOp operator* (SumOp a, SDef c)
 Evaluates \( c \hat a \). More...
 
SumOp operator* (SDef c, SumOp a)
 Evaluates \( c \hat a \). More...
 

Variables

bool have_shown_ctm_ad_warning = false
 Set to true once we have shown a warning regarding the AD of the CTM. More...
 

Detailed Description

Namespace for the second-generation iPEPS code (iPEPSv2).