File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9999 @tensor contractcheck= true y2[- 1 - 2 ; - 3 - 4 ] := GL[- 1 7 ; 6 ] * x2[6 5 ; 1 3 ] * O[7 - 2 ; 5 4 ] * O[4 - 4 ; 3 2 ] * GR[1 2 ; - 3 ]
100100 @planar y2′[- 1 - 2 ; - 3 - 4 ] := GL′[- 1 7 ; 6 ] * x2′[6 5 ; 1 3 ] * O′[7 - 2 ; 5 4 ] * O′[4 - 4 ; 3 2 ] * GR′[1 2 ; - 3 ]
101101 @test force_planar (y2) ≈ y2′
102+
103+ # transfer matrix
104+ # ----------------
105+ v = TensorMap (randn, T, Vmps ← Vmps)
106+ v′ = force_planar (v)
107+ @tensor ρ[- 1 ; - 2 ] := x[- 1 2 ; 1 ] * conj (x[- 2 2 ; 3 ]) * v[1 ; 3 ]
108+ @planar ρ′[- 1 ; - 2 ] := x′[- 1 2 ; 1 ] * conj (x′[- 2 2 ; 3 ]) * v′[1 ; 3 ]
109+ @test force_planar (ρ) ≈ ρ′
110+
111+ @tensor ρ2[- 1 - 2 ; - 3 ] := GL[1 - 2 ; 3 ] * x[3 2 ; - 3 ] * conj (x[1 2 ; - 1 ])
112+ @plansor ρ3[- 1 - 2 ; - 3 ] := GL[1 2 ; 4 ] * x[4 5 ; - 3 ] * τ[2 3 ; 5 - 2 ] * conj (x[1 3 ; - 1 ])
113+ @planar ρ2′[- 1 - 2 ; - 3 ] := GL′[1 2 ; 4 ] * x′[4 5 ; - 3 ] * τ[2 3 ; 5 - 2 ] *
114+ conj (x′[1 3 ; - 1 ])
115+ @test force_planar (ρ2) ≈ ρ2′
116+ @test ρ2 ≈ ρ3
102117 end
103118
104119 @testset " MERA networks" begin
You can’t perform that action at this time.
0 commit comments