Introduction
In recent decades, tensor networks have emerged as powerful computational [1 , 2 ] and analytical [3 ] tools in the study of quantum and classical many-body systems. Following the success of the density matrix renormalization group (DMRG) [4 , 5 ] for one-dimensional systems, which is now understood as a variational method over the class of matrix product states (MPS) [6 , 7 , 8 ] , the ansatz was later extended to two dimensions with the invention of projected entangled-pair states (PEPS) [9 ] . Both are now successfully used across many areas of physics, from strongly correlated systems and quantum information to high-energy physics, with applications ranging from ground states and finite-temperature simulations to excited states and real-time evolution. Despite this broad applicability, PEPS methods remain significantly less utilized than MPS, owing to their higher computational complexity and challenges in their implementation. Among the most common applications of PEPS is the ground-state optimization of infinite translationally invariant systems [10 , 11 ] , where the state of the art is gradient-based variational optimization [12 , 13 ] .
The accurate computation of the energy gradient remains the main bottleneck in variational PEPS optimization, both in terms of computational cost and conceptual complexity. The energy itself can only be evaluated approximately, using an approximate contraction environment obtained from an iterative procedure such as the Corner Transfer Matrix Renormalization Group (CTMRG) [14 , 15 ] or boundary matrix product state (boundary MPS) methods [16 , 17 , 18 ] . Consequently, when calculating the energy gradient, one needs to differentiate the procedure used to obtain this approximate environment. While early approaches relied on approximate schemes for the exact PEPS gradient [12 , 13 ] , the adoption of automatic differentiation (AD) enabled the computation of exact gradients of approximate PEPS contraction schemes [19 ] , which consequently led to a growing number of applications of these techniques to relevant physical systems [20 , 21 , 22 , 23 , 24 , 25 , 26 ] . However, the direct application of AD tools leads to significant technical challenges that can be grouped into three categories: (i) efficiency, (ii) stability and (iii) ease of implementation.
First, even when using a state-of-the-art fixed-point formulation [19 , 27 , 28 ] that avoids the memory overhead of backpropagating through all individual iterations of the contraction procedure, the presence of iterative subroutines gives rise to a nested iterative procedure for the gradient computation that is computationally very costly. Second, AD-based PEPS optimization routinely suffers from numerical instabilities arising from the differentiation of subroutines used in the contraction algorithm [19 ] . Notably, these instabilities are purely artifacts of the differentiation procedure, whereas the actual energy gradient is entirely stable with respect to variations that cause them. Despite progress in formally addressing these issues in specific cases [29 ] , the lack of a general solution often leads to heuristic workarounds. Finally, the conventional approach to AD-based PEPS optimization requires every primitive operation used in the energy evaluation to be compatible with an AD engine. This means that custom differentiation rules must be defined for every subroutine that is not natively supported – a process that can be laborious and limiting in practice.
In this work, we adopt implicit differentiation techniques [27 , 30 , 31 ] to address these three challenges. Instead of differentiating through each subroutine of the contraction algorithm, we reformulate the contraction result in terms of a single characteristic equation and differentiate only that. This approach (i) reduces the cost and scaling of the gradient computation with problem size, in some cases even reducing it to a subleading step in the overall optimization procedure; (ii) removes numerical instabilities by exploiting the symmetries of the contraction environment to construct stable parameterizations of derivatives; and (iii) greatly simplifies the implementation by completely removing the need for differentiable subroutines, as the characteristic equation is formulated using only tensor network contractions.
In practice, this implicit differentiation approach ultimately reduces to a single core routine: solving a system of linear equations obtained from the automatic differentiation of the algebraic characteristic equations. This core procedure is largely independent of the specific contraction algorithm. Different contraction schemes can be used by simply substituting the appropriate characteristic equations and variable parameterizations. Nevertheless, deriving the specific characteristic equations that can be solved efficiently and converge reliably when using iterative sparse linear solvers is highly non-trivial. Therefore, in this manuscript, we provide explicit forms of characteristic equations for the most commonly used PEPS contraction algorithms.
The structure of this work is as follows. We start in § 2 by formulating the general problem of variational PEPS optimization using AD. After introducing some notation and reviewing the well established fixed-point differentiation approach, we illustrate the core ideas behind our implicit differentiation approach in this general context. We proceed by demonstrating this approach for the specific case of PEPS optimization using CTMRG in systems with a spatial C 4 v C_{4v} C 4 v symmetry in Section III. Based on the insights gained from this example, we illustrate a similar procedure for the two most commonly used general contraction schemes in Sections IV and § 6 . We benchmark the performance of our approach in these different settings in Section VI, before concluding in § 8 .
PEPS optimization and implicit differentiation
Given a quantum system defined on a translationally invariant square lattice with a local physical Hilbert space P P P at each site, we can parametrize a state of this system as a PEPS by introducing a local rank-5 tensor
p : v W v N v S v E (1) p : v_W \; \begin{matrix} v_N \\ v_S \end{matrix} \; v_E \tag*{(1)} p : v W v N v S v E (1)
as a multilinear map between the physical space P P P and four virtual spaces V N , V E , V W , V S V_N,V_E,V_W,V_S V N , V E , V W , V S corresponding to the four cardinal directions. The dimension of the virtual spaces, called the bond dimension D D D , controls the amount of variational degrees of freedom contained in p p p , and by extension, dictates the expressiveness of the ansatz. By tiling this tensor on an infinite square lattice and contracting all virtual indices, we can define a uniform PEPS obtained from p p p as
∣ ψ ( p ) ⟩ = uniform PEPS tensor-network contraction (2) \lvert\psi(p)\rangle= \text{uniform PEPS tensor-network contraction} \tag*{(2)} ∣ ψ ( p )⟩ = uniform PEPS tensor-network contraction (2)
While the arrows indicating the duality of the virtual spaces are important when working with (in particular, fermionic) symmetries, we will omit them from now on to lighten our notation. Similarly, while a general uniform PEPS can be composed of a unit cell of different tensors, we will restrict our notation to the single-site case in the following. All concepts and techniques can be generalized to the case of arbitrary unit cells.
Variational PEPS optimization
Given a Hamiltonian H H H , a primary application of the PEPS ansatz is to find the best approximation of its ground state by minimizing the variational energy
p = argmin p E ( p ) = argmin p ⟨ ψ ( p ) ∣ H ∣ ψ ( p ) ⟩ ⟨ ψ ( p ) ∣ ψ ( p ) ⟩ . (3) p = \underset{p}{\operatorname{argmin}}\,E(p) = \underset{p}{\operatorname{argmin}}\,\frac{\langle\psi(p)|H|\psi(p)\rangle}{\langle\psi(p)|\psi(p)\rangle}. \tag*{(3)} p = p argmin E ( p ) = p argmin ⟨ ψ ( p ) ∣ ψ ( p )⟩ ⟨ ψ ( p ) ∣ H ∣ ψ ( p )⟩ . (3)
For a Hamiltonian H H H defined as a sum of local terms h h h that act on a few neighboring sites, evaluating the energy expectation value requires computing quantities of the form
⟨ ψ ( p ) ∣ h ∣ ψ ( p ) ⟩ = local tensor-network contraction (4) \langle\psi(p)|h|\psi(p)\rangle= \text{local tensor-network contraction} \tag*{(4)} ⟨ ψ ( p ) ∣ h ∣ ψ ( p )⟩ = local tensor-network contraction (4)
To evaluate this expression, we need a reliable way to represent the infinite parts of the norm network ⟨ ψ ( p ) ∣ ψ ( p ) ⟩ \langle\psi(p)|\psi(p)\rangle ⟨ ψ ( p ) ∣ ψ ( p )⟩ in terms of an approximate contraction environment
infinite tensor network ⟶ finite contraction environment (5) \text{infinite tensor network} \longrightarrow\text{finite contraction environment} \tag*{(5)} infinite tensor network ⟶ finite contraction environment (5)
This contraction environment, denoted as x x x and represented by the purple and green tensors in Eq. (5) , implicitly depends on the variational degrees of freedom, x ≡ x ( p ) x \equiv x(p) x ≡ x ( p ) . It provides an approximation of the infinite lattice, whose accuracy is controlled by the environment bond dimension χ \chi χ . The two most common algorithms for obtaining such an environment are the corner transfer matrix renormalization group (CTMRG) [14 , 15 ] and the boundary matrix product state (boundary MPS) [17 , 18 ] algorithms. Both algorithms will be considered in this work.
Armed with an approximate contraction environment x x x , we can reformulate the variational problem for the total energy E E E of Eq. (3) in terms of an approximate energy density e e e , which takes the form
e ( x , p ) = tensor-network contraction (6) e(x,p) = \text{tensor-network contraction} \tag*{(6)} e ( x , p ) = tensor-network contraction (6)
To optimize this approximate energy density, we can compute its gradient with respect to the variational parameters p p p and use a gradient-based optimization scheme such as the quasi-Newton L-BFGS algorithm [32 ] . Using the chain rule, we can write the gradient as a sum of two terms corresponding to the explicit dependence of e e e on x x x and p p p respectively,
d e d p ( p ) = ∂ x e ( x , p ) ∂ p x + ∂ p e ( x , p ) . (7) \frac{\mathrm{d}e}{\mathrm{d}p}(p) = \partial_x e(x,p)\,\partial_p x + \partial_p e(x,p). \tag*{(7)} d p d e ( p ) = ∂ x e ( x , p ) ∂ p x + ∂ p e ( x , p ) . (7)
The key step of a good PEPS algorithm is the practical evaluation of the first term on the right-hand side, which encodes the contribution to the total gradient arising from the dependence of the environment x x x on the variational parameters p p p . In this work, we will perform this key step using implicit differentiation.
Adopting some common notation in the context of AD, an introduction to which can be found in Section A, we can rewrite Eq. (7) in terms of the adjoint variables corresponding to the contraction environment and variational parameters, defined as x ~ = ∂ x e \tilde{x} = \partial_x e x ~ = ∂ x e and p ~ = ∂ p e \tilde{p} = \partial_p e p ~ = ∂ p e respectively [33 ] , which yields
d e d p = x ~ ∂ p x + p ~ . (8) \frac{\mathrm{d}e}{\mathrm{d}p} = \tilde{x}\,\partial_p x + \tilde{p}. \tag*{(8)} d p d e = x ~ ∂ p x + p ~ . (8)
In this form, we see that the key operation in the gradient computation is the left action of the Jacobian ∂ p x \partial_p x ∂ p x on the adjoint x ~ \tilde{x} x ~ , known as a vector-Jacobian product or VJP. This VJP can be evaluated using a straightforward reverse-mode AD approach [19 ] , backpropagating through each primitive operation in the computational graph in reverse order. This approach, however, requires a significant memory overhead and can suffer from instabilities of the primitive subroutines used in the algorithm, such as eigenvalue or singular value decompositions.
The key to reducing this memory overhead is to derive the VJP action of ∂ p x \partial_p x ∂ p x based on an implicit characterization of the contraction environment x x x . We first review the simplest application of this idea, namely fixed-point differentiation [19 , 28 , 29 ] , to introduce the necessary notation and highlight remaining difficulties with this approach. We then proceed to the general formulation of implicit differentiation of a contraction algorithm in terms of set of purely algebraic characteristic equations.
For clarity, we restrict our notation in the main text to the setting of real variables. However, all results extend straightforwardly to the complex case. A more rigorous treatment of real-valued cost functions of complex variables can be found in Section A.
Fixed-point differentiation
A general contraction algorithm corresponds to an iterative procedure where we successively apply an iterating function f f f starting from an initial guess x 0 x_0 x 0 for the environment, until convergence is reached. In fixed-point differentiation [19 , 28 , 29 ] , we characterize the convergence of the contraction environment in terms of the fixed-point equation
x = f ( x , p ) , (9) x = f(x,p), \tag*{(9)} x = f ( x , p ) , (9)
whose solution will be denoted as x ∗ x^* x ∗ . Applying the implicit function theorem to this equation [27 ] by differentiating both sides at this solution yields
∂ p x = ∂ x f ∂ p x + ∂ p f . (10) \partial_p x = \partial_x f\,\partial_p x + \partial_p f. \tag*{(10)} ∂ p x = ∂ x f ∂ p x + ∂ p f . (10)
This allows us to write the VJP action of ∂ p x \partial_p x ∂ p x as
x ~ ∂ p x = x ~ ( 1 − ∂ x f ) − 1 ∂ p f . (11) \tilde{x}\,\partial_p x = \tilde{x}(1-\partial_x f)^{-1}\partial_p f. \tag*{(11)} x ~ ∂ p x = x ~ ( 1 − ∂ x f ) − 1 ∂ p f . (11)
Importantly, the VJP actions of ∂ x f \partial_x f ∂ x f and ∂ p f \partial_p f ∂ p f in this expression are evaluated only at the fixed-point solution ( x ∗ , p ) (x^*,p) ( x ∗ , p ) . This means there is no need to keep track of any intermediate objects, solving the problem of the memory overhead encountered in straightforward reverse-mode AD.
To evaluate Eq. (11) in practice, we can first compute an intermediate object F ~ \tilde{F} F ~ as the solution to the linear problem
F ~ ( ∂ x f − 1 ) = x ~ . (12) \tilde{F}(\partial_x f-\mathbb{1}) = \tilde{x}. \tag*{(12)} F ~ ( ∂ x f − 1 ) = x ~ . (12)
This system can be solved using any standard linear solver such as GMRES or BiCGSTAB. Subsequently, we can plug this into the VJP action of ∂ p f \partial_p f ∂ p f to obtain the desired result as
x ~ ∂ p x = − F ~ ∂ p f . (13) \tilde{x}\,\partial_p x = -\tilde{F}\,\partial_p f. \tag*{(13)} x ~ ∂ p x = − F ~ ∂ p f . (13)
It is important to note that in order to use fixed-point differentiation, it is necessary that the fixed-point equation Eq. (9) is satisfied element-wise . This means that f ( x ∗ , p ) f(x^*,p) f ( x ∗ , p ) produces tensors whose elements are all equal to those of x ∗ x^* x ∗ within the convergence tolerance of the algorithm. However, in practical implementations, Eq. (9) is usually only satisfied up to allowed gauge transformations on the output of f f f . This means that, in order to ensure element-wise convergence, any additional gauge freedom in the action of f f f needs to be fixed explicitly using a suitable method [29 ] .
While fixed-point differentiation resolves the memory overhead issue, it still requires the VJP actions of ∂ x f \partial_x f ∂ x f and ∂ p f \partial_p f ∂ p f . Obtaining these automatically via AD requires the function f f f with all its subroutines to be fully differentiable. In addition, the aforementioned instabilities in these primitive VJP actions can lead to instabilities in the overall gradient computation. The fixed-point gradient linear problem Eq. (12) is particularly susceptible to this.
Aside from these issues, a further motivation for going beyond fixed-point differentiation lies in the internal complexity of the iterating function f f f . In most two-dimensional contraction schemes, f f f is itself composed of iterative subroutines, such as sparse singular value decomposition or eigensolvers. Crucially, evaluating the VJP corresponding to such an iterative subroutine requires solving a linear problem of the same nature as Eq. (12) , and more importantly of a similar size. Therefore, when applied to the specific setting of contraction algorithms with iterative subroutines, the core linear problem in fixed-point differentiation becomes nested . Namely, for every function evaluation in the outer linear problem Eq. (12) , we have to solve an inner linear problem of a similar size.
Extending the idea of implicit differentiation beyond the fixed-point condition of Eq. (9) enables us to solve all of the remaining issues simultaneously.
Implicit differentiation
While characterizing the converged contraction environment x ∗ x^* x ∗ as a fixed point of the iterating function f f f is a natural choice, any implicit characterization could in principle be used. In this framework, the solution to an optimization problem is implicitly defined as a root of an algebraic characteristic equation, which expresses the desired optimality conditions [31 ] .
This more abstract viewpoint allows us to “forget” about how x ∗ x^* x ∗ was computed, and instead just focus on the conditions that characterize it. In particular, if the optimality conditions characterizing x ∗ x^* x ∗ are formulated as a single set of algebraic equations without iterative subroutines, the VJP action of ∂ p x \partial_p x ∂ p x can in turn be evaluated in terms of a single un-nested linear problem. In addition, the flexibility in choosing the characteristic equations allows us to exploit the symmetries of the contraction algorithm. In particular, we can choose a parametrization of the equations specifically such that any instabilities that would arise from subroutines are completely removed from the global gradient computation. Finally, to implement implicit differentiation in practice, we only need to be able to differentiate the characteristic equations themselves. This is much easier than ensuring that the contraction algorithm as a whole is differentiable in a stable way.
Concretely, we will formulate implicit differentiation of a contraction algorithm in terms of a differentiable function F ( y , p ) F(y,p) F ( y , p ) acting on a set of environment variables y y y that implicitly depend on the variational parameters p p p , y = y ( p ) y=y(p) y = y ( p ) . The function F F F is chosen such that the convergence of the environment corresponds to the solution of the characteristic equation
F ( y , p ) = 0. (14) F(y,p)=0. \tag*{(14)} F ( y , p ) = 0. (14)
We will refer to the solution y ∗ y^* y ∗ of this condition as the root of the characteristic equation. Here, we denote the variables representing the environment as y y y rather than x x x , to emphasize that the characteristic equation can use a parametrization that is different from the one used in the iterating function. In particular, this new set of variables y y y may be expanded to include intermediate variables appearing in the iterating function, not only its final output x x x . In practice, in the subsequent examples we will always introduce a simple and explicit map from the custom parametrization to the original environment variables y ↦ x y\mapsto x y ↦ x from which we immediately obtain the corresponding map y ˙ ↦ x ˙ \dot{y}\mapsto\dot{x} y ˙ ↦ x ˙ for the adjoints. In particular, it will always be clear that the root y ∗ y^* y ∗ of Eq. (14) is exactly equivalent to the fixed-point environment x ∗ x^* x ∗ . In this formulation, the gradient computation Eq. (8) reduces to evaluating the VJP y ˙ ∂ p y \dot{y}\,\partial_p y y ˙ ∂ p y , since x ˙ ∂ p x = y ˙ ∂ p y \dot{x}\partial_p x=\dot{y}\partial_p y x ˙ ∂ p x = y ˙ ∂ p y .
Differentiating the characteristic equation Eq. (14) at the root y ∗ y^* y ∗ yields
∂ y F ∂ p y = − ∂ p F . (15) \partial_y F\,\partial_p y=-\partial_p F. \tag*{(15)} ∂ y F ∂ p y = − ∂ p F . (15)
From this, we obtain the VJP action of ∂ p x \partial_p x ∂ p x as
y ˙ ∂ p y = y ˙ ( ∂ y F ) − 1 ( − ∂ p F ) . (16) \dot{y}\,\partial_p y=\dot{y}\,(\partial_y F)^{-1}(-\partial_p F). \tag*{(16)} y ˙ ∂ p y = y ˙ ( ∂ y F ) − 1 ( − ∂ p F ) . (16)
Just as before, we can evaluate Eq. (16) by computing an intermediate object F ~ \tilde{F} F ~ as the solution to the linear problem
F ~ ∂ y F = y ˙ , (17) \tilde{F}\,\partial_y F=\dot{y}, \tag*{(17)} F ~ ∂ y F = y ˙ , (17)
from which we can obtain the desired VJP action as
y ˙ ∂ p y = − F ~ ∂ p F . (18) \dot{y}\,\partial_p y=-\tilde{F}\,\partial_p F. \tag*{(18)} y ˙ ∂ p y = − F ~ ∂ p F . (18)
In particular, this approach reduces to the fixed-point differentiation approach outlined before when we choose y = x y=x y = x and F ( x , p ) = f ( x , p ) − x F(x,p)=f(x,p)-x F ( x , p ) = f ( x , p ) − x .
Algorithmically, the implicit differentiation approach can be summarized as follows. First, the reverse-mode AD engine is called to backpropagate through the energy evaluation as described in Algorithm 1. While in the forward pass we contract the PEPS environment to obtain an energy value, in the reverse pass the contraction function is differentiated to accumulate the energy gradient. Precisely in this reverse pass, in Algorithm 2, we implement the implicit differentiation technique using Eqs. (17) and (18) . We note that an explicit gauge-fixing step may need to be performed such that the optimality conditions F ( y , p ) F(y,p) F ( y , p ) are indeed fulfilled at the fixed point, as will be pointed out in the forthcoming examples.
Table 1.
Table 2.
In the following sections, we will formulate a set of characteristic equations F F F in a suitable parametrization y y y for different contraction algorithms. In this form they can be easily supplied into Algorithm 2, where the AD engine takes care of differentiating the algebraic expressions, and we use the result to solve a single linear problem.
C4v CTMRG contraction
As a first guiding example, we illustrate the use of implicit differentiation for variational PEPS optimization using the CTMRG contraction algorithm in systems with a spatial C 4 v C_{4v} C 4 v symmetry [14 ] . We start with a quick reminder of the C 4 v C_{4v} C 4 v CTMRG algorithm. We then proceed to our main result and provide a set of characteristic equations in a suitable parametrization that can be used to apply implicit differentiation on top of any existing C 4 v C_{4v} C 4 v CTMRG implementation. In the remainder of this section, we will motivate this choice of parametrization and equations and discuss the improvements in performance and stability achieved by implicit differentiation.
Contracting a PEPS using C4v CTMRG
At the level of an individual PEPS tensor, a C 4 v C_{4v} C 4 v point group symmetry manifests itself as invariance under local rotation and Hermitian reflection,
graphical tensor symmetry equation (19) \text{graphical tensor symmetry equation} \tag*{(19)} graphical tensor symmetry equation (19)
where p ˉ \bar{p} p ˉ denotes the complex conjugation of the entries of p p p . To ensure this spatial symmetry is preserved during optimizations, one can simply add an explicit projection of p p p onto the symmetric subspace at the start of the energy computation (line 2 of Algorithm 1).
To simplify our notation, we will use a blocked single-layer tensor for the remainder of this work. In this notation, we express the PEPS norm and expectation value networks in terms of a local effective rank-4 tensor T T T , defined as the contraction of p p p with its complex conjugate,
T = p contracted with p ˉ (20) T = p \text{ contracted with } \bar{p} \tag*{(20)} T = p contracted with p ˉ (20)
The C 4 v C_{4v} C 4 v CTMRG algorithm is a procedure for computing an environment x = ( C , E ) x=(C,E) x = ( C , E ) consisting of a corner tensor C C C and edge tensor E E E that approximates the infinite parts of the norm network as depicted in Eq. (5) . In the single-layer notation of Eq. (20) , the approximate contraction of ⟨ ψ ( p ) ∣ ψ ( p ) ⟩ \langle\psi(p)|\psi(p)\rangle ⟨ ψ ( p ) ∣ ψ ( p )⟩ takes the form
infinite tensor network contracted to C , E , T (21) \text{infinite tensor network contracted to } C,E,T \tag*{(21)} infinite tensor network contracted to C , E , T (21)
This environment can be used to evaluate the variational energy in precisely the same manner as depicted in Eq. (6) .
The contraction algorithm itself is an iterative procedure, where every iteration maps ( C , E ) (C,E) ( C , E ) to a new pair ( C ′ , E ′ ) (C',E') ( C ′ , E ′ ) using an iterating function f f f whose action f ( ( C , E ) , p ) = ( C ′ , E ′ ) f((C,E),p)=(C',E') f (( C , E ) , p ) = ( C ′ , E ′ ) is defined as
CTMRG iteration equations involving C , E , T , U , λ C (22) \text{CTMRG iteration equations involving } C,E,T,U,\lambda_C \tag*{(22)} CTMRG iteration equations involving C , E , T , U , λ C (22)
CTMRG iteration equation involving U † , T , E , U , λ E , E ′ (23) \text{CTMRG iteration equation involving } U^\dagger,T,E,U,\lambda_E,E' \tag*{(23)} CTMRG iteration equation involving U † , T , E , U , λ E , E ′ (23)
Here, the new corner C ′ C' C ′ is obtained through a truncated Hermitian eigenvalue decomposition (eigh) of the enlarged corner matrix on the left hand side of Eq. (22) , and the scalars λ C \lambda_C λ C and λ E \lambda_E λ E correspond to the 2-norm of the left hand sides of Eqs. (22) and (23) respectively.
This procedure eventually produces a fixed-point environment x ∗ = ( C ∗ , E ∗ ) x^* = (C^*, E^*) x ∗ = ( C ∗ , E ∗ ) for which f ( ( C ∗ , E ∗ ) , p ) ≈ ( C ∗ , E ∗ ) f((C^*, E^*),p) \approx(C^*, E^*) f (( C ∗ , E ∗ ) , p ) ≈ ( C ∗ , E ∗ ) is reached up to some desired tolerance. Note that, due to the gauge symmetry of the C 4 v C_{4v} C 4 v contraction environment (which we will discuss in a broader context in Section III C), achieving this kind of element-wise convergence in practice requires a suitable gauge-fixing of the environment tensors [29 ] . After gauge-fixing the environment tensors ( C ∗ , E ∗ ) (C^*, E^*) ( C ∗ , E ∗ ) , we use the same gauge transformation to gauge fix the fixed-point isometry, which we will denote as U ∗ U^* U ∗ .
Implicit differentiation for C4v CTMRG
In this section, we introduce the differentiable function F ( y , p ) F(y,p) F ( y , p ) for which the root y ∗ y^* y ∗ of the characteristic equation F ( y , p ) = 0 F(y,p)=0 F ( y , p ) = 0 gives an implicit characterization of the fixed-point solution ( C ∗ , E ∗ , U ∗ ) (C^*, E^*, U^*) ( C ∗ , E ∗ , U ∗ ) of the C 4 v C_{4v} C 4 v CTMRG algorithm. Before doing so, we clarify the notation, in particular the input variables y y y and the parametrization used to obtain a divergence free gradient.
As the set of differentiable variables, we choose y = ( C , E , u ) y=(C,E,u) y = ( C , E , u ) . All other tensors that do not involve these variables are kept constant and are not differentiated. From now on, we depict these constant tensors in gray. The variables C C C and E E E directly represent the corner and edge tensors. This choice is straightforward since the energy density depends explicitly on both tensors. The variable u u u , on the other hand, corresponds to an intermediate variable in line 5 of Algorithm 2, and arises from the parametrization of the isometry U U U . While the energy density only depends on the intermediate variable U U U implicitly through Eqs. (22) and (23) , we choose to include it as an explicit variable here. Moreover, the fact that the energy density is not affected by any rotations within the relevant subspace, as shown in [29 ] and discussed further in Section III C, allows us to use a suitable parametrization of the isometry.
In particular, we choose to parametrize U U U such that it only has variations along its null space projection U ⊥ U_{\perp} U ⊥ , defined as
U ⊥ † U ∗ = 0. (24) U_{\perp}^{\dagger}U^* = 0. \tag*{(24)} U ⊥ † U ∗ = 0. (24)
From this null space, we define a differentiable “projector” U U U as
U = U ∗ + U ⊥ u . (25) U = U^* + U_{\perp}u. \tag*{(25)} U = U ∗ + U ⊥ u . (25)
In this parametrization, the tensors U ∗ U^* U ∗ and U ⊥ U_{\perp} U ⊥ are treated as constants, meaning U U U is only differentiable through its dependence on u u u . Importantly, as we show in Section III C, the choice of Eq. (25) provides a proper divergence-free parametrization of the gradient of the isometry U U U .
Using this custom set of variables along with the definition Eq. (25) , we can formulate a single set of characteristic equations F ( ( C , E , u ) , p ) = 0 F((C,E,u),p)=0 F (( C , E , u ) , p ) = 0 that encodes the convergence criterion for C C C and E E E , as well as the defining relations of the eigh decomposition in Eq. (22) . These equations take the form
tensor-network contraction − λ C C = 0 , (26) \text{tensor-network contraction} - \lambda_C C = 0, \tag*{(26)} tensor-network contraction − λ C C = 0 , (26)
tensor-network contraction − λ E E = 0 , (27) \text{tensor-network contraction} - \lambda_E E = 0, \tag*{(27)} tensor-network contraction − λ E E = 0 , (27)
tensor-network contraction − λ C u = 0. (28) \text{tensor-network contraction} - \lambda_C u = 0. \tag*{(28)} tensor-network contraction − λ C u = 0. (28)
Here, we assume that C C C and E E E have unit normalization such that Eqs. (26) and (27) hold with scalar factors λ C \lambda_C λ C and λ E \lambda_E λ E , which are defined as the inner product of the first term in Eq. (26) and Eq. (27) with C C C and E E E respectively. Therefore, λ C \lambda_C λ C and λ E \lambda_E λ E are treated as differentiable variables, which depend on y y y .
The root y ∗ y^* y ∗ of these characteristic equations exactly characterizes the C 4 v C_{4v} C 4 v CTMRG fixed point. Indeed, we clearly see that y ∗ = ( C ∗ , E ∗ , 0 ) y^*=(C^*,E^*,0) y ∗ = ( C ∗ , E ∗ , 0 ) , where the fixed-point value u ∗ = 0 u^*=0 u ∗ = 0 enforces the expected root value U ∗ U^* U ∗ of the projector U U U defined in Eq. (25) .
Given this form of the characteristic equations F F F , we can directly apply the implicit differentiation approach of Eqs. (15) to (18) . Aside from the VJP action ∂ y F \partial_yF ∂ y F evaluated at the root y ∗ y^* y ∗ , we also require the corresponding adjoint y ˙ = ( C ˙ , E ˙ , u ˙ ) \dot{y}=(\dot{C},\dot{E},\dot{u}) y ˙ = ( C ˙ , E ˙ , u ˙ ) , as it appears on the right hand side of Eq. (17) and in line 6 of Algorithm 2. The adjoints x ˙ = ( C ˙ , E ˙ ) \dot{x}=(\dot{C},\dot{E}) x ˙ = ( C ˙ , E ˙ ) can be obtained automatically by backpropagating through the energy evaluation Eq. (6) , after which we can extract y ˙ = x ˙ ∂ y x = ( x ˙ , 0 ) \dot{y}=\dot{x}\partial_yx=(\dot{x},0) y ˙ = x ˙ ∂ y x = ( x ˙ , 0 ) . This means that we simply set u ˙ = 0 \dot{u}=0 u ˙ = 0 , since the isometry U U U is never used in the energy evaluation.
As the characteristic equation expressed by Eqs. (26) to (28) consists of a collection of tensor contractions, we can clearly see that the VJP action ∂ y F \partial_yF ∂ y F also corresponds to a set of simple tensor contractions. This means that implicit differentiation not only improves efficiency over conventional fixed-point differentiation, as we will argue below, but also that making F F F differentiable is much easier in practice than making a truncated eigh decomposition differentiable in a stable manner.
As a final comment, we note some technical details that are important in implementing this form of implicit differentiation in practice. First, to obtain the correct adjoint C ˇ \check{C} C ˇ to use in Eq. (17) , we need to treat C C C as a generic complex Hermitian matrix when backpropagating through the energy evaluation Eq. (6) . This is necessary to allow its variations to be non-diagonal and complex, as is required to be consistent with the parametrization Eq. (25) . This naturally follows from the discussion below. Importantly, this is only necessary in the reverse pass. The forward contraction routine of Eqs. (22) to (27) remains unchanged, and the fixed-point value C ∗ C^* C ∗ is always real and diagonal. Second, we have multiplied Eq. (28) by the inverse of the fixed-point corner tensor C ∗ − 1 C^{*-1} C ∗− 1 , which serves as a constant preconditioner to improve the conditioning of the associated linear problem Eq. (17) . Equivalently, one can write these equations without C ∗ − 1 C^{*-1} C ∗− 1 and instead supply its action as a right preconditioner to a linear solver.
Motivating the characteristic equations
To understand the origin of the characteristic equations Eqs. (26) to (28) and illustrate the benefits of the corresponding implicit differentiation, we now take a step back and analyze the fixed-point differentiation of C 4 v C_{4v} C 4 v CTMRG. We first pinpoint the issues this approach suffers from, and then explain how the implicit differentiation as presented above naturally resolves them.
Consider the fixed-point differentiation approach of Eqs. (11) to (13) as applied to the iterating function defined in Eqs. (22) and (23) . At increasing PEPS and environment bond dimensions, computing the truncated eigh decomposition in Eq. (22) from a full diagonalization quickly becomes infeasible, and one needs to resort to sparse iterative eigensolvers which build up the truncated subspace directly. Without access to the full un-truncated decomposition, evaluating the VJP action corresponding to a truncated eigh requires solving a linear Sylvester equation [29 ] . This leads to a nested linear problem in Eq. (12) , where every evaluation of the VJP action of ∂ x f \partial_x f ∂ x f requires solving an inner linear Sylvester equation of a similar size. This lies at the heart of the efficiency bottleneck.
In addition, evaluating the VJP action of a truncated eigh decomposition is inherently unstable when there are (nearly) degenerate eigenvalues. Indeed, the stability of eigenvectors is related to the gaps in the spectrum, and they can exhibit non-analytic behavior in the case of degeneracies. However, the energy evaluation in Eq. (6) is insensitive to rotations within subspaces of degenerate eigenvalues of Eq. (22) , or even with respect to general rotations in the kept subspace more generally. It is easy to see that conjugating C C C and E E E by an arbitrary unitary Q Q Q , giving gauge-transformed corners and edges ( C ′ , E ′ ) (C', E') ( C ′ , E ′ ) , leaves all physical expectation values invariant,
conjugation of C , E by Q gives C ′ , E ′ (29) \text{conjugation of } C,E \text{ by } Q \text{ gives } C',E' \tag*{(29)} conjugation of C , E by Q gives C ′ , E ′ (29)
This reparameterization corresponds to U ′ = U Q U'=UQ U ′ = U Q , which is precisely a rotation of the basis in the kept subspace. This rotation acts as a gauge freedom in the C 4 v C_{4v} C 4 v CTMRG algorithm, that is not visible to the eigh subroutine in isolation. This gauge freedom implies that only the kept subspace is physically relevant, rather than a particular basis in which C C C is diagonal. The eigh subroutine is one convenient way of selecting the subspace associated with the dominant eigenvalues, but the particular basis of eigenvectors it selects within this subspace is irrelevant for the outer CTMRG algorithm.
We can resolve both the efficiency and stability issues through implicit differentiation. By augmenting the usual system of fixed-point equations with equations that characterize the truncated subspace, parametrized in terms of a suitable set of variables y = ( C , E , u ) y=(C,E,u) y = ( C , E , u ) as detailed in Section III B, we completely bypass the need to differentiate unstable subroutines such as eigh. As the resulting characteristic equations F ( y , p ) = 0 F(y,p)=0 F ( y , p ) = 0 are purely algebraic, we can compute the gradient from the un-nested linear problem Eq. (17) , where evaluating the VJP action ∂ y F \partial_y F ∂ y F corresponds to a set of simple and efficient tensor contractions.
To identify how this approach mitigates the instabilities mentioned above, we consider a general variation of the isometry U U U around its fixed point value U ∗ U^* U ∗ ,
U ˙ = U ∗ ω ˙ + U ⊥ u ˙ . (30) \dot{U}=U^*\dot{\omega}+U_{\perp}\dot{u}. \tag*{(30)} U ˙ = U ∗ ω ˙ + U ⊥ u ˙ . (30)
The contribution along U ∗ U^* U ∗ satisfies the additional skew-hermiticity constraint ω ˙ = − ω ˙ † \dot{\omega}=-\dot{\omega}^{\dagger} ω ˙ = − ω ˙ † , while the contribution u ˙ \dot{u} u ˙ along the left null space U ⊥ U_{\perp} U ⊥ carries no further constraints. It is well known that, when backpropagating through a truncated eigh, computing the adjoint associated with ω ˙ \dot{\omega} ω ˙ requires dividing by differences of eigenvalues, which diverge in the case of degeneracies [29 , 34 ] . However, the skew-hermitian variations ω ˙ \dot{\omega} ω ˙ exactly parameterize infinitesimal in-space rotations that can be compensated by the unitary gauge freedom Q Q Q , and can therefore be completely omitted. The only variations of U U U that lead to variations in the energy are those parameterized by u ˙ \dot{u} u ˙ , associated with actual changes in the truncated subspace. We stress that, in practice, there is no need to actually introduce a non-trivial Q Q Q matrix at any stage of the C 4 v C_{4v} C 4 v CTMRG algorithm. Furthermore, the corner matrix C C C as it appears in Eq. (22) always remains real and diagonal within the actual contraction routine. The role of Q Q Q is solely to exploit the gauge freedom in the gradient computation to enforce a stable parametrization of the variations. We can therefore restrict U ˙ \dot{U} U ˙ to the form
U ˙ = U ⊥ u ˙ (31) \dot{U}=U_{\perp}\dot{u} \tag*{(31)} U ˙ = U ⊥ u ˙ (31)
as long as we allow the variations of the corner tensor C ˙ \dot{C} C ˙ to be non-diagonal and complex, but still Hermitian. The difference between Eq. (31) and Eq. (30) is well known in the context of parameterizing the tangent space of the Grassmann versus the Stiefel manifold. The adjoint associated with u ˙ \dot{u} u ˙ will be determined by the spectral gap between the smallest kept eigenvalue and the largest truncated eigenvalue, and will be stable as long as we do not truncate through nearly degenerate eigenvalues.
To impose the parametrization Eq. (31) of the variations U ˙ \dot{U} U ˙ in practice, we use a custom parametrization of the characteristic equations where we simply define a variable U U U in terms of a single differentiable variable u u u as in Eq. (25) . This u u u vanishes at zeroth order, but its infinitesimal variations parameterize the variations of U ˙ \dot{U} U ˙ . This also explains the earlier statement that the corner tensor should be treated as a generic complex Hermitian matrix when backpropagating through the energy evaluation.
Finally, we motivate our choice to treat the eigenvalues λ C \lambda_C λ C and λ E \lambda_E λ E occurring in Eqs. (26) and (27) as differentiable quantities defined in terms of the variables y y y , rather than directly including them as independent variables in their own right. Instead of assuming that C C C and E E E have unit normalization and then defining λ C \lambda_C λ C and λ E \lambda_E λ E as the inner product of the first term in Eqs. (26) and (27) with C C C and E E E respectively, we could alternatively say that with these definitions of λ C \lambda_C λ C and λ E \lambda_E λ E , Eqs. (26) and (27) actually impose the unit normalization of C C C and E E E . In practice, this strategy of making λ C \lambda_C λ C and λ E \lambda_E λ E depend on y y y eliminates zero eigenvalues in the Jacobian ∂ p F \partial_p F ∂ p F of these characteristic equations used in computing the VJP of the contraction routine. This effect is explained in more detail for the simpler case of an eigenvalue problem in Section B. A similar approach of treating eigenvalues as differentiable quantities defined in terms of tensor variables will be used in formulating characteristic equations for other contraction algorithms below.
All these considerations eventually lead to the exact form of the characteristic equations given in Eqs. (26) to (28) . Note that, if we differentiate the characteristic equations Eqs. (26) to (28) at the root y ∗ = ( C ∗ , E ∗ , 0 ) y^*=(C^*,E^*,0) y ∗ = ( C ∗ , E ∗ , 0 ) , at first order we exactly recover the derivative of the deformed CTMRG procedure introduced in Ref. [29 ] , indicating that this form of F F F indeed removes all divergences associated with degenerate eigenvalues.
Implicit differentiation for different C 4 v C_{4v} C 4 v contraction algorithms
To close this section, we briefly comment on how the implicit differentiation approach outlined above can be directly applied to different C 4 v C_{4v} C 4 v symmetric contraction algorithms beyond CTMRG. The symmetry conditions Eq. (19) ensure that the row-to-row transfer matrix corresponding to the PEPS norm network on the left-hand side of Eq. (5) is a Hermitian operator. In this case, it is known that the contraction itself can be formulated as a variational problem, and that different methods for reaching this variational optimum give rise to equivalent contraction environments [35 ] . In particular, under these conditions, different contraction environments can be explicitly mapped to each other. This means that, given a contraction environment obtained from any contraction algorithm compatible with C 4 v C_{4v} C 4 v symmetry [17 , 36 , 37 , 38 ] , we can always map this environment to a set of parameters y = ( C , E , u ) y=(C,E,u) y = ( C , E , u ) that satisfy the characteristic equations Eqs. (26) to (28) . Importantly, this implies that we can actually use the same implicit differentiation approach outlined above regardless of the specific contraction algorithm used in the forward pass. Therefore, while we have focused on C 4 v C_{4v} C 4 v CTMRG to motivate the form of the characteristic equations, our techniques can be easily incorporated into any existing code base without having to modify the implementation of the contraction algorithm itself. On the other hand, the set of characteristic equations Eqs. (26) to (28) is not unique. Ref. 39 uses a different set of equations which characterize a C 4 v C_{4v} C 4 v symmetric contraction environment only in terms of the corner C C C and isometry U U U . One could use these equations to perform implicit differentiation by performing the energy evaluation Eq. (6) using the isometry U U U . Details on how to map different symmetric contraction environments to each other and how the tensors within these environments are related to each other can be found in Section D.
Boundary MPS contraction
We further demonstrate the versatility of our approach by applying it to PEPS contractions using the boundary MPS method [17 ] . In this approach, we view the PEPS norm network ⟨ ψ ( t ) ∣ ψ ( t ) ⟩ \langle\psi(t)|\psi(t)\rangle ⟨ ψ ( t ) ∣ ψ ( t )⟩ on the left hand side of Eq. (5) as an infinite power of a row-to-row transfer operator T \mathcal{T} T , defined as
T = ⋯ (32) \mathcal{T}=\cdots \tag*{(32)} T = ⋯ (32)
To contract the norm network, we can then find the optimal MPS approximations to the dominant right and left eigenvectors of T \mathcal{T} T ,
top PEPS boundary tensor network ∝ top MPS eigenvector (33) \text{top PEPS boundary tensor network} \propto\text{top MPS eigenvector} \tag*{(33)} top PEPS boundary tensor network ∝ top MPS eigenvector (33)
bottom PEPS boundary tensor network ∝ bottom MPS eigenvector (34) \text{bottom PEPS boundary tensor network} \propto\text{bottom MPS eigenvector} \tag*{(34)} bottom PEPS boundary tensor network ∝ bottom MPS eigenvector (34)
which we will call the top and bottom MPS eigenvectors of T \mathcal{T} T respectively.
We start with a reminder of how these boundary MPS eigenvectors can be computed. We then give a set of characteristic equations in a suitable parametrization that can be used to apply implicit differentiation on top of the resulting fixed point. Just as before, this approach for computing the PEPS gradient can be directly applied on top of any existing implementation of boundary MPS contraction. Additionally, the proposed characteristic equations have the advantage of removing the need for gauge fixing the resulting boundary MPS.
Contracting a PEPS using boundary MPS
Given a transfer operator T \mathcal{T} T of the form Eq. (32) , one way to find its MPS eigenvectors is to use the variational uniform matrix product state (VUMPS) algorithm [18 ] . While we use this particular algorithm to guide our discussion, we stress that the implicit differentiation approach outlined below can be applied on top of any other algorithm that produces the same solution [37 , 40 ] . We again adopt the blocked notation of Eq. (20) , but now without assuming any spatial symmetries of the PEPS tensor p p p .
When written in mixed canonical form [40 ] , the top eigenvector in Eq. (33) can be defined in terms of a set of three variables x t = ( A L t , A R t , C t ) x^t=(A_L^t,A_R^t,C^t) x t = ( A L t , A R t , C t ) ,
x t = ( A L t , A R t , C t ) (35) x^t=(A_L^t,A_R^t,C^t) \tag*{(35)} x t = ( A L t , A R t , C t ) (35)
The A L t A_L^t A L t and A R t A_R^t A R t tensors are left and right isometries, satisfying the conditions
A ‾ L t A L t = I , A R t A ‾ R t = I . (36) \overline{A}_L^t A_L^t=\mathbb{I},\qquad A_R^t\overline{A}_R^t=\mathbb{I}. \tag*{(36)} A L t A L t = I , A R t A R t = I . (36)
In addition, the center-gauge bond tensor C t C^t C t has the property that
A L t C t = C t A R t , (37) A_L^t C^t=C^t A_R^t, \tag*{(37)} A L t C t = C t A R t , (37)
ensuring the MPS is translation invariant.
Starting from an initial boundary MPS ( A L t , A R t , C t ) (A_L^t,A_R^t,C^t) ( A L t , A R t , C t ) , a single iteration of the VUMPS algorithm produces an updated boundary MPS ( A L t ′ , A R t ′ , C t ′ ) (A_L^{t\prime},A_R^{t\prime},C^{t\prime}) ( A L t ′ , A R t ′ , C t ′ ) as follows. First, we find the left and right environments G L G_L G L and G R G_R G R as the leading eigenvectors of the left and right MPS transfer matrices respectively,
G L t T = λ L t G L t , (38) G_L^t\mathcal{T}=\lambda_L^tG_L^t, \tag*{(38)} G L t T = λ L t G L t , (38)
T G R t = λ R t G R t . (39) \mathcal{T}G_R^t=\lambda_R^tG_R^t. \tag*{(39)} T G R t = λ R t G R t . (39)
Second, we find updated “center” tensors A C t ′ A_C^{t\prime} A C t ′ and C t ′ C^{t\prime} C t ′ as the leading eigenvectors of the resulting one- and zero-site effective local Hamiltonians,
G L t T G R t = λ A C t A C t ′ , (40) G_L^t\mathcal{T}G_R^t=\lambda_{A_C}^t A_C^{t\prime}, \tag*{(40)} G L t T G R t = λ A C t A C t ′ , (40)
G L t T G R t = λ C t C t ′ . (41) G_L^t\mathcal{T}G_R^t=\lambda_C^t C^{t\prime}. \tag*{(41)} G L t T G R t = λ C t C t ′ . (41)
In practice, the eigenvalue problems for the extremal eigenvectors in Eqs. (38) to (41) are solved using a sparse Krylov-based eigensolver, such as the Arnoldi method. To speed up convergence of the eigensolver subroutines, we can supply the tensors from the previous iteration as an initial guess for the corresponding eigenvectors. Finally, we can use a suitable orthogonal factorization [41 ] to obtain updated isometries such that
A C t ′ = A L t ′ C t ′ = C t ′ A R t ′ . (42) A_C^{t\prime}=A_L^{t\prime}C^{t\prime}=C^{t\prime}A_R^{t\prime}. \tag*{(42)} A C t ′ = A L t ′ C t ′ = C t ′ A R t ′ . (42)
If T \mathcal{T} T is a Hermitian operator, meaning the PEPS tensor p p p has a Hermitian reflection symmetry, the bottom MPS eigenvector in Eq. (34) can be obtained simply as the hermitian conjugate of the top one. In the case where T \mathcal{T} T does not have a reflection symmetry, the bottom MPS, parametrized in terms of variables x b = ( A L b , A R b , C b ) x^b=(A_L^b,A_R^b,C^b) x b = ( A L b , A R b , C b ) as
x b = ( A L b , A R b , C b ) (43) x^b=(A_L^b,A_R^b,C^b) \tag*{(43)} x b = ( A L b , A R b , C b ) (43)
has to be computed separately. This can be done using exactly the same procedure Eqs. (38) to (42) , but where we rotate the transfer matrix T T T by 180 ∘ 180^\circ 18 0 ∘ . Given both a top and bottom boundary MPS, evaluating the PEPS energy Eq. (6) additionally requires mixed environments G L G_L G L and G R G_R G R defined as
G L = λ L G L . (44) G_L = \lambda_L G_L. \tag*{(44)} G L = λ L G L . (44)
G R = λ R G R . (45) G_R = \lambda_R G_R. \tag*{(45)} G R = λ R G R . (45)
The relevant expressions for evaluating the PEPS energy density Eq. (6) using a boundary MPS contraction environment built from the tensors introduced here are given in Section C.
We can define the iterating function f f f corresponding to the VUMPS algorithm as a single combined update of the top and bottom boundary MPS tensors x = ( x t , x b ) = ( A L t , A R t , C t , A L b , A R b , C b ) x = (x^t,x^b) = (A_L^t,A_R^t,C^t,A_L^b,A_R^b,C^b) x = ( x t , x b ) = ( A L t , A R t , C t , A L b , A R b , C b ) . This f f f produces updated tensors ( A L t ′ , A R t ′ , C t ′ , A L b ′ , A R b ′ , C b ′ ) = f ( ( A L t , A R t , C t , A L b , A R b , C b ) , p ) (A_L^{t\prime},A_R^{t\prime},C^{t\prime},A_L^{b\prime},A_R^{b\prime},C^{b\prime}) = f((A_L^t,A_R^t,C^t,A_L^b,A_R^b,C^b),p) ( A L t ′ , A R t ′ , C t ′ , A L b ′ , A R b ′ , C b ′ ) = f (( A L t , A R t , C t , A L b , A R b , C b ) , p ) as summarized by Eqs. (38) to (42) and their ( t ↔ b ) (t \leftrightarrow b) ( t ↔ b ) analogues. By repeatedly applying f f f , the procedure eventually converges to a set of fixed-point boundary MPS tensors x ∗ = ( A L t ∗ , A R t ∗ , C t ∗ , A L b ∗ , A R b ∗ , C b ∗ ) x^* = (A_L^{t*},A_R^{t*},C^{t*},A_L^{b*},A_R^{b*},C^{b*}) x ∗ = ( A L t ∗ , A R t ∗ , C t ∗ , A L b ∗ , A R b ∗ , C b ∗ ) that satisfy the fixed-point equation x ∗ = f ( x ∗ , p ) x^* = f(x^*,p) x ∗ = f ( x ∗ , p ) . Note that, at the fixed point, the eigenvalues in Eqs. (38) to (40) all correspond to the same value λ t ≡ λ L t = λ R t = λ A C t \lambda^t \equiv\lambda_L^t = \lambda_R^t = \lambda_{A_C}^t λ t ≡ λ L t = λ R t = λ A C t , provided that G L t G_L^t G L t and G R t G_R^t G R t are normalized such that λ C t = 1 \lambda_C^t = 1 λ C t = 1 . Importantly, for the implicit differentiation approach that follows, we only need this fixed-point condition to be valid only up to unitary gauge transformations. This means that there is no need to ensure element-wise convergence using a gauge fixing procedure when using implicit differentiation here, in contrast to the case of fixed-point differentiation. We denote the corresponding fixed-point values of the environment tensors Eqs. (38) , (39) , (44) and (45) as G L t ∗ G_L^{t*} G L t ∗ , G R t ∗ G_R^{t*} G R t ∗ , G L b ∗ G_L^{b*} G L b ∗ , G R b ∗ G_R^{b*} G R b ∗ , G L ∗ G_L^* G L ∗ and G R ∗ G_R^* G R ∗ .
Implicit differentiation for boundary MPS contraction
To compute the gradient of the PEPS energy density obtained using a boundary MPS contraction environment, we again define a differentiable function F ( y , p ) F(y,p) F ( y , p ) that implicitly characterizes the fixed-point solution ( A L t ∗ , A R t ∗ , C t ∗ , A L b ∗ , A R b ∗ , C b ∗ ) (A_L^{t*}, A_R^{t*}, C^{t*}, A_L^{b*}, A_R^{b*}, C^{b*}) ( A L t ∗ , A R t ∗ , C t ∗ , A L b ∗ , A R b ∗ , C b ∗ ) as the root y ∗ y^* y ∗ of the characteristic equation F ( y , p ) = 0 F(y,p)=0 F ( y , p ) = 0 .
For this we will use a custom set of 12 variables,
y = ( l t , r t , C t , G L t , G R t , l b , r b , C b , G L b , G R b , G L , G R ) . y = (l^t,r^t,C^t,G_L^t,G_R^t,l^b,r^b,C^b,G_L^b,G_R^b,G_L,G_R). y = ( l t , r t , C t , G L t , G R t , l b , r b , C b , G L b , G R b , G L , G R ) .
The first five variables are used to characterize the top fixed-point MPS eigenvector, while the next five characterize the bottom fixed-point MPS eigenvector. The last two variables are used to characterize the fixed-point mixed environments. For each of these variables, we can write a corresponding characteristic equation. In the language of Algorithm 2, the variables l α l^\alpha l α , r α r^\alpha r α and C α C^\alpha C α directly relate to the variables x x x of the iterating function f f f , while the others are intermediate variables that we have promoted to extend our set of equations beyond the simple fixed-point condition.
We start by considering the variables y t = ( l t , r t , C t , G L t , G R t ) y^t = (l^t,r^t,C^t,G_L^t,G_R^t) y t = ( l t , r t , C t , G L t , G R t ) and the corresponding characteristic equations that characterize the top MPS eigenvector. The first step is to use l t l^t l t and r t r^t r t to construct differentiable variables A L t A_L^t A L t and A R t A_R^t A R t in a way that ensures a stable parametrization of their variations. Consider the constant left and right null spaces V L V_L V L and V R V_R V R of the fixed-point isometries A L t ∗ A_L^{t*} A L t ∗ and A R t ∗ A_R^{t*} A R t ∗ respectively, defined through
( A L t ∗ ) † V L = 0 , A R t ∗ V R = 0. (46) (A_L^{t*})^\dagger V_L = 0,\qquad A_R^{t*}V_R = 0. \tag*{(46)} ( A L t ∗ ) † V L = 0 , A R t ∗ V R = 0. (46)
Using these null spaces, we define variables A L t A_L^t A L t and A R t A_R^t A R t as
A L t = A L t ∗ + V L l t , (47) A_L^t = A_L^{t*} + V_L l^t, \tag*{(47)} A L t = A L t ∗ + V L l t , (47)
A R t = A R t ∗ + r t V R . (48) A_R^t = A_R^{t*} + r^t V_R. \tag*{(48)} A R t = A R t ∗ + r t V R . (48)
These variables are only differentiable through their dependence on l t l^t l t and r t r^t r t while all other tensors are kept constant. This choice is motivated by the parameterization of the isometry in the C 4 v C_{4v} C 4 v CTMRG case, and its validity is further discussed below.
Next, we define a center tensor variable A C t A_C^t A C t as
A C t = 1 2 ( A L t C t + C t A R t ) . (49) A_C^t = \frac{1}{2}\left(A_L^t C^t + C^t A_R^t\right). \tag*{(49)} A C t = 2 1 ( A L t C t + C t A R t ) . (49)
and a scalar λ t \lambda^t λ t as
λ t = G L t T G R t . (50) \lambda^t = G_L^t T G_R^t. \tag*{(50)} λ t = G L t T G R t . (50)
Using the definitions Eqs. (47) to (50) , we can formulate the first five characteristic equations F t ( y t , p ) F^{t}(y^{t},p) F t ( y t , p ) corresponding to the top fixed point as
V ˉ L t T A C t G R t − λ t l t = 0 (51) \bar{V}_{L}^{t} T A_{C}^{t} G_{R}^{t} - \lambda^{t} l^{t} = 0 \tag*{(51)} V ˉ L t T A C t G R t − λ t l t = 0 (51)
C ∗ t − 1 T A C t V ˉ R t G R t − λ t r t = 0 (52) C_{*}^{t-1} T A_{C}^{t} \bar{V}_{R}^{t} G_{R}^{t} - \lambda^{t} r^{t} = 0 \tag*{(52)} C ∗ t − 1 T A C t V ˉ R t G R t − λ t r t = 0 (52)
1 2 ( A ˉ L t T A C t G R t + A ˉ R t T A C t G L t ) − λ t C t = 0 (53) \frac{1}{2}\left(\bar{A}_{L}^{t} T A_{C}^{t} G_{R}^{t} + \bar{A}_{R}^{t} T A_{C}^{t} G_{L}^{t}\right) - \lambda^{t} C^{t} = 0 \tag*{(53)} 2 1 ( A ˉ L t T A C t G R t + A ˉ R t T A C t G L t ) − λ t C t = 0 (53)
G L t T A L t − λ t G L t = 0 (54) G_{L}^{t} T A_{L}^{t} - \lambda^{t} G_{L}^{t} = 0 \tag*{(54)} G L t T A L t − λ t G L t = 0 (54)
A R t T G R t − λ t G R t = 0 (55) A_{R}^{t} T G_{R}^{t} - \lambda^{t} G_{R}^{t} = 0 \tag*{(55)} A R t T G R t − λ t G R t = 0 (55)
The root y t ∗ y^{t*} y t ∗ of these top characteristic equations exactly corresponds to the top fixed-point boundary MPS x t ∗ = ( A L t ∗ , A R t ∗ , C t ∗ ) x^{t*} = (A_{L}^{t*}, A_{R}^{t*}, C^{t*}) x t ∗ = ( A L t ∗ , A R t ∗ , C t ∗ ) and its fixed-point environments G L t ∗ G_{L}^{t*} G L t ∗ and G R t ∗ G_{R}^{t*} G R t ∗ . Indeed, from Section IV A we clearly see that y t ∗ = ( 0 , 0 , C ∗ , G L t ∗ , G R t ∗ ) y^{t*} = (0, 0, C^{*}, G_{L}^{t*}, G_{R}^{t*}) y t ∗ = ( 0 , 0 , C ∗ , G L t ∗ , G R t ∗ ) satisfies F t ( y t ∗ , p ) = 0 F^{t}(y^{t*},p) = 0 F t ( y t ∗ , p ) = 0 . In particular, the root values l t ∗ = 0 l^{t*} = 0 l t ∗ = 0 and r t ∗ = 0 r^{t*} = 0 r t ∗ = 0 enforce the expected fixed-point values A L t ∗ A_{L}^{t*} A L t ∗ and A R t ∗ A_{R}^{t*} A R t ∗ of the variables Eqs. (47) and (48) .
If T T T has a Hermitian reflection symmetry, these five equations form a complete set of characteristic equations for the full contraction environment, as the bottom fixed point is simply the Hermitian conjugate of the top one. Furthermore, if the system has a full C 4 v C_{4v} C 4 v symmetry as in Eq. (19) , the fixed-point equations become exactly equivalent to the ones given in Section III B. This is discussed in more detail in Section D. In the absence of spatial symmetries, we require five more equations for the variables y b = ( l b , r b , C b , G L b , G R b ) y^{b} = (l^{b}, r^{b}, C^{b}, G_{L}^{b}, G_{R}^{b}) y b = ( l b , r b , C b , G L b , G R b ) that characterize the bottom MPS eigenvector. These equations F b ( y b , p ) F^{b}(y^{b},p) F b ( y b , p ) are exact analogues of Eqs. (46) to (55) , where we simply exchange the labels t ↔ b t \leftrightarrow b t ↔ b and rotate T T T by 180 ∘ 180^\circ 18 0 ∘ . Their root is given by y b ∗ = ( 0 , 0 , C b ∗ , G L b ∗ , G R b ∗ ) y^{b*} = (0, 0, C^{b*}, G_{L}^{b*}, G_{R}^{b*}) y b ∗ = ( 0 , 0 , C b ∗ , G L b ∗ , G R b ∗ ) , which exactly corresponds to the bottom fixed-point MPS x b ∗ = ( A L b ∗ , A R b ∗ , C b ∗ ) x^{b*} = (A_{L}^{b*}, A_{R}^{b*}, C^{b*}) x b ∗ = ( A L b ∗ , A R b ∗ , C b ∗ ) and its fixed-point environment G L b ∗ G_{L}^{b*} G L b ∗ and G R b ∗ G_{R}^{b*} G R b ∗ .
Finally, we require two more equations F g ( y g , p ) = 0 F^{g}(y^{g},p) = 0 F g ( y g , p ) = 0 for the variables y g = ( G L , G R ) y^{g} = (G_{L},G_{R}) y g = ( G L , G R ) , which are given by
A L t T G L − λ G L = 0 (56) A_{L}^{t} T G_{L} - \lambda G_{L} = 0 \tag*{(56)} A L t T G L − λ G L = 0 (56)
A R t T G R − λ G R = 0. (57) A_{R}^{t} T G_{R} - \lambda G_{R} = 0. \tag*{(57)} A R t T G R − λ G R = 0. (57)
where λ \lambda λ is defined as
λ = G L T G R . (58) \lambda= G_{L} T G_{R}. \tag*{(58)} λ = G L T G R . (58)
Their root y g ∗ = ( G L ∗ , G R ∗ ) y^{g*} = (G_{L}^{*},G_{R}^{*}) y g ∗ = ( G L ∗ , G R ∗ ) simply corresponds to the fixed-point value of the mixed environments Eqs. (44) and (45) , provided that the fixed point tensors G L ∗ G_{L}^{*} G L ∗ and G R ∗ G_{R}^{*} G R ∗ are normalized such that
G L ∗ T G R ∗ = 1. (59) G_{L}^{*} T G_{R}^{*} = 1. \tag*{(59)} G L ∗ T G R ∗ = 1. (59)
Altogether, this gives us a set of 12 characteristic equations F ( y , p ) = 0 F(y,p) = 0 F ( y , p ) = 0 for the 12 variables y y y in the general case, whose root y ∗ y^{*} y ∗ fully characterizes the boundary MPS contraction environment. Given this form of F F F and the root y ∗ y^{*} y ∗ , we can directly apply the implicit differentiation approach of Eqs. (15) to (18) and supply it to Algorithm 2 to compute the PEPS gradient.
To solve the resulting linear problem Eq. (17) in practice, we also need the adjoints y ~ \tilde{y} y ~ in line 6 of Algorithm 2. By backpropagating through the energy evaluation Eq. (6) , we obtain the adjoints of the boundary MPS tensors that appear explicitly in the contraction environment. For variables that are not used in the energy evaluation, we simply set the corresponding adjoints to zero. The precise form of the contraction environment and the corresponding adjoints is given in Section C. Finally, from the adjoints of the contraction environment we can obtain y ~ \tilde{y} y ~ by backpropagating through the parametrizations, y ˙ = x ˙ ∂ y x \dot{y}=\dot{x}\,\partial_y x y ˙ = x ˙ ∂ y x . Specifically, from the adjoints A ˙ L α \dot{A}^{\alpha}_{L} A ˙ L α and A ˙ R α \dot{A}^{\alpha}_{R} A ˙ R α where α = t , b \alpha=t,b α = t , b , we obtain l ˙ α \dot{l}^{\alpha} l ˙ α and r ˙ α \dot{r}^{\alpha} r ˙ α by projecting onto the corresponding null spaces V L α V^{\alpha}_{L} V L α and V R α V^{\alpha}_{R} V R α respectively, according to Eqs. (47) and (48) .
Note that, while we have found this particular formulation in terms of a single set of characteristic equations to be the most straightforward to implement and the most numerically stable in practice, alternative equivalent representations of the boundary MPS optimality conditions exist. In particular, the problem can also be reformulated by decomposing it into smaller linear subproblems for the top and bottom boundaries separately, as described in Section E.
Motivating the characteristic equations
To motivate this form of F F F and the advantages it offers, we again start by considering how fixed-point differentiation using the iterating function f f f defined in Section IV A works [23 ] .
To solve the fixed-point differentiation linear problem Eq. (12) using a sparse solver, we need to evaluate the VJP action of ∂ x f \partial_x f ∂ x f in every iteration. Evaluating this VJP via automatic differentiation of a VUMPS iteration is highly non-trivial, as it requires that every primitive operation within a single iteration, such as the QR decomposition used in Eq. (42) and the dominant eigenvalue solves of Eqs. (38) to (41) , must be made differentiable while ensuring numerical stability at each step [23 ] . Backpropagating through a dominant eigensolve requires solving a linear problem of a similar size as the original eigenvalue problem. This means that the fixed-point differentiation of a boundary MPS contraction requires solving a nested linear problem for each dominant eigensolve inside the outer linear problem.
Implicit differentiation of the characteristic equation presented above circumvents these difficulties entirely. On the one hand, the given form of F F F requires the AD engine to differentiate only tensor contractions, completely removing the need to make the subroutines of a single iteration differentiable. Furthermore, this means that the corresponding VJP action ∂ y F \partial_yF ∂ y F also corresponds to a set of simple tensor contractions. Therefore, rather than solving nested linear problems, by including the intermediate environment variables directly into the definition of F F F we now only solve a single, albeit larger, linear problem for the adjoint F ˙ \dot{F} F ˙ .
To motivate our choice of variables y y y , and in particular the parametrization Eqs. (47) and (48) , we consider the inherent symmetries of the boundary MPS approach. Just as in the C 4 v C_{4v} C 4 v CTMRG case, the boundary MPS contraction environment admits a gauge symmetry that can be exploited to restrict the variations around the fixed-point tensors to improve stability. All physical observables and defining relations are invariant under the gauge transformation
C t ↦ Q L α C α Q R α † , A L α ↦ Q L α A L α Q L α † , A R α ↦ Q R α A R α Q R α † . (60) \begin{aligned}
C^{t} &\mapsto Q_{L}^{\alpha} C^{\alpha} Q_{R}^{\alpha\dagger},\\
A_{L}^{\alpha} &\mapsto Q_{L}^{\alpha} A_{L}^{\alpha} Q_{L}^{\alpha\dagger},\\
A_{R}^{\alpha} &\mapsto Q_{R}^{\alpha} A_{R}^{\alpha} Q_{R}^{\alpha\dagger}. \tag*{(60)}
\end{aligned} C t A L α A R α ↦ Q L α C α Q R α † , ↦ Q L α A L α Q L α † , ↦ Q R α A R α Q R α † . (60)
where Q L α Q_{L}^{\alpha} Q L α and Q R α Q_{R}^{\alpha} Q R α are arbitrary unitary matrices. In particular, this could be used to replace C C C with a real diagonal matrix S S S associated with its singular value decomposition C = U S V † C=USV^{\dagger} C = U S V † , by choosing Q L = U † Q_{L}=U^{\dagger} Q L = U † and Q R = V † Q_{R}=V^{\dagger} Q R = V † , although this is not a standard practice in the VUMPS algorithm.
In general, the variations around the fixed-point isometries, A ˙ L α \dot{A}_{L}^{\alpha} A ˙ L α and A ˙ R α \dot{A}_{R}^{\alpha} A ˙ R α , contain contributions along both the primal solutions A L α ∗ A_{L}^{\alpha*} A L α ∗ and A R α ∗ A_{R}^{\alpha*} A R α ∗ respectively, as well as their corresponding null spaces, just as in Eq. (30) ,
A ˙ L α = A L α ∗ ω ˙ L + V L α ∗ l ˙ , A ˙ R α = ω ˙ R A R α ∗ + r ˙ V R α ∗ , (61) \dot{A}_{L}^{\alpha}=A_{L}^{\alpha*}\dot{\omega}_{L}+V_{L}^{\alpha*}\dot{l},\qquad
\dot{A}_{R}^{\alpha}=\dot{\omega}_{R}A_{R}^{\alpha*}+\dot{r}V_{R}^{\alpha*}, \tag*{(61)} A ˙ L α = A L α ∗ ω ˙ L + V L α ∗ l ˙ , A ˙ R α = ω ˙ R A R α ∗ + r ˙ V R α ∗ , (61)
with again ω ˙ L \dot{\omega}_{L} ω ˙ L and ω ˙ R \dot{\omega}_{R} ω ˙ R skew-Hermitian. However, we can use the gauge freedom to remove these contributions along A L α ∗ A_{L}^{\alpha*} A L α ∗ and A R α ∗ A_{R}^{\alpha*} A R α ∗ from the gradient computation entirely, while leaving the forward computation unchanged. Even if we choose to include the step that makes C C C real diagonal in the forward computation, it is then important to keep C C C as a generic complex matrix in the parametrization of the reverse problem. The restriction of the isometry variations is achieved through the parametrizations in Eqs. (47) and (48) and their ( t ↔ b ) (t\leftrightarrow b) ( t ↔ b ) equivalents, where l α l^{\alpha} l α and r α r^{\alpha} r α are used as differentiable variables in the characteristic equations. This effectively restricts the variations of the isometries to only contain contributions along their null spaces, completely analogous to Eq. (31) .
CTMRG contraction
As a final example, we apply the principle of implicit differentiation to the asymmetric CTMRG algorithm for systems without spatial symmetries [15 ] . In this case, the contraction environment consists of four different corner tensors and four different edge tensors, as opposed to the single corner and edge tensor used in the C 4 v C_{4v} C 4 v symmetric case of Section III.
We denote the edge and corner tensors as { C α } \{C_{\alpha}\} { C α } and { E α } \{E_{\alpha}\} { E α } respectively, where the index α \alpha α labels the different directions. We choose the convention that the directions α = 1 , 2 , 3 , 4 \alpha=1,2,3,4 α = 1 , 2 , 3 , 4 correspond to north, east, south and west for edges, and northwest, northeast, southeast and southwest for corners respectively. This gives rise to an asymmetric contraction environment for the PEPS norm network of the form
tensor-network diagram (62) \text{tensor-network diagram} \tag*{(62)} tensor-network diagram (62)
We first briefly review how these corners and edges can be computed. We then give a set of characteristic equations in a suitable parametrization that can be used to apply implicit differentiation on top of the resulting fixed point. Finally, we motivate the form and parametrization of these characteristic equations by considering the symmetries of the CTMRG algorithm.
Throughout this entire section, we only explicitly provide diagrams centered around the α = 1 \alpha=1 α = 1 direction, and implicitly assume analogous rotated expressions for the other directions α = 2 , 3 , 4 \alpha=2,3,4 α = 2 , 3 , 4 . Just as before, we restrict our discussion here to the case of PEPS with a single-site unit cell. Explicit expressions for the generalization to arbitrary unit cells are given in Section F.
Contracting a PEPS using CTMRG
Just as in the C 4 v C_{4v} C 4 v symmetric case, the asymmetric CTMRG algorithm is an iterative procedure that maps a given contraction environment x = ( { C α } , { E α } ) x= (\{C_\alpha\},\{E_\alpha\}) x = ({ C α } , { E α }) consisting of a set of corner and edge tensors to a new set ( { C α ′ } , { E α ′ } ) (\{C'_\alpha\},\{E'_\alpha\}) ({ C α ′ } , { E α ′ }) by applying an iterating function f f f , ( { C α ′ } , { E α ′ } ) = f ( ( { C α } , { E α } ) , p ) (\{C'_\alpha\},\{E'_\alpha\})=f((\{C_\alpha\},\{E_\alpha\}),p) ({ C α ′ } , { E α ′ }) = f (({ C α } , { E α }) , p ) . In each iteration of f f f , we start by decomposing an enlarged environment using a truncated SVD as
tensor-network diagram (63) \text{tensor-network diagram} \tag*{(63)} tensor-network diagram (63)
Denoting the inverses of the singular value matrices as s α ≡ S α − 1 s_\alpha\equiv S_\alpha^{-1} s α ≡ S α − 1 , we use the result of the decomposition to define left and right projectors for each direction as
tensor-network diagram (64) \text{tensor-network diagram} \tag*{(64)} tensor-network diagram (64)
tensor-network diagram (65) \text{tensor-network diagram} \tag*{(65)} tensor-network diagram (65)
Using these projectors, we obtain the updated corners and edges through
tensor-network diagram (66) \text{tensor-network diagram} \tag*{(66)} tensor-network diagram (66)
tensor-network diagram (67) \text{tensor-network diagram} \tag*{(67)} tensor-network diagram (67)
and their corresponding rotated versions. Here, the scalars λ C α \lambda_{C_\alpha} λ C α and λ E α \lambda_{E_\alpha} λ E α correspond to the 2-norm of the left hand sides of the respective equations, such that { C α } \{C_\alpha\} { C α } and { E α } \{E_\alpha\} { E α } have unit normalization at all times. While we focus on the case of projectors { P α L } \{P_\alpha^L\} { P α L } and { P α R } \{P_\alpha^R\} { P α R } computed using the decomposition of a “half” infinite environment in Eq. (63) , the methods and results presented here also apply to other constructions. In particular, the projectors could also be constructed from an SVD of a “full” infinite environment consisting of four enlarged corners [42 ] .
This procedure eventually produces a fixed-point environment x ∗ = ( { C α ∗ } , { E α ∗ } ) x^*=(\{C_\alpha^*\},\{E_\alpha^*\}) x ∗ = ({ C α ∗ } , { E α ∗ }) for which f ( x ∗ , p ) ≈ x ∗ f(x^*,p)\approx x^* f ( x ∗ , p ) ≈ x ∗ is reached up to some desired tolerance. Note that, again, ensuring this element-wise convergence requires a suitable gauge fixing of the fixed-point corner and edge tensors. We then use this result to also gauge-fix the SVD tensors, where we denote the corresponding gauge-fixed fixed-point SVD tensors as { U α ∗ } \{U_\alpha^*\} { U α ∗ } , { S α ∗ } \{S_\alpha^*\} { S α ∗ } and { V α ∗ } \{V_\alpha^*\} { V α ∗ } .
Implicit differentiation for CTMRG
The approach for formulating implicit differentiation for asymmetric CTMRG consists of the same steps as in the previous two examples. Here, we use a custom set of variables y y y defined as
y = ( { C ~ α } , { E ~ α } , { u α } , { S α } , { v α } ) . y=(\{\widetilde{C}_\alpha\},\{\widetilde{E}_\alpha\},\{u_\alpha\},\{S_\alpha\},\{v_\alpha\}). y = ({ C α } , { E α } , { u α } , { S α } , { v α }) .
The variables { C ~ α } \{\widetilde{C}_\alpha\} { C α } and { E ~ α } \{\widetilde{E}_\alpha\} { E α } correspond to modified corner and edge tensors which are directly related to the variables x = ( { C α } , { E α } ) x=(\{C_\alpha\},\{E_\alpha\}) x = ({ C α } , { E α }) used in the energy evaluation. The { u α } \{u_\alpha\} { u α } , { S α } \{S_\alpha\} { S α } , and { v α } \{v_\alpha\} { v α } are the intermediate variables of line 5 in Algorithm 2 and will be used to characterize the decomposition Eq. (63) . The variables S α S_\alpha S α are treated as generic complex matrices here, though they will reduce to the real diagonal matrices of singular values at the root of the characteristic equations. For each of these variables, we will formulate a corresponding characteristic equation.
The first step is to use { u α } \{u_\alpha\} { u α } and { v α } \{v_\alpha\} { v α } to define differentiable tensors { U α } \{U_\alpha\} { U α } and { V α } \{V_\alpha\} { V α } , whose derivatives lie only within the null spaces of the fixed-point isometries. Consider the left and right null spaces U α U_{\alpha} U α and V α V_{\alpha} V α of U α ∗ U_{\alpha}^{*} U α ∗ and V α ∗ V_{\alpha}^{*} V α ∗ respectively, characterized as
U 1 ⊥ † U 1 ∗ = 0 , V 1 ∗ V 1 ⊥ † = 0. (68) U_{1\perp}^{\dagger}U_{1}^{*}=0,\qquad V_{1}^{*}V_{1\perp}^{\dagger}=0. \tag*{(68)} U 1 ⊥ † U 1 ∗ = 0 , V 1 ∗ V 1 ⊥ † = 0. (68)
Using these constant null spaces, we define tensors { U α } \{U_{\alpha}\} { U α } and { V α } \{V_{\alpha}\} { V α } as
U 1 = U 1 ⊥ + U 1 ⊥ ∗ u 1 , (69) U_{1}=U_{1}^{\perp}+U_{1\perp}^{*}u_{1}, \tag*{(69)} U 1 = U 1 ⊥ + U 1 ⊥ ∗ u 1 , (69)
V 1 = V 1 ∗ + v 1 V 1 ⊥ , (70) V_{1}=V_{1}^{*}+v_{1}V_{1\perp}, \tag*{(70)} V 1 = V 1 ∗ + v 1 V 1 ⊥ , (70)
which are differentiable only through their dependence on the variables { u α } \{u_{\alpha}\} { u α } and { v α } \{v_{\alpha}\} { v α } .
We again denote the inverses of the variables { S α } \{S_{\alpha}\} { S α } as { s α } \{s_{\alpha}\} { s α } , where s α = S α − 1 s_{\alpha}=S_{\alpha}^{-1} s α = S α − 1 . Furthermore, we define the additional variables s α L s_{\alpha}^{L} s α L and s α R s_{\alpha}^{R} s α R as “modified square roots” of the inverse singular value matrices,
s α L = s α † s α 4 , s α R = s α s α † 4 . (71) s_{\alpha}^{L}=\sqrt[4]{s_{\alpha}^{\dagger}s_{\alpha}},\qquad s_{\alpha}^{R}=\sqrt[4]{s_{\alpha}s_{\alpha}^{\dagger}}. \tag*{(71)} s α L = 4 s α † s α , s α R = 4 s α s α † . (71)
From these basic variables, we define modified left and right projectors as
P ~ 1 L = tensor network constructed from C ~ 1 , s 1 , E ~ 1 , s 1 L , E ~ 1 † , U 1 † , (72) \widetilde{P}_{1}^{L}=\text{tensor network constructed from }\widetilde{C}_{1},s_{1},\widetilde{E}_{1},s_{1}^{L},\widetilde{E}_{1}^{\dagger},U_{1}^{\dagger}, \tag*{(72)} P 1 L = tensor network constructed from C 1 , s 1 , E 1 , s 1 L , E 1 † , U 1 † , (72)
P ~ 1 R = tensor network constructed from s 1 , E ~ 1 , s 1 , C ~ 1 † , s 1 R , V 1 † . (73) \widetilde{P}_{1}^{R}=\text{tensor network constructed from }s_{1},\widetilde{E}_{1},s_{1},\widetilde{C}_{1}^{\dagger},s_{1}^{R},V_{1}^{\dagger}. \tag*{(73)} P 1 R = tensor network constructed from s 1 , E 1 , s 1 , C 1 † , s 1 R , V 1 † . (73)
Using this custom set of variables and the above definitions, we can formulate a set of characteristic equations
F ( { C ~ α } , { E ~ α } , { u α } , { S α } , { v α } , p ) = 0 F(\{\widetilde{C}_{\alpha}\},\{\widetilde{E}_{\alpha}\},\{u_{\alpha}\},\{S_{\alpha}\},\{v_{\alpha}\},p)=0 F ({ C α } , { E α } , { u α } , { S α } , { v α } , p ) = 0
as
P ~ 1 R C ~ 1 − λ C 1 C ~ 1 = 0. (74) \widetilde{P}_{1}^{R}\widetilde{C}_{1}-\lambda_{C_{1}}\widetilde{C}_{1}=0. \tag*{(74)} P 1 R C 1 − λ C 1 C 1 = 0. (74)
P ~ 1 L E ~ 1 − λ E 1 E ~ 1 = 0. (75) \widetilde{P}_{1}^{L}\widetilde{E}_{1}-\lambda_{E_{1}}\widetilde{E}_{1}=0. \tag*{(75)} P 1 L E 1 − λ E 1 E 1 = 0. (75)
tensor-network expression involving C ~ 1 , E ~ 1 , s 1 L , s 1 R , T − λ S 1 u 1 = 0. (76) \text{tensor-network expression involving }\widetilde{C}_{1},\widetilde{E}_{1},s_{1}^{L},s_{1}^{R},T-\lambda_{S_{1}}u_{1}=0. \tag*{(76)} tensor-network expression involving C 1 , E 1 , s 1 L , s 1 R , T − λ S 1 u 1 = 0. (76)
tensor-network expression involving C ~ 1 , E ~ 1 , s 1 L , s 1 R , T − λ S 1 S 1 = 0. (77) \text{tensor-network expression involving }\widetilde{C}_{1},\widetilde{E}_{1},s_{1}^{L},s_{1}^{R},T-\lambda_{S_{1}}S_{1}=0. \tag*{(77)} tensor-network expression involving C 1 , E 1 , s 1 L , s 1 R , T − λ S 1 S 1 = 0. (77)
tensor-network expression involving C ~ 1 , E ~ 1 , s 1 L , s 1 R , T − λ S 1 v 1 = 0. (78) \text{tensor-network expression involving }\widetilde{C}_{1},\widetilde{E}_{1},s_{1}^{L},s_{1}^{R},T-\lambda_{S_{1}}v_{1}=0. \tag*{(78)} tensor-network expression involving C 1 , E 1 , s 1 L , s 1 R , T − λ S 1 v 1 = 0. (78)
Here, we assume that { C ~ α } \{\widetilde{C}_{\alpha}\} { C α } { E ~ α } \{\widetilde{E}_{\alpha}\} { E α } have unit normalization, and have defined the scalars λ C 1 \lambda_{C_{1}} λ C 1 , λ E 1 \lambda_{E_{1}} λ E 1 and λ S 1 \lambda_{S_{1}} λ S 1 as the inner product of the first term in Eqs. (74) , (77) and (79) with C ~ 1 \widetilde{C}_{1} C 1 , E ~ 1 \widetilde{E}_{1} E 1 and S 1 S_{1} S 1 respectively. This means that λ C 1 \lambda_{C_{1}} λ C 1 , λ E 1 \lambda_{E_{1}} λ E 1 and λ S 1 \lambda_{S_{1}} λ S 1 are also differentiable variables dependent on y y y . Together with the rotated versions of Eqs. (74) to (80), this gives us a set of 20 characteristic equations for the 20 variables y y y , which can be directly used to apply implicit differentiation Eqs. (15) to (18) to compute the PEPS gradient. Intuitively, the characteristic equations simultaneously encode the element-wise convergence of the corner and edge tensors, as well as the defining relations of the truncated SVD Eq. (63) .
To better understand the origin of our parametrization y y y , we start by considering the root y ∗ y^{*} y ∗ of these equations. From § 6 A, we can see that the root value is given by y ∗ = ( { C ~ α ∗ } , { E ~ α ∗ } , { 0 } , { S α ∗ } , { 0 } ) y^{*}=(\{\widetilde{C}_{\alpha}^{*}\},\{\widetilde{E}_{\alpha}^{*}\},\{0\},\{S_{\alpha}^{*}\},\{0\}) y ∗ = ({ C α ∗ } , { E α ∗ } , { 0 } , { S α ∗ } , { 0 }) , where
C ~ 1 ∗ = tensor network constructed from C 1 ∗ , s 1 L , E ~ 1 ∗ = tensor network constructed from S 1 ∗ , E 1 ∗ , S 1 ∗ . (79) \widetilde{C}_{1}^{*}=\text{tensor network constructed from }C_{1}^{*},s_{1}^{L},\qquad\widetilde{E}_{1}^{*}=\text{tensor network constructed from }S_{1}^{*},E_{1}^{*},S_{1}^{*}. \tag*{(79)} C 1 ∗ = tensor network constructed from C 1 ∗ , s 1 L , E 1 ∗ = tensor network constructed from S 1 ∗ , E 1 ∗ , S 1 ∗ . (79)
First, note that u α ∗ = 0 u_\alpha^*=0 u α ∗ = 0 and v α ∗ = 0 v_\alpha^*=0 v α ∗ = 0 ensure the expected root values { U α ∗ } \{U_\alpha^*\} { U α ∗ } and { V α ∗ } \{V_\alpha^*\} { V α ∗ } of the isometries Eqs. (69) and (70) , meaning that y ∗ y^* y ∗ indeed captures the fixed-point SVD tensors. Second, we see that we can obtain the modified corner and edge tensors from the regular corners and edges by “pulling out” the square roots of the inverse singular value matrices that originally appeared in the projector definitions Eqs. (64) and (65) . Indeed, this is exactly consistent with the modified projector definitions Eqs. (72) and (73) used in the characteristic equations. This choice is motivated by the gauge symmetry of the CTMRG algorithm, which we will discuss in § 6 C. We will see that square roots of singular value matrices do not transform covariantly, meaning that we have to treat them separately to ensure a stable parametrization of the isometries.
It is important to emphasize that, even though the characteristic equations make use of modified corners and edges, there is no need whatsoever to modify the actual CTMRG contraction algorithm to use implicit differentiation. Indeed, to use Algorithm 2, all we need is a way to relate the variables y y y to the variables x x x used in the regular contraction algorithm. This relation can then be used to obtain the root y ∗ y^* y ∗ and adjoint y ˙ \dot{y} y ˙ from the output x ∗ x^* x ∗ of the regular contraction algorithm and the adjoints x ˙ \dot{x} x ˙ . Here, the relevant map y ↦ x y \mapsto x y ↦ x is given by Eqs. (69) and (70) combined with the defining relation
tensor-network definition (80) \text{tensor-network definition} \tag*{(80)} tensor-network definition (80)
Indeed, given this definition we can directly obtain the root y ∗ y^* y ∗ given above from the fixed-point environment x ∗ x^* x ∗ . To obtain the adjoints y ˙ \dot{y} y ˙ , we first note that since U α U_\alpha U α and V α V_\alpha V α do not appear in the energy evaluation, their adjoints can simply be set to zero, giving u ˙ α = 0 \dot{u}_\alpha=0 u ˙ α = 0 and v ˙ α = 0 \dot{v}_\alpha=0 v ˙ α = 0 . Finally, from the adjoints x ˙ \dot{x} x ˙ of the corner and edge tensors we can obtain adjoints of the variables C ~ α \widetilde{C}_\alpha C α , E ~ α \widetilde{E}_\alpha E α and S ~ α \widetilde{S}_\alpha S α by explicitly backpropagating through the defining relation Eq. (80) to complete y ˙ \dot{y} y ˙ .
Motivating the characteristic equations
The reasoning behind the precise forms of y y y and F F F becomes clear when considering the subroutines and symmetries of the CTMRG algorithm.
The key step in the iterating function f f f of the CTMRG contraction is the truncated SVD of Eq. (63) . As a consequence, applying fixed-point differentiation to this f f f gives a linear problem for the VJP action of ∂ x f \partial_x f ∂ x f which involves backpropagating through this truncated SVD at each function application. Without access to the full un-truncated decomposition, which is necessarily the case at large bond dimensions, backpropagating through a truncated SVD requires solving a linear Sylvester equation [29 ] , again leading to a nested linear problem in Eq. (12) .
In addition, the VJP action of a truncated SVD is inherently unstable when there are (nearly) degenerate singular values, while the energy evaluation Eq. (6) is entirely insensitive to these degeneracies, exactly as in the C 4 v C_{4v} C 4 v symmetric case.
Just as before, the efficiency issue is solved by un-nesting the linear problem by treating the singular value tensors { U α } \{U_\alpha\} { U α } , { S α } \{S_\alpha\} { S α } and { V α } \{V_\alpha\} { V α } at the same level as { C ~ α } \{\widetilde{C}_\alpha\} { C α } , { E ~ α } \{\widetilde{E}_\alpha\} { E α } and adding their defining equations directly to F F F . To avoid the stability issues caused by degeneracies, we can again exploit a gauge symmetry of the contraction algorithm. While this approach builds largely on the ideas from Section III, leveraging the gauge freedom is significantly more subtle in this case.
Just as we noted in Section III C, in general the variations U ˙ α \dot{U}_\alpha U ˙ α and V ˙ α \dot{V}_\alpha V ˙ α of the truncated isometries appearing in Eq. (63) contain contributions along both their corresponding fixed-point values and their null space,
U ˙ α = U α ∗ ω ˙ L + U ⊥ α u ˙ α , V ˙ α = ω ˙ R V α ∗ + v ˙ α V ⊥ α . (81) \dot{U}_\alpha=U_\alpha^*\dot{\omega}_L+U_{\perp\alpha}\dot{u}_\alpha,\qquad
\dot{V}_\alpha=\dot{\omega}_R V_\alpha^*+\dot{v}_\alpha V_{\perp\alpha}. \tag*{(81)} U ˙ α = U α ∗ ω ˙ L + U ⊥ α u ˙ α , V ˙ α = ω ˙ R V α ∗ + v ˙ α V ⊥ α . (81)
Similar to the eigh case, the variations ω ˙ L \dot{\omega}_L ω ˙ L and ω ˙ R \dot{\omega}_R ω ˙ R lead to divergences in the adjoint of the enlarged environment when there are degenerate singular values [34 ] .
However, just as in the C 4 v C_{4v} C 4 v symmetric case, the CTMRG algorithm has a gauge symmetry that can be exploited to remove these contributions from the gradient computation. Specifically, Eq. (81) contains eight potentially diverging terms in total, one for each U α U_\alpha U α and V α V_\alpha V α . At the same time, given a CTMRG contraction environment, there are eight independent unitaries Q α L Q_\alpha^L Q α L and Q α R Q_\alpha^R Q α R which define a gauge transformation of this environment. Namely, conjugating the corners and edges by these unitaries leaves all physical observables invariant,
gauge transformation of the environment (82) \text{gauge transformation of the environment} \tag*{(82)} gauge transformation of the environment (82)
We can interpret this gauge freedom of the environment as a freedom in redefining the left and right leading singular value subspaces,
U α S α V α = U α Q α L † ( Q α L S α Q α R † ) Q α R V α . (83) U_\alpha S_\alpha V_\alpha=U_\alpha Q_\alpha^{L\dagger}\left(Q_\alpha^L S_\alpha Q_\alpha^{R\dagger}\right)Q_\alpha^R V_\alpha. \tag*{(83)} U α S α V α = U α Q α L † ( Q α L S α Q α R † ) Q α R V α . (83)
The gauge invariance of Eq. (82) then means that, in principle, we only require projectors onto the leading subspaces rather than a specific basis in which S α S_\alpha S α is diagonal. If the entire CTMRG algorithm preserved this invariance, meaning that all intermediate objects transform appropriately under this set of gauge transformations, we could simply proceed in the same way as in Section III C and exploit the gauge freedom to remove the problematic contributions from Eq. (81) .
However, there are two issues that arise in the usual formulation of the CTMRG algorithm. Firstly, the CTMRG projectors do not transform appropriately under gauge transformations due to the inverse square roots of the singular value matrices in Eqs. (64) and (65) . The inverse square root S α = S α − 1 \sqrt{S_\alpha} = \sqrt{S_\alpha^{-1}} S α = S α − 1 transforms as
S α → Q α R S α − 1 Q α L † ≠ Q α R S α Q α L † . (84) \sqrt{S_\alpha} \to\sqrt{Q_\alpha^R S_\alpha^{-1} Q_\alpha^{L\dagger}} \ne Q_\alpha^R \sqrt{S_\alpha} Q_\alpha^{L\dagger}. \tag*{(84)} S α → Q α R S α − 1 Q α L † = Q α R S α Q α L † . (84)
Clearly, the final contracted environment used to compute observables always contains products of S α \sqrt{S_\alpha} S α , arising from pairs of left and right projectors, that yield an S α S_\alpha S α with a proper transformation law. However, the individual projectors do not transform covariantly. Secondly, the edge tensor transformation E α → Q α L E α Q α R † E_\alpha\to Q_\alpha^L E_\alpha Q_\alpha^{R\dagger} E α → Q α L E α Q α R † is clearly incompatible with the construction of environments consisting of multiple edge tensors whenever Q α L ≠ Q α R Q_\alpha^L \ne Q_\alpha^R Q α L = Q α R , which are for example required when evaluating expectation values of operators acting on multiple sites.
Both issues can be solved using the following procedure. The first logical step is to remove the inverse square roots from the projector definitions Eqs. (64) and (65) and include the s α s_\alpha s α variables explicitly in the contraction environment. This then also implies removing the inverse square roots from the renormalized corners and edges. Altogether, this leads to the definitions of the modified corners, edges and projectors, { C ~ α } \{\widetilde{C}_\alpha\} { C α } , { E ~ α } \{\widetilde{E}_\alpha\} { E α } , { P ~ α L } \{\widetilde{P}_\alpha^L\} { P α L } and { P ~ α R } \{\widetilde{P}_\alpha^R\} { P α R } , of Eqs. (72) , (75) and (82). The appearance of inverse singular values { s α } \{s_\alpha\} { s α } on the edges can be straightforwardly generalized to larger environments to systematically ensure gauge invariance. However, the intermediate SVD step in Eq. (63) remains problematic. The environment matrix of Eq. (63) is formed by cutting links between edge tensors E α E_\alpha E α . In terms of the modified edge tensors { E ~ α } \{\widetilde{E}_\alpha\} { E α } , this leads to a dangling s α \sqrt{s_\alpha} s α on outer legs of the edge tensors that are being cut. This results in a non-unitary matrix transformation and consequently alters the SVD decomposition beyond a simple gauge transformation. In a second step, we resolve this by replacing the dangling inverse roots on the left and right cuts by the custom roots s α L s_\alpha^L s α L and s α R s_\alpha^R s α R of Eq. (71) , with transformation laws
s α L → Q α L s α L Q α L † , s α R → Q α R s α R Q α R † . (85) s_\alpha^L \to Q_\alpha^L s_\alpha^L Q_\alpha^{L\dagger}, \qquad s_\alpha^R \to Q_\alpha^R s_\alpha^R Q_\alpha^{R\dagger}. \tag*{(85)} s α L → Q α L s α L Q α L † , s α R → Q α R s α R Q α R † . (85)
This leads to the expressions for the infinite environment matrix on the left hand side of Eqs. (76) to (78) , and ensures the consistency of the SVD decomposition.
After ensuring that observables calculated with CTMRG are invariant under unitary gauge transformations Q α R Q_\alpha^R Q α R , Q α L Q_\alpha^L Q α L , we can use their variations to cancel the diverging components in Eq. (81) . This restricts the isometry variations to their respective null spaces,
U ˙ α = U ⊥ α u ˙ α , V ˙ α = v ˙ α V ⊥ α . (86) \dot{U}_\alpha= U_{\perp\alpha}\dot{u}_\alpha, \qquad\dot{V}_\alpha= \dot{v}_\alpha V_{\perp\alpha}. \tag*{(86)} U ˙ α = U ⊥ α u ˙ α , V ˙ α = v ˙ α V ⊥ α . (86)
In practice, this stable parametrization of the truncated isometry variations is easily imposed by using the parametrization of Eqs. (69) and (70) in the characteristic equations. As a consequence, variations of singular value matrices S α S_\alpha S α become general non-diagonal complex matrices . This leads to a distinct operational treatment in the forward and backward passes:
Finally, we note that by examining the variations of Eqs. (76) to (78) up to first order, we recover the expressions for the derivative of truncated SVD from [29 ] , but crucially without the divergent terms.
Benchmarks
Finally, we benchmark the implicit differentiation approach presented above, against both the fixed-point differentiation scheme and a straightforward application of reverse-mode AD. The benchmarks were carried out by extending the existing implementations of CTMRG and boundary MPS contractions in the PEPSKit.jl [43 ] and MPSKit.jl [44 ] software packages with implicit differentiation functionality. The underlying tensor operations and symmetry capabilities are supported via TensorKit.jl [45 ] . All implementations and benchmark data are publicly available in the open-source repository Ref. [46 ] .
We start by considering the accuracy of gradients obtained using the implicit differentiation approach compared to gradients resulting from straightforward “black-box” reverse-mode differentiation of Eq. (94) . For well-converged contraction environments, for which the characteristic equations Eq. (14) are satisfied up to high accuracy, we systematically observe that the gradients agree to within the specified linear solver tolerance. In practice, however, it is not always possible or even desirable to fully converge the contraction environment. Therefore, a natural question is how the gradient accuracy depends on the environment convergence. To assess this, Figure 1 shows a comparison of the directional derivative of the PEPS energy density Eq. (6) , computed with both implicit differentiation and black-box reverse-mode differentiation, to a reference value computed using a simple first order finite-difference scheme. We see that, as the environment is converged further, the gradients obtained via implicit differentiation approach the first order finite-difference gradients in the same way as those obtained through straightforward reverse-mode differentiation. This means that even for relatively poorly converged environments, as long as we adapt the linear solver tolerance for Eq. (17) accordingly, the resulting gradient is no less accurate than the one we would obtain with straightforward reverse-mode differentiation. In particular, this level of accuracy may be perfectly adequate during the initial stages of the optimization.
Figure 1. Relative distance Δ \Delta Δ of the directional derivative of the PEPS energy density Eq. (6) computed with implicit differentiation (i) and with black-box reverse-mode differentiation (bb) as in Eq. (94) , to the value obtained using a symmetric first-order finite difference scheme with step size ε = 10 − 3 \varepsilon= 10^{-3} ε = 1 0 − 3 . The differences were averaged over three random PEPS points and directions with D = 3 D = 3 D = 3 and χ = 20 \chi= 20 χ = 20 , and are shown as a function of the convergence tolerance of the contraction algorithm.
Next, we benchmark the computational cost of gradient evaluation using implicit differentiation, as compared to a nested fixed-point differentiation approach, across a range of bond dimensions. Three representative test cases will be considered, namely (i) C 4 v C_{4v} C 4 v CTMRG, (ii) boundary MPS without spatial symmetries on a single-site unit cell, and (iii) CTMRG without spatial symmetries on a non-trivial unit cell. For all test cases, we optimize a PEPS variationally using L-BFGS [32 ] at multiple values of the bond dimension D D D and environment dimension χ \chi χ , storing intermediate checkpoints along the optimization trajectory. For timing the contraction, the environment tensors are initialized using the environment from the previous L-BFGS iteration and are converged up to a tolerance of 10 − 7 10^{-7} 1 0 − 7 in the relevant error measures. The gradient times are obtained by measuring the time required to solve the linear system arising in the gradient computation. In this way, we isolate the dominant computational cost in the reverse pass, while also reducing the effect of implementation details that might bias the benchmarks. The gradient benchmark itself is performed using five moderately converged PEPS along the optimization trajectory, from which we take the median and standard deviation, once using the fixed-point formulation from Eq. (12) and once using the implicit differentiation approach of Eq. (17) . In both cases, the resulting linear problems are solved using GMRES with a convergence tolerance of 10 − 6 10^{-6} 1 0 − 6 . No explicit multi-threading is employed in our implementations. Parallelism is restricted to the underlying BLAS routines, for which 8 CPU cores are allocated. All benchmarks were performed on AMD EPYC 7713 compute nodes.
C4v CTMRG
We first benchmark the case of C 4 v C_{4v} C 4 v -invariant CTMRG, for which we consider the spin-1/2 Heisenberg model
H = ∑ ⟨ i , j ⟩ J x S i x S j x + J y S i y S j y + J z S i z S j z , (87) H = \sum_{\langle i,j\rangle} J_x S_i^x S_j^x + J_y S_i^y S_j^y + J_z S_i^z S_j^z, \tag*{(87)} H = ⟨ i , j ⟩ ∑ J x S i x S j x + J y S i y S j y + J z S i z S j z , (87)
where S i α S_i^\alpha S i α denotes the spin-1/2 operator along the α \alpha α -axis on site i i i . In order to capture the antiferromagnetic correlations of the ground state ( J x , J y , J z ) = ( 1 , 1 , 1 ) (J_x,J_y,J_z) = (1,1,1) ( J x , J y , J z ) = ( 1 , 1 , 1 ) in a single-site unit cell ansatz, we perform a unitary − 2 i S y -2iS^y − 2 i S y sublattice rotation [20 ] , amounting to a change in the parameters to ( J x , J y , J z ) = ( − 1 , 1 , − 1 ) (J_x,J_y,J_z) = (-1,1,-1) ( J x , J y , J z ) = ( − 1 , 1 , − 1 ) .
We evaluate the relative computational performance of the fixed-point and implicit differentiation approaches by computing the speedup t f i x e d − p o i n t / t i m p l i c i t t_{\mathrm{fixed-point}}/t_{\mathrm{implicit}} t fixed − point / t implicit . As shown in Figure 2 , we consistently observe improved performance of implicit differentiation, with the speedup generally increasing with the total number of parameters.
Figure 2. Speedup t f i x e d - p o i n t / t i m p l i c i t t_{\mathrm{fixed\text{-}point}}/t_{\mathrm{implicit}} t fixed - point / t implicit of the implicit differentiation approach over fixed-point differentiation, obtained from timing the gradient linear problem convergence for C 4 v C_{4v} C 4 v -invariant CTMRG on the Heisenberg model of Eq. (87) .
When comparing the times t l i n s o l v e t_{\mathrm{linsolve}} t linsolve required to solve the linear problem of the gradient evaluation to the C 4 v C_{4v} C 4 v CTMRG contraction times t c o n t r a c t t_{\mathrm{contract}} t contract , we find that both differentiation approaches exhibit subleading computational complexity relative to the dominant contraction cost, as shown in Figure 3 . Here we note that the CTMRG contraction steps are performed using a full eigh decomposition to obtain consistent scaling behavior. That means that, since we do not utilize sparse eigensolvers, the CTMRG contraction cost may be particularly high at larger dimensions. Nevertheless, the implicit differentiation method displays improved scaling with respect to the nested fixed-point approach, leading to increasing computational advantages with growing bond dimensions.
Figure 3. Gradient linear problem convergence times t l i n s o l v e t_{\mathrm{linsolve}} t linsolve , normalized by the C 4 v C_{4v} C 4 v -invariant CTMRG contraction time t c o n t r a c t t_{\mathrm{contract}} t contract , for both the implicit and fixed-point differentiation approaches on the Heisenberg model. We plot the data as a function of the matrix dimension of the D 2 χ × D 2 χ D^{2}\chi\times D^{2}\chi D 2 χ × D 2 χ -dimensional enlarged corner from Eq. (22) on a log-log scale.
While we do observe overall increased performance, we note that the precise gradient timings are partially implementation-dependent. Since the performance of the fixed-point gradient evaluation is strongly influenced by the specific realization of the pullback of the truncated eigh decomposition, we ensure conservative estimates by using a GMRES solver for solving the Sylvester equation therein [47 ] . Moreover, we observe that the contraction and gradient linear problem convergence dynamics may fluctuate across the optimization trajectory, making it difficult to control uniformly across values of D D D and χ \chi χ . We mitigate this effect by averaging the timings over several moderately optimized checkpoints.
Single-site boundary MPS
We proceed by benchmarking gradient computations for the boundary MPS contraction algorithm in the absence of spatial symmetries. Specifically, we compare the implicit differentiation technique of Section IV B with a fixed-point differentiation approach using the iterating function of Section IV A. As before, we consider the Heisenberg model of Eq. (87) using a single-site unit-cell ansatz, and obtain the benchmarks following the same procedure as in the previous section.
Considering the relative computational speedup t f i x e d - p o i n t / t i m p l i c i t t_{\mathrm{fixed\text{-}point}}/t_{\mathrm{implicit}} t fixed - point / t implicit , we observe a clear speedup of implicit differentiation over the fixed-point approach, as shown in Figure 4 . The magnitude of the speedup is comparable to that observed for C 4 v C_{4v} C 4 v -symmetric CTMRG in Figure 2 and again generally increases with the number of variational parameters.
Figure 4. Speedup t f i x e d - p o i n t / t i m p l i c i t t_{\mathrm{fixed\text{-}point}}/t_{\mathrm{implicit}} t fixed - point / t implicit of the implicit over the fixed-point gradient linear problem, for boundary MPS without spatial symmetries on the sublattice-rotated Heisenberg model.
We also observe increased performance in the comparison between gradient linear solving times and contraction times shown in Figure 5 . In particular, as opposed to the fixed-point approach, the cost of the boundary MPS
Figure 5. Times for solving the gradient linear problem, normalized by the boundary MPS contraction time, for both the fixed-point and implicit gradient on the Heisenberg model. The data is shown on a log-log scale as a function of the combined dimension D 2 χ D^{2}\chi D 2 χ as before.
contraction generally outweighs the gradient computation in the implicit scheme. We note, however, that the ratio between gradient and contraction times fluctuates substantially across the dimensions considered. This can be partially attributed to the convergence dynamics of VUMPS-based boundary MPS contractions, which are typically more sensitive to the initial guess and may exhibit more erratic behavior along the optimization trajectory.
CTMRG on non-trivial unit cells
In the final benchmark setup, we consider CTMRG in the absence of spatial symmetries and with a non-trivial unit cell. To this end, we study the Fermi–Hubbard model on the square lattice,
H = − t ∑ ⟨ i , j ⟩ , σ ( c ^ i σ † c ^ j σ + h . c . ) + U ∑ i n ^ i ↑ n ^ i ↓ − μ ∑ i n ^ i (88) H=-t\sum_{\langle i,j\rangle,\sigma}\left(\hat{c}^{\dagger}_{i\sigma}\hat{c}_{j\sigma}+h.c.\right)+U\sum_i\hat{n}_{i\uparrow}\hat{n}_{i\downarrow}-\mu\sum_i\hat{n}_i \tag*{(88)} H = − t ⟨ i , j ⟩ , σ ∑ ( c ^ iσ † c ^ j σ + h . c . ) + U i ∑ n ^ i ↑ n ^ i ↓ − μ i ∑ n ^ i (88)
where c ^ i σ \hat{c}_{i\sigma} c ^ iσ denotes the fermionic annihilation operator for spin σ ∈ { ↑ , ↓ } \sigma\in\{\uparrow,\downarrow\} σ ∈ { ↑ , ↓ } at site i i i , n ^ i σ \hat{n}_{i\sigma} n ^ iσ is the corresponding number operator, and n ^ i = n ^ i ↑ + n ^ i ↓ \hat{n}_i=\hat{n}_{i\uparrow}+\hat{n}_{i\downarrow} n ^ i = n ^ i ↑ + n ^ i ↓ . The optimizations are performed at half-filling and U / t = 8 U/t=8 U / t = 8 , using an iPEPS ansatz with a 2 × 2 2\times2 2 × 2 unit cell in order to capture the antiferromagnetic correlations present in the model. Furthermore, we impose an internal Z 2 × U ( 1 ) \mathbb{Z}_2\times\mathrm{U}(1) Z 2 × U ( 1 ) symmetry on all tensors throughout the optimization and benchmarking procedures. Using moderately optimized PEPS states, we perform the benchmarks following the same protocol as in the previous sections.
As before, we compare the computational performance of the fixed-point and implicit differentiation approaches by considering the ratio $t_{\mathrm{fixed\mathchar-point}}/t_{\mathrm{implicit}}$ of their respective gradient linear-solving times. The results are shown in {xref}Fig. 6. In contrast to the previous benchmark scenarios, implicit differentiation does not consistently outperform the fixed-point approach. A speedup only begins to emerge at comparatively large bond and environment dimensions, whereas for low and moderate dimensions the fixed-point method is typically faster. Nevertheless, the ratio increases systematically with increasing $D$ and $\chi$, as indicated in the inset of {xref}Fig. 6`, suggesting a more favorable asymptotic scaling of the implicit differentiation approach.
To investigate this scaling behavior in more detail, we consider the normalized gradient linear-solving times shown in Figure 7 . Indeed, we clearly observe that implicit differentiation exhibits an improved asymptotic scaling over the fixed-point approach. While the timing curves intersect only at larger values of D 2 χ D^2\chi D 2 χ , suggesting a constant overhead in the implementation of the implicit approach, we do observe improved performance at higher dimensions. Since in practical settings the differentiation techniques benchmarked here are employed together with sparse matrix decompositions that become performant only at high D D D and χ \chi χ , the implicit scheme incurs a speedup in relevant scenarios with the computational cost dropping below that of the contraction. We note that, as in Section VI A, conservative estimates are ensured by using a preconditioned iterative method to solve the coupled Sylvester equations appearing in the pullback of the truncated SVD that is present in the fixed-point CTMRG gradient.
Figure 7. Fixed-point and implicit gradient linear-solving times, normalized by the CTMRG contraction time, on the Fermi-Hubbard model. The data is plotted on a log-log scale as a function of the combined dimension D 2 χ D^2\chi D 2 χ .
Figure 6. Ratio of the fixed-point and implicit gradient linear-solving times for CTMRG without spatial symmetries on the Fermi-Hubbard model. The inset shows the combined data on a log-log scale as a function of the total matrix dimension D 2 χ D^2\chi D 2 χ of the half-infinite environment in Eq. (63) , indicating the asymptotic scaling in the total number of parameters.
Conclusion
In this manuscript, we have developed a new universal framework for differentiating tensor network algorithms. It is based on implicit function differentiation and hence decouples the specific PEPS contraction algorithms from the differentiable functions that characterize their outputs. Instead of differentiating the contraction subroutines directly, either via straightforward backpropagation or fixed-point differentiation, we differentiate sets of algebraic equations that fully characterize the output of these contraction algorithms. This paradigm shift makes tensor network programming much simpler, more modular, and more stable, as it avoids the need to differentiate through often unstable subroutines. Furthermore, as demonstrated by benchmarks, our method provides a measurable speed-up and improved asymptotic scaling over existing techniques while maintaining the ability to “warm-start” calculations by using initial guesses from previous iterations.
Although we have demonstrated this approach for three of the most common contraction schemes, the core idea presented in Algorithm 1 and Algorithm 2 is independent of the specific details and can be applied to other tensor network algorithms, or more generally, to any optimization problem in which the final result can be expressed in terms of differentiable optimality conditions. Moreover, once the basic ingredients of Algorithm 1 and Algorithm 2 have been implemented for a given optimization problem, it is straightforward to experiment with different sets of algebraic characteristic equations to improve performance, modifying at most the input variables y y y and their adjoints y ~ \tilde{y} y ~ .
It is an interesting direction for future work to investigate whether more efficient or more compact sets of equations exist for the examples presented in this manuscript. For instance, this includes alternative formulations for the C 4 v C_{4v} C 4 v symmetric environment [39 ] . Although we have focused primarily on ground-state optimization, our method is applicable in a much broader context. In particular, it would be interesting to apply it to the excitation ansatz [21 , 48 ] .
Acknowledgments
We acknowledge inspiring discussions with Gleb Fedorovich, Wei Tang, Laurens Vanderstraeten, and Xingyu Zhang. We are grateful to the authors of Ref. 39 for useful discussions and coordinating our submissions. L.B. and J.H. are supported by the European Union’s Horizon 2020 research and innovation programme through Grant No. 101125822 (ERC-CoG GaMaTeN). P.B. is supported by the European Union’s Horizon 2020 research and innovation programme through Grant No. 863476 (ERC-CoG SEQUAM). This research was funded in part by the Austrian Science Fund (FWF), Grant DOI: 10.55776/ESP306 (A.F.). L.D. is supported by the Flatiron Institute. The Flatiron Institute is a division of the Simons Foundation. F.V. acknowledges funding from the UKRI grant EP/Z003342/1, BOFGOA (Grant No. BOF23/GOA/021), EOS (Grant No. 40007526) and IBOF (Grant No. IBOF23/064). Early stages of this work were performed in MATLAB with the help of the ncon function [49 ] for tensor contractions. A.F. and B.V. are grateful to the Mathworks team for their assistance with certain undocumented aspects of the dlfeval functionality. The computational results have been achieved using the Austrian Scientific Computing (ASC) infrastructure.
Author Contributions
F.V. conceptualized and implemented the initial idea of implicit differentiation of contraction algorithms based on a single set of algebraic characteristic equations in the context of the C 4 v C_{4v} C 4 v symmetric systems. A.F. and B.V. formulated the characteristic equations for C 4 v C_{4v} C 4 v CTMRG and boundary MPS contractions of Sections IIIB and IVB, after which L.B. adapted this approach to formulate the characteristic equations for asymmetric CTMRG of Section VB. L.B. and P.B. wrote the implementation of implicit differentiation for the different contraction schemes used in the benchmarks, which can be found in Ref. 46. J.H. and L.D. developed the framework for AD of (symmetric) tensor operations underlying all implementations of Ref. 46, and wrote stable implementations of the differentiation rules for various numerical routines used in this work. L.B. and A.F. wrote the manuscript, while P.B. performed the numerical benchmarks. All authors contributed to discussions, manuscript revisions, and approved the final version of the manuscript.
Automatic differentiation and PEPS optimization
In this Appendix we review the basic concepts of reverse-mode AD, and how it can be applied to the variational optimization of PEPS.
Automatic differentiation in a nutshell
Consider a set of variational parameters p p p , which we can interpret as an n n n -component complex vector p ∈ C n p \in\mathbb{C}^{n} p ∈ C n . A real-valued cost function e e e of the complex parameters p p p is given by a map e : C n → R e:\mathbb{C}^{n}\to\mathbb{R} e : C n → R . We can take derivatives of such a cost function with respect to the complex variables p p p using the formalism of Wirtinger derivatives. Namely, for a complex scalar variable z = x + i y z=x+iy z = x + i y , we denote
∂ z = 1 2 ( ∂ ∂ x − i ∂ ∂ y ) , ∂ z ˉ = 1 2 ( ∂ ∂ x + i ∂ ∂ y ) . (89) \partial_z=\frac{1}{2}\left(\frac{\partial}{\partial x}-i\frac{\partial}{\partial y}\right),\qquad\partial_{\bar z}=\frac{1}{2}\left(\frac{\partial}{\partial x}+i\frac{\partial}{\partial y}\right). \tag*{(89)} ∂ z = 2 1 ( ∂ x ∂ − i ∂ y ∂ ) , ∂ z ˉ = 2 1 ( ∂ x ∂ + i ∂ y ∂ ) . (89)
If we consider a specific trajectory p ( t ) p(t) p ( t ) of our variational degrees of freedom parametrized in terms of a single dummy variable t t t , we can use the chain rule to write the directional derivative of the cost function as
e ˙ = ∑ k ( ( ∂ p k e ) p ˙ k + ( ∂ p ˉ k e ) p ˉ ˙ k ) = 2 Re ( ∑ k ∂ p k e p ˙ k ) = 2 Re ⟨ p ~ , p ˙ ⟩ . (90) \begin{aligned}
\dot e=\sum_k\left((\partial_{p_k}e)\dot p^k+(\partial_{\bar p_k}e)\dot{\bar p}^k\right) \\
&=2\operatorname{Re}\left(\sum_k\partial_{p_k}e\,\dot p^k\right)=2\operatorname{Re}\langle\tilde p,\dot p\rangle. \tag*{(90)}
\end{aligned} e ˙ = k ∑ ( ( ∂ p k e ) p ˙ k + ( ∂ p ˉ k e ) p ˉ ˙ k ) = 2 Re ( k ∑ ∂ p k e p ˙ k ) = 2 Re ⟨ p ~ , p ˙ ⟩ . (90)
Here, Re ⟨ p ~ , p ˙ ⟩ ≡ Re ( p ~ † p ˙ ) \operatorname{Re}\langle\tilde p,\dot p\rangle\equiv\operatorname{Re}(\tilde p^\dagger\dot p) Re ⟨ p ~ , p ˙ ⟩ ≡ Re ( p ~ † p ˙ ) denotes the real inner product of two complex vectors, and we have relied on ∂ p ˉ k e = ∂ p k e ‾ \partial_{\bar p_k}e=\overline{\partial_{p_k}e} ∂ p ˉ k e = ∂ p k e due to the fact that e e e is real. In this expression, p ˙ \dot p p ˙ denotes the n n n -component complex vector p ˙ \dot p p ˙ with entries given by p ˙ k \dot p^k p ˙ k , and will be referred to as the tangent vector, or just tangent for short. Additionally, we have introduced p ~ \tilde p p ~ as a complex vector with entries given by ∂ p ˉ k e \partial_{\bar p_k}e ∂ p ˉ k e . We will refer to p ~ \tilde p p ~ as the adjoint of p p p , also called a cotangent vector or cotangent for short.
Now consider the case where our cost function computation is naturally interpreted as a two-stage process, where first we map our complex variables to some intermediate representation g ( p ) g(p) g ( p ) using a function g : C n → C m g:\mathbb{C}^{n}\to\mathbb{C}^{m} g : C n → C m , and only then compute the cost function as e ( p ) ≡ e ( g ( p ) ) e(p)\equiv e(g(p)) e ( p ) ≡ e ( g ( p )) , where now we interpret e e e as a map e : C m → R e:\mathbb{C}^{m}\to\mathbb{R} e : C m → R . In this case, we can use the chain rule to find two equivalent expressions for Eq. (A2) as
e ˙ = 2 Re ⟨ g ~ , g ˙ ⟩ = 2 Re ⟨ p ~ , p ˙ ⟩ . (91) \dot e=2\operatorname{Re}\langle\tilde g,\dot g\rangle=2\operatorname{Re}\langle\tilde p,\dot p\rangle. \tag*{(91)} e ˙ = 2 Re ⟨ g ~ , g ˙ ⟩ = 2 Re ⟨ p ~ , p ˙ ⟩ . (91)
Here we have introduced a tangent and adjoint for the intermediate variables g g g in exactly the same way as before.
The basic idea of automatic differentiation is the efficient programmatic use of the chain-rule in evaluating the derivative of a composition of functions as in Eq. (A3). The core idea becomes clear when we consider how to obtain the object we want, the total derivative e ˙ \dot e e ˙ , from the basic objects we have at our disposal, namely the tangent and adjoint that we always “know”. In particular, we always know that the first tangent is t ˙ = d t d t = 1 \dot t=\frac{dt}{dt}=1 t ˙ = d t d t = 1 , and that the final adjoint is e ~ = ∂ e e = 1 \tilde e=\partial_e e=1 e ~ = ∂ e e = 1 . Considering the computational sequence t → p → g → e t\to p\to g\to e t → p → g → e , we could start from t ˙ \dot t t ˙ and push the tangents forward through the sequence to obtain e ˙ \dot e e ˙ . This is called forward mode accumulation . Alternatively, we could start from e ~ \tilde e e ~ and pull it back through the sequence to obtain t ~ = e ~ \tilde t=\tilde e t ~ = e ~ , which is called reverse mode accumulation .
The chain rule teaches us that we can relate tangents and cotangents of different variables through the Jacobian operator . If we formally denote the Jacobian as ∂ p g \partial_p g ∂ p g , we can denote its action on the complex tangent vector p ˙ \dot p p ˙ as g ˙ = ∂ p g p ˙ \dot g=\partial_p g\,\dot p g ˙ = ∂ p g p ˙ . We see that propagating a tangent forward through the computational graph can be performed by applying the Jacobian to a tangent vector on its right, which is commonly referred to as a Jacobian-vector product (JVP). The concrete action of a JVP for a generic non-holomorphic map g g g is given by
g ˙ k = ∑ l ( ( ∂ p l g k ) p ˙ l + ( ∂ p ˉ l g k ) p ˉ ˙ l ) . (92) \dot g^k=\sum_l\left((\partial_{p^l}g^k)\dot p^l+(\partial_{\bar p^l}g^k)\dot{\bar p}^l\right). \tag*{(92)} g ˙ k = l ∑ ( ( ∂ p l g k ) p ˙ l + ( ∂ p ˉ l g k ) p ˉ ˙ l ) . (92)
From this expression, we observe that the Jacobian acts as a real-linear map on the complex vector p ˙ \dot p p ˙ , meaning that it is linear with respect to linear combinations of different tangent vector only when using real expansion coefficients.
To figure out how to pull back adjoints through the computational graph, we can substitute the JVP Eq. (A4) for g ˙ \dot g g ˙ into Re ⟨ g ~ , g ˙ ⟩ \operatorname{Re}\langle\tilde g,\dot g\rangle Re ⟨ g ~ , g ˙ ⟩ and manipulate the expression to establish the equivalence Eq. (A3), Re ⟨ g ~ , g ˙ ⟩ = Re ⟨ g ~ , ∂ p g p ˙ ⟩ = Re ⟨ ( ∂ p g ) † g ~ , p ˙ ⟩ \operatorname{Re}\langle\tilde g,\dot g\rangle=\operatorname{Re}\langle\tilde g,\partial_p g\,\dot p\rangle=\operatorname{Re}\langle(\partial_p g)^\dagger\tilde g,\dot p\rangle Re ⟨ g ~ , g ˙ ⟩ = Re ⟨ g ~ , ∂ p g p ˙ ⟩ = Re ⟨( ∂ p g ) † g ~ , p ˙ ⟩ . We then recognize p ~ = ( ∂ p g ) † g ~ \tilde p=(\partial_p g)^\dagger\tilde g p ~ = ( ∂ p g ) † g ~ , with ( ∂ p g ) † (\partial_p g)^\dagger ( ∂ p g ) † the adjoint of the real-linear Jacobian with respect to the real inner product. This operation is commonly referred to as a vector-Jacobian product (VJP). The concrete action of the VJP is given by
p ~ l = ∑ k [ g ~ k ( ∂ p l g k ) + g ~ k ‾ ( ∂ p ˉ l g k ) ] . (93) \tilde p_l=\sum_k\left[\tilde g_k(\partial_{p^l}g^k)+\overline{\tilde g_k}(\partial_{\bar p^l}g^k)\right]. \tag*{(93)} p ~ l = k ∑ [ g ~ k ( ∂ p l g k ) + g ~ k ( ∂ p ˉ l g k ) ] . (93)
In deriving this expression, we have equated Re ( g ~ k ‾ ( ∂ p l g k ) p ˙ l ) \operatorname{Re}\left(\overline{\tilde g_k}(\partial_{p^l}g^k)\dot p^l\right) Re ( g ~ k ( ∂ p l g k ) p ˙ l ) with Re ( g ~ k ( ∂ p ˉ l g k ) p ˙ l ) \operatorname{Re}\left(\tilde g_k(\partial_{\bar p^l}g^k)\dot p^l\right) Re ( g ~ k ( ∂ p ˉ l g k ) p ˙ l ) , crucially requiring the presence of the real part in the expression Eq. (A3), which can ultimately be traced back to the assumption that the final cost function is real-valued.
The procedure of reverse-mode accumulation can then be summarized as follows. To implement the derivative of a cost function e e e , which is itself a composition of different functions, one only needs to know:
the order in which the functions were applied,
at which value of the parameters the functions were evaluated,
the VJP action p ~ = ( ∂ p g ) † g ~ \tilde p=(\partial_p g)^\dagger\tilde g p ~ = ( ∂ p g ) † g ~ of every function used in the composition.
Points 1. and 2. can be easily handled automatically by any off-the-shelf AD engine. The VJP action in point 3. needs to be manually specified for any function in the sequence that does not have a standard implementation.
Having introduced the notions of JVP, VJP and reverse-mode accumulation, we can take a step back and phrase things a bit more informally. In particular, we will drop all complex conjugates, and generalize our notation from simple vectors in Euclidean vector spaces to generic objects such as tensors or contraction environments. This intuitive informal notation should never lead to inconsistencies, as long as we keep the proper definition Eq. (93) in mind when actually implementing any VJP action [50 ] . We will also informally denote the VJP action p ˙ = ( ∂ p g ) † g ˙ \dot{p} = (\partial_p g)^\dagger\dot{g} p ˙ = ( ∂ p g ) † g ˙ in terms of the actual vector-Jacobian product p ˙ = g ˙ † ∂ p g \dot{p} = \dot{g}^\dagger\partial_p g p ˙ = g ˙ † ∂ p g as a slightly more intuitive notation in the context of conceptual discussions, where we view the action of the adjoint ( ∂ p g ) † (\partial_p g)^\dagger ( ∂ p g ) † as the left action of ∂ p g \partial_p g ∂ p g on a cotangent and we drop all † \dagger † symbols from the notation. This simplified informal notation is systematically used in the main text, as well as in the remainder of this Appendix.
Variational PEPS optimization using AD
Returning to the problem of variational PEPS optimization of § 2 A, we can now discuss how to evaluate the gradient of the energy density Eq. (6) using reverse-mode accumulation. The most straightforward way to evaluate the VJP x ˙ ∂ p x \dot{x}\,\partial_p x x ˙ ∂ p x in Eq. (6) is to examine how the contraction environment is computed in practice. A contraction algorithm computes the environment through an iterative procedure in which an iterating function f f f is applied to an initial guess x 0 x_0 x 0 until convergence is reached, x ∗ = f ( x ∗ , p ) x^* = f(x^*,p) x ∗ = f ( x ∗ , p ) . We call this converged environment x ∗ x^* x ∗ the fixed point of f f f . This gives rise to a sequence of intermediate objects x i x_i x i through the procedure x 1 = f ( x 0 , p ) x_1 = f(x_0,p) x 1 = f ( x 0 , p ) , x 2 = f ( x 1 , p ) x_2 = f(x_1,p) x 2 = f ( x 1 , p ) , … \ldots … , x n − 1 = f ( x n − 2 , p ) x_{n-1} = f(x_{n-2},p) x n − 1 = f ( x n − 2 , p ) , and finally x ∗ ≡ x n = f ( x n − 1 , p ) x^* \equiv x_n = f(x_{n-1},p) x ∗ ≡ x n = f ( x n − 1 , p ) , with n n n the number of steps needed to reach convergence. In this case, we can use the chain rule to write the Jacobian operator ∂ p x \partial_p x ∂ p x in Eq. (7) in terms of derivatives of f f f to obtain
x ˙ ∂ p x = x ˙ ∑ k = 1 n ( ∏ m = 1 k − 1 ∂ x f ( x n − m , p ) ) ∂ p f ( x n − k , p ) . (94) \dot{x}\,\partial_p x = \dot{x}\sum_{k=1}^{n}\left(\prod_{m=1}^{k-1}\partial_x f(x_{n-m},p)\right)\partial_p f(x_{n-k},p). \tag*{(94)} x ˙ ∂ p x = x ˙ k = 1 ∑ n ( m = 1 ∏ k − 1 ∂ x f ( x n − m , p ) ) ∂ p f ( x n − k , p ) . (94)
As long as we make sure that an AD engine can compute the basic derivatives ∂ x e \partial_x e ∂ x e and ∂ p e \partial_p e ∂ p e , as well as the VJP actions of ∂ x f \partial_x f ∂ x f , ∂ p f \partial_p f ∂ p f , we can use reverse-mode AD to automatically evaluate this expression by backpropagating the intermediate adjoints x ˙ k \dot{x}_k x ˙ k through all n n n iterations of f f f according to Eq. (94) . While this straightforward AD-based approach to PEPS optimization has been very successful, it has several drawbacks and limitations. A first issue is that evaluating Eq. (94) requires different VJP actions evaluated in every iteration of the algorithm. This means that all intermediate objects x k x_k x k need to be stored in memory until the very end of the computation, leading to a significant memory overhead. Second, this approach requires making the entire contraction algorithm differentiable. While this is not a fundamental limitation, ensuring that every subroutine in the contraction algorithm is differentiable in a stable manner can be challenging and time consuming in practice. In particular, the VJP action of certain primitive subroutines, such as singular value decompositions or eigensolvers, can suffer from instabilities that should be irrelevant to the overall energy gradient. To ensure a correct energy gradient, these instabilities need to be addressed in the derivatives of the individual subroutines, often in a heuristic manner.
These issues can be resolved by directly evaluating the VJP action x ˙ ∂ p x \dot{x}\,\partial_p x x ˙ ∂ p x using implicit differentiation. The VJP action corresponding to commonly used contraction algorithms for two-dimensional tensor networks is constructed in Sections III to V.
Differentiation of eigenvalue problems
Consider the eigenvalue equation
A v = λ v (95) A v = \lambda v \tag*{(95)} A v = λ v (95)
where λ \lambda λ is for example specified as an extremal eigen-value, and which we assume non-degenerate for simplicity. Let us denote the corresponding left eigenvector as w w w , i.e. A † w = λ w A^\dagger w = \lambda w A † w = λ w , with w = v w = v w = v if A A A is self-adjoint. If we consider both λ \lambda λ and v v v as functions of A A A , we can try to compute their tangents λ ˙ \dot{\lambda} λ ˙ and v ˙ \dot{v} v ˙ as a function of A ˙ \dot{A} A ˙ . The defining equation is given by
A ˙ v + A v ˙ = λ ˙ v + λ v ˙ . (96) \dot{A}v + A\dot{v} = \dot{\lambda}v + \lambda\dot{v}. \tag*{(96)} A ˙ v + A v ˙ = λ ˙ v + λ v ˙ . (96)
We thus obtain
λ ˙ = w † A ˙ v . (97) \dot{\lambda} = w^\dagger\dot{A}v. \tag*{(97)} λ ˙ = w † A ˙ v . (97)
but face the well-known problem that v ˙ \dot{v} v ˙ is not uniquely determined, i.e. the linear system
( A − λ I ) v ˙ = A ˙ v − λ ˙ v = − ( I − v w † ) A ˙ v (98) (A-\lambda I)\dot{v} = \dot{A}v-\dot{\lambda}v = -(I-vw^\dagger)\dot{A}v \tag*{(98)} ( A − λ I ) v ˙ = A ˙ v − λ ˙ v = − ( I − v w † ) A ˙ v (98)
is underdetermined. For a given solution v ˙ \dot{v} v ˙ , so is v ˙ ′ = v ˙ + α v \dot{v}' = \dot{v}+\alpha v v ˙ ′ = v ˙ + α v for arbitrary α ∈ C \alpha\in\mathbb{C} α ∈ C . This freedom originates from the fact that the defining eigenvalue equation does not define v v v uniquely, since v ′ = μ v v'=\mu v v ′ = μv is also a valid solution for every μ ∈ C \mu\in\mathbb{C} μ ∈ C .
Imposing the normalization ∥ v ∥ = 1 \lVert v\rVert=1 ∥ v ∥ = 1 results in the additional tangent condition Re ( v † v ˙ ) = 0 \operatorname{Re}(v^\dagger\dot{v})=0 Re ( v † v ˙ ) = 0 . However, the linear system still admits the freedom v ˙ ′ = v ˙ + γ v \dot{v}'=\dot{v}+\gamma v v ˙ ′ = v ˙ + γ v for γ ∈ R \gamma\in\mathbb{R} γ ∈ R , associated with the phase freedom of v v v . Further extending the tangent condition to v † v ˙ = 0 v^\dagger\dot{v}=0 v † v ˙ = 0 eliminates the freedom completely, i.e. it makes the linear problem for ( λ ˙ , v ˙ ) (\dot{\lambda},\dot{v}) ( λ ˙ , v ˙ ) as a function of A ˙ \dot{A} A ˙ well determined.
Now consider the alternative strategy where we only consider v v v as a function of A A A , determined through the equation
A v − ( v † A v ) v = 0 (99) Av-(v^{\dagger}Av)v=0 \tag*{(99)} A v − ( v † A v ) v = 0 (99)
Clearly, v v v still needs to be an eigenvector for this equation to be satisfied, with λ = v † A v \lambda=v^{\dagger}Av λ = v † A v the associated eigenvalue. Furthermore, projecting this equation onto v † v^{\dagger} v † shows that this equation also contains the normalization condition v † v = 1 v^{\dagger}v=1 v † v = 1 , provided λ ≠ 0 \lambda\ne0 λ = 0 . However, for a given v v v , v ′ = e i θ v v'=e^{i\theta}v v ′ = e i θ v with θ ∈ R \theta\in\mathbb{R} θ ∈ R is also a solution.
The resulting linear problem for the tangent v ˙ \dot{v} v ˙ is given by
A ˙ v + A v ˙ − ( v ˙ † A v ) v − ( v † A ˙ v ) v − ( v † A v ˙ ) v − λ v ˙ = 0 , \dot{A}v+A\dot{v}-(\dot{v}^{\dagger}Av)v-(v^{\dagger}\dot{A}v)v-(v^{\dagger}A\dot{v})v-\lambda\dot{v}=0, A ˙ v + A v ˙ − ( v ˙ † A v ) v − ( v † A ˙ v ) v − ( v † A v ˙ ) v − λ v ˙ = 0 ,
which can be rewritten as
[ ( 1 − v v † ) A − λ 1 ] v ˙ − λ v ( v ˙ † v ) = − ( 1 − v v † ) A ˙ v . (100) \left[(1-vv^{\dagger})A-\lambda1\right]\dot{v}-\lambda v(\dot{v}^{\dagger}v)=-(1-vv^{\dagger})\dot{A}v. \tag*{(100)} [ ( 1 − v v † ) A − λ 1 ] v ˙ − λ v ( v ˙ † v ) = − ( 1 − v v † ) A ˙ v . (100)
By projecting onto v † v^{\dagger} v † , we find that this equation indeed imposes Re ( v † v ˙ ) = 0 \operatorname{Re}(v^{\dagger}\dot{v})=0 Re ( v † v ˙ ) = 0 as expected, but still admits v ˙ ′ = v ˙ + i γ v \dot{v}'=\dot{v}+i\gamma v v ˙ ′ = v ˙ + iγ v for γ ∈ R \gamma\in\mathbb{R} γ ∈ R as a family of solutions. However, when further restrictions on v v v prohibit the phase freedom, e.g. when v v v takes the form of a Hermitian matrix as in the case of the corner matrix of C 4 v C_{4v} C 4 v , the resulting linear system for the (co)tangents has a unique solution.
Boundary MPS contraction environments
This Appendix contains explicit expressions for the evaluation of the PEPS energy density Eq. (6) using a boundary MPS contraction environment. Here, we only explicitly consider the specific examples of evaluating horizontal and vertical nearest-neighbor two-body interactions O h O_h O h and O v O_v O v respectively. Expectation values of other operators can be evaluated in an analogous way.
If the transfer operator T \mathcal{T} T of the PEPS norm network as defined in Eq. (32) has a Hermitian reflection symmetry, the bottom boundary MPS Eq. (43) is given by the Hermitian conjugate of the top boundary MPS Eq. (35) . In this case the tensors x t = ( A L t , A R t , C t ) x^t=(A_L^t,A_R^t,C^t) x t = ( A L t , A R t , C t ) defining the top boundary MPS Eq. (35) along with the corresponding left and right environments defined in Eqs. (38) and (39) form a complete “symmetric” contraction environment
( A L t , A R t , C t , G L t , G R t ) (A_L^t,A_R^t,C^t,G_L^t,G_R^t) ( A L t , A R t , C t , G L t , G R t )
that can be used to evaluate O h O_h O h and O v O_v O v as [tensor-network diagrams].
A C t = 1 2 ( A L t C t + C t A R t ) . (101) A_C^t=\frac{1}{2}\left(A_L^tC^t+C^tA_R^t\right). \tag*{(101)} A C t = 2 1 ( A L t C t + C t A R t ) . (101)
Here, the auxiliary “center” tensor A C t A_C^t A C t is defined as
Mapping symmetric contraction environments
If T \mathcal{T} T does not have a Hermitian reflection symmetry, computing expectation values additionally requires the bottom MPS tensors x b = ( A L b , A R b , C b ) x^b=(A_L^b,A_R^b,C^b) x b = ( A L b , A R b , C b ) of Eq. (43) as well as the “mixed” environment tensors of Eqs. (44) and (45) . The corresponding “asymmetric” contraction environment
( A L t , A R t , C t , A L b , A R b , C b , G L t , G R t , G L , G R ) (A_L^t,A_R^t,C^t,A_L^b,A_R^b,C^b,G_L^t,G_R^t,G_L,G_R) ( A L t , A R t , C t , A L b , A R b , C b , G L t , G R t , G L , G R )
can be used to evaluate O h O_h O h and O v O_v O v as [tensor-network diagrams]. Eq. (C3)
Here the auxiliary “center” tensor A C b A_C^b A C b is defined as
A C b = 1 2 ( A L b C b + C b A R b ) . (102) A_C^b=\frac{1}{2}\left(A_L^bC^b+C^bA_R^b\right). \tag*{(102)} A C b = 2 1 ( A L b C b + C b A R b ) . (102)
Note that we have chosen not to use the bottom environment tensors G L b G_L^b G L b and G R b G_R^b G R b , obtained from the ( t ↔ b ) (t\leftrightarrow b) ( t ↔ b ) version of Eqs. (38) and (39) , in the latter expression for evaluating the vertical nearest-neighbor interaction. Making the opposite choice and not using G L t G_L^t G L t and G R t G_R^t G R t instead, or even using a combination of both approaches, would give the same results.
Backpropagating through the energy evaluation Eqs. (C1) and (C3), along with the definitions Eqs. (101) and (102) , gives us adjoints of the environment tensors of the symmetric contraction environment
( A ˙ L t , A ˙ R t , C ˙ t , G ˙ L t , G ˙ R t ) (\dot{A}_L^t,\dot{A}_R^t,\dot{C}^t,\dot{G}_L^t,\dot{G}_R^t) ( A ˙ L t , A ˙ R t , C ˙ t , G ˙ L t , G ˙ R t )
and the asymmetric contraction environment
( A ˙ L t , A ˙ R t , C ˙ t , A ˙ L b , A ˙ R b , C ˙ b , G ˙ L t , G ˙ R t , G ˙ L , G ˙ R ) (\dot{A}_L^t,\dot{A}_R^t,\dot{C}^t,\dot{A}_L^b,\dot{A}_R^b,\dot{C}^b,\dot{G}_L^t,\dot{G}_R^t,\dot{G}_L,\dot{G}_R) ( A ˙ L t , A ˙ R t , C ˙ t , A ˙ L b , A ˙ R b , C ˙ b , G ˙ L t , G ˙ R t , G ˙ L , G ˙ R )
respectively. Since we have chosen not to use the environments of the bottom MPS eigenvector in the contraction environment of Eq. (C3), we can always set G ˙ L b = 0 \dot{G}_L^b=0 G ˙ L b = 0 and G ˙ R b = 0 \dot{G}_R^b=0 G ˙ R b = 0 . When using implicit differentiation, the adjoints l ˉ α \bar{l}^{\alpha} l ˉ α and r ˉ α \bar{r}^{\alpha} r ˉ α can be obtained from A ˙ L α \dot{A}_L^{\alpha} A ˙ L α and A ˙ R α \dot{A}_R^{\alpha} A ˙ R α by projecting out the corresponding null spaces V L α V_L^{\alpha} V L α and V R α V_R^{\alpha} V R α respectively, due to Eqs. (47) and (48) .
Appendix D: Mapping symmetric contraction environments
In systems with a C 4 v C_{4v} C 4 v point group symmetry, where the local PEPS tensor satisfies the symmetry conditions Eq. (19) , different contraction algorithms lead to contraction environments that can be interpreted as different equivalent realizations of the solution to an underlying variational problems [35 ] . In this Appendix we discuss how to map these different environments to each other explicitly. In particular, we demonstrate how to obtain a corner tensor C C C , edge tensor E E E and isometry U U U that satisfy the characteristic equations Eqs. (26) and (27) , as well as the additional gauge relation
U = C E C − 1 (103) U = C E C^{-1} \tag*{(103)} U = C E C − 1 (103)
We start by considering the C 4 v C_{4v} C 4 v CTMRG algorithm as introduced in Section III A. After an appropriate gauge-fixing to ensure element-wise convergence, the C 4 v C_{4v} C 4 v algorithm precisely returns a corner C C C , edge E E E and isometry U U U that satisfy Eqs. (26) and (27) . To additionally impose Eq. (103) , we can fix the global phase of the isometry U U U such that
tr ( U † C E C ) = 1. (104) \operatorname{tr}\left(U^{\dagger} C E C\right)=1. \tag*{(104)} tr ( U † C E C ) = 1. (104)
However, aside from the procedure outlined in Section III A, there are other CTMRG-like schemes that result in the same fixed point. In particular, in the forward pass of Algorithm 2, we could equivalently use
The eigh-based C 4 v C_{4v} C 4 v CTMRG algorithm as described in Section III A [14 ] .
The QR-based C 4 v C_{4v} C 4 v CTMRG algorithm as introduced in Ref. 38.
A Krylov-based contraction approach, known as the pulling-through or fixed-point CTMRG algorithm [17 , 51 ] , which is equivalent to the VUMPS algorithm in the presence of a C 4 v C_{4v} C 4 v symmetry.
Crucially, all of these forward schemes converge to the same fixed point, meaning they can use the same characteristic equation in the backwards pass.
To conclude this Appendix, we demonstrate how to transform a symmetric boundary MPS environment ( A L t , A R t , C t , G L t , G R t ) (A_L^t,A_R^t,C^t,G_L^t,G_R^t) ( A L t , A R t , C t , G L t , G R t ) to an environment ( C , E , U ) (C,E,U) ( C , E , U ) that is a root of the characteristic equations of Section III B. First, we diagonalize the center gauge tensor by means of an SVD, C t = U t S t V t C^t = U^t S^t V^t C t = U t S t V t , and absorb the corresponding isometries U t U^t U t and V t V^t V t into the symmetric environment accordingly,
C t ← V t † C t U t † (105) C^t \leftarrow V^{t\dagger} C^t U^{t\dagger} \tag*{(105)} C t ← V t † C t U t † (105)
A L t ← U t A L t U t † (106) A_L^t \leftarrow U^t A_L^t U^{t\dagger} \tag*{(106)} A L t ← U t A L t U t † (106)
A R t ← V t † A R t V t (107) A_R^t \leftarrow V^{t\dagger} A_R^t V^t \tag*{(107)} A R t ← V t † A R t V t (107)
G L t ← U t † G L t (108) G_L^t \leftarrow U^{t\dagger} G_L^t \tag*{(108)} G L t ← U t † G L t (108)
G R t ← G R t V t (109) G_R^t \leftarrow G_R^t V^t \tag*{(109)} G R t ← G R t V t (109)
After this gauge transformation, in the presence of a C 4 v C_{4v} C 4 v symmetry all tensors are all related by Hermitian conjugation up to a global phase. By removing these global phases, we can impose the conditions
A ~ L t = A R t (110) \widetilde{A}_L^t = A_R^t \tag*{(110)} A L t = A R t (110)
G ~ L t = G L t (111) \widetilde{G}_L^t = G_L^t \tag*{(111)} G L t = G L t (111)
G ~ R t = G R t (112) \widetilde{G}_R^t = G_R^t \tag*{(112)} G R t = G R t (112)
In this form, the environment tensor G L t G_L^t G L t and the left isometry A L t A_L^t A L t both define the same MPS. Indeed, they only differ by a real-symmetric gauge transformation X X X that satisfies X 2 = C t X^2=C^t X 2 = C t ,
A L t = X G ~ L t X − 1 . (113) A_L^t = X \widetilde{G}_L^t X^{-1}. \tag*{(113)} A L t = X G L t X − 1 . (113)
The gauge matrix X X X can be found as the leading eigenvector of the mixed A L t − G L t A_L^t-G_L^t A L t − G L t transfer matrix,
X G ~ L t ∝ X G L t . (114) X \widetilde{G}_L^t \propto X G_L^t. \tag*{(114)} X G L t ∝ X G L t . (114)
Fixing the global phase of the eigenvector such that X X X is real-symmetric, we obtain a symmetric environment satisfying Eqs. (103) , (26) and (27) as ( C , E , U ) = ( X , G L t , A L t ) (C,E,U)=(X,G_L^t,A_L^t) ( C , E , U ) = ( X , G L t , A L t ) . Given this environment transformation, we can simply use the characteristic equations of Section III B to compute the energy gradient while using any boundary MPS algorithm [18 , 37 , 40 ] to perform the actual contraction.
In Section IV B we presented optimality conditions F ( y , p ) F(y,p) F ( y , p ) for PEPS contractions using boundary MPS, parametrized in terms of the 12 variables
y = ( l t , r t , C t , G L t , G R t , l b , r b , C b , G L b , G R b , G L , G R ) . y = (l^t,r^t,C^t,G_L^t,G_R^t,l^b,r^b,C^b,G_L^b,G_R^b,G_L,G_R). y = ( l t , r t , C t , G L t , G R t , l b , r b , C b , G L b , G R b , G L , G R ) .
Although evaluating the VJP of the contraction algorithm through a single linear problem is conceptually simple, it can become computationally inefficient as the environment bond dimension χ \chi χ increases.
Here, we present an alternative approach where instead of solving one large linear problem, we decompose it into three smaller linear problems, two of which – for top and bottom MPS – can be solved independently and in parallel. This approach is summarized by the following alternative version of Algorithm 1:
In this scheme, we split the contract routine for calculating the entire environment into 3 subroutines: one for the top boundary MPS x t x^t x t , the bottom boundary MPS x b x^b x b and the mixed environment tensors G L , G R G_L,G_R G L , G R (lines 2-4, respectively). For the backward derivative we parametrize the top boundary MPS in exactly the same way as in Section IV B with y t = ( l t , r t , C t , G L t , G R t ) y^t=(l^t,r^t,C^t,G_L^t,G_R^t) y t = ( l t , r t , C t , G L t , G R t ) fulfilling optimality conditions F t ( y t , p ) F^t(y^t,p) F t ( y t , p ) , namely Eqs. (51) to (55). The same can be done in parallel for bottom MPS with input variables y b = ( l b , r b , C b , G L b , G R b ) y^b=(l^b,r^b,C^b,G_L^b,G_R^b) y b = ( l b , r b , C b , G L b , G R b ) and characteristic equation F b ( y b , p ) F^b(y^b,p) F b ( y b , p ) .
Mixed environment tensors y g = ( G L , G R ) y^g=(G_L,G_R) y g = ( G L , G R ) are obtained as leading eigenvectors of a transfer matrix in Eqs. (44) and (45) that depends on x t x^t x t and x b x^b x b , hence they are treated as functions y g ( x t , x b , p ) y^g(x^t,x^b,p) y g ( x t , x b , p ) . Therefore, in reverse mode AD, the engine must first evaluate the VJP actions of
x ˙ t = y ˘ g ∂ x t y g , x ˙ b = y ˘ g ∂ x b y g (115) \dot{x}^t=\breve{y}^g\partial_{x^t}y^g,\qquad\dot{x}^b=\breve{y}^g\partial_{x^b}y^g \tag*{(115)} x ˙ t = y ˘ g ∂ x t y g , x ˙ b = y ˘ g ∂ x b y g (115)
These contribute to the initial adjoints used for the backward pass through the top and bottom boundary MPS respectively. In practice, this requires first solving an additional linear problem for the leading eigenvalues and eigenvectors of the transfer matrix (see Ref. 52). We stress that it does not lead to a nested linear problem, but three smaller linear problems solved sequentially with possibility of parallelizing the calculation of derivatives of top and bottom MPS.
CTMRG with unit cells
In this Appendix, we expand on Section V B by providing details on how to formulate the corresponding characteristic equations for non-trivial unit cells. While most of the unit cell formulation follows straightforwardly from CTMRG without spatial symmetries on non-trivial unit cells [53 ] , special care needs to be taken to assign the correct unit cell indices to the inverse singular values s α s_\alpha s α as well as the modified square roots s α L s_\alpha^L s α L and s α R s_\alpha^R s α R .
Recall that we label the spatial directions by α \alpha α , with α = 1 , 2 , 3 , 4 \alpha=1,2,3,4 α = 1 , 2 , 3 , 4 corresponding to the north, east, south and west directions, respectively. We use matrix indexing to label the PEPS unit cell elements, where r r r and c c c denote the row and column indices,
Figure F1.
Assuming four spatial directions and an N r × N c N_r\times N_c N r × N c -dimensional unit cell, the spatial index d ∈ Z 4 d\in\mathbb{Z}_4 d ∈ Z 4 and unit cell indices r ∈ Z N r r\in\mathbb{Z}_{N_r} r ∈ Z N r and c ∈ Z N c c\in\mathbb{Z}_{N_c} c ∈ Z N c obey modular arithmetic which will, however, not be denoted separately to reduce notational clutter. With that in mind, we now provide the unit cell indices for Eqs. (74) to (81) where the indices will be explicitly shown for all four spatial directions.
Figure F2.
Table 1. TABLE I. Unit cell indices for Eq. (F2).
E ~ α ∗ = s α , 1 ∗ E α ∗ s α , 2 ∗ (116) \widetilde{E}^{*}_{\alpha}=\sqrt{s^{*}_{\alpha,1}}\,E^{*}_{\alpha}\sqrt{s^{*}_{\alpha,2}} \tag*{(116)} E α ∗ = s α , 1 ∗ E α ∗ s α , 2 ∗ (116)
Table II. Unit cell indices for Eq. Eq. (116) .
Next, we show the indices for the modified projectors from Eqs. Eqs. (72) to (73) . Note that the modified inverse square roots s α L s^{L}_{\alpha} s α L and s α R s^{R}_{\alpha} s α R appear in the open virtual legs of the half-infinite environment in Eq. (63) which needs to be considered when deriving their unit cell indices:
E ~ α − 1 − 1 s α , 1 E ~ α s α , 2 − 1 s α L (117) \widetilde{E}_{\alpha-1}^{-1}s_{\alpha,1}\widetilde{E}_{\alpha}s_{\alpha,2}^{-1}s^{L}_{\alpha} \tag*{(117)} E α − 1 − 1 s α , 1 E α s α , 2 − 1 s α L (117)
Table III. Unit cell indices for Eq. Eq. (117) .
E ~ α + 1 C ~ α + 1 s α , 1 s α , 2 s α + 1 s α (118) \widetilde{E}_{\alpha+1}\widetilde{C}_{\alpha+1}s_{\alpha,1}s_{\alpha,2}s_{\alpha+1}s_{\alpha} \tag*{(118)} E α + 1 C α + 1 s α , 1 s α , 2 s α + 1 s α (118)
Table IV. Unit cell indices for Eq. Eq. (118) .
E ~ α − 1 C ~ α s α − 1 − 1 − λ C α = 0 (119) \widetilde{E}_{\alpha-1}\widetilde{C}_{\alpha}s_{\alpha-1}^{-1}-\lambda C_{\alpha}=0 \tag*{(119)} E α − 1 C α s α − 1 − 1 − λ C α = 0 (119)
Table V. Unit cell indices for Eq. Eq. (119) .
E ~ α P ~ α R − λ E α E ~ α ′ = 0 (120) \widetilde{E}_{\alpha} \widetilde{P}^{R}_{\alpha}-\lambda E_{\alpha}\widetilde{E}'_{\alpha}=0 \tag*{(120)} E α P α R − λ E α E α ′ = 0 (120)
Finally, the characteristic equations for the isometries and singular values as shown in Eqs. (76) to (78) are described mostly by the same unit cell indices, which is why we only show the renormalization of u u u . The other two cases follow analogously:
C ~ α E ~ α , 1 s α , 1 E ~ α , 2 s α , 2 E ~ α , 3 s α , 3 C ~ α + 1 − λ S α u α = 0 (121) \widetilde{C}_{\alpha}\,\widetilde{E}_{\alpha,1}\,s_{\alpha,1}\,\widetilde{E}_{\alpha,2}\,s_{\alpha,2}\,\widetilde{E}_{\alpha,3}\,s_{\alpha,3}\,\widetilde{C}_{\alpha+1}
-\lambda S_{\alpha}u_{\alpha}=0 \tag*{(121)} C α E α , 1 s α , 1 E α , 2 s α , 2 E α , 3 s α , 3 C α + 1 − λ S α u α = 0 (121)
Table VI. Unit cell indices for Eq. (120) .
Table VII. Unit cell indices for Eq. (121) .