def calc_x_l(self, n, Vsh, sqrt_l, sqrt_r, sqrt_l_inv, sqrt_r_inv): if n > 1: Km1 = self.K[n - 1] Cm1 = self.C[n - 1] Am1 = self.A[n - 1] lm2 = self.l[n - 2] else: Km1 = None Cm1 = None Am1 = None lm2 = None if n < self.N: Ap1 = self.A[n + 1] rp1 = self.r[n + 1] else: Ap1 = None rp1 = None if n <= self.N - self.ham_sites + 1: C = self.C[n] else: C = None if self.ham_sites == 2: x = tm.calc_x_l(Km1, C, Cm1, rp1, lm2, Am1, self.A[n], Ap1, sqrt_l, sqrt_l_inv, sqrt_r, sqrt_r_inv, Vsh) else: assert False, "left gauge-fixing not yet supported for three-site Hamiltonians" return x
def calc_x(self, n, Vsh, sqrt_l, sqrt_r, sqrt_l_inv, sqrt_r_inv, right=True): """Calculate the parameter matrix x* giving the desired B. This is equivalent to eqn. (49) of arXiv:1103.0936v2 [cond-mat.str-el] except that, here, norm-preservation is not enforced, such that the optimal parameter matrices x*_n (for the parametrization of B) are given by the derivative w.r.t. x_n of <Phi[B, A]|Ĥ|Psi[A]>, rather than <Phi[B, A]|Ĥ - H|Psi[A]> (with H = <Psi|Ĥ|Psi>). Direct dependencies: - A[n - 1], A[n], A[n + 1] - r[n], r[n + 1], l[n - 2], l[n - 1] - C[n], C[n - 1] - K[n + 1] - V[n] """ if n > 0: lm2 = self.get_l(n - 2) else: lm2 = None if n < self.N + 1: C = self.C[n] else: C = None if right: x = tm.calc_x(self.K[n + 1], C, self.C[n - 1], self.r[n + 1], lm2, self.get_A(n - 1), self.A[n], self.get_A(n + 1), sqrt_l, sqrt_l_inv, sqrt_r, sqrt_r_inv, Vsh) else: x = tm.calc_x_l(self.K_l[n - 1], C, self.C[n - 1], self.r[n + 1], lm2, self.get_A(n - 1), self.A[n], self.get_A(n + 1), sqrt_l, sqrt_l_inv, sqrt_r, sqrt_r_inv, Vsh) return x
def calc_x(self, n, Vsh, sqrt_l, sqrt_r, sqrt_l_inv, sqrt_r_inv, right=True): """Calculate the parameter matrix x* giving the desired B. This is equivalent to eqn. (49) of arXiv:1103.0936v2 [cond-mat.str-el] except that, here, norm-preservation is not enforced, such that the optimal parameter matrices x*_n (for the parametrization of B) are given by the derivative w.r.t. x_n of <Phi[B, A]|Ĥ|Psi[A]>, rather than <Phi[B, A]|Ĥ - H|Psi[A]> (with H = <Psi|Ĥ|Psi>). Direct dependencies: - A[n - 1], A[n], A[n + 1] - r[n], r[n + 1], l[n - 2], l[n - 1] - C[n], C[n - 1] - K[n + 1] - V[n] """ if n > 0: lm2 = self.get_l(n - 2) else: lm2 = None if n < self.N + 1: C = self.C[n] else: C = None if right: x = tm.calc_x(self.K[n + 1], C, self.C[n - 1], self.r[n + 1], lm2, self.A[n - 1], self.A[n], self.A[n + 1], sqrt_l, sqrt_l_inv, sqrt_r, sqrt_r_inv, Vsh) else: x = tm.calc_x_l(self.K_l[n - 1], C, self.C[n - 1], self.r[n + 1], lm2, self.A[n - 1], self.A[n], self.A[n + 1], sqrt_l, sqrt_l_inv, sqrt_r, sqrt_r_inv, Vsh) return x