@@ -55,34 +55,18 @@ Concretely, this is the overlap of the current state with the single-site deriva
5555\\ epsilon = \\ left|VL ⋅ \\ left(VL^{\\ dagger} ⋅ \\ frac{\\ partial \\ text{above}}{\\ partial AC_{\\ text{pos}}}\\ right)\\ right|
5656```
5757"""
58- function calc_galerkin (
59- pos:: Int , below:: Union{InfiniteMPS, FiniteMPS, WindowMPS} , operator, above, envs
60- )
58+ function calc_galerkin (pos:: Int , below, operator, above, envs)
6159 AC´ = AC_projection (pos, below, operator, above, envs)
6260 normalize! (AC´)
6361 out = mul! (AC´, below. AL[pos], below. AL[pos]' * AC´, - 1 , + 1 )
6462 return norm (out)
6563end
66- function calc_galerkin (
67- pos:: CartesianIndex{2} , below:: MultilineMPS , operator:: MultilineMPO ,
68- above:: MultilineMPS , envs:: MultilineEnvironments
69- )
70- row, col = pos. I
64+ function calc_galerkin (pos:: CartesianIndex{2} , below, operator, above, envs)
65+ row, col = Tuple (pos)
7166 return calc_galerkin (col, below[row + 1 ], operator[row], above[row], envs[row])
7267end
73- function calc_galerkin (
74- below:: Union{InfiniteMPS, FiniteMPS, WindowMPS} , operator, above, envs
75- )
76- return maximum (pos -> calc_galerkin (pos, below, operator, above, envs), 1 : length (above))
77- end
78- function calc_galerkin (
79- below:: MultilineMPS , operator:: MultilineMPO , above:: MultilineMPS ,
80- envs:: MultilineEnvironments
81- )
82- return maximum (
83- pos -> calc_galerkin (pos, below, operator, above, envs),
84- CartesianIndices (size (above))
85- )
68+ function calc_galerkin (below, operator, above, envs)
69+ return maximum (pos -> calc_galerkin (pos, below, operator, above, envs), eachindex (below))
8670end
8771
8872"""
0 commit comments