From c8734f5d501e5b6d7db58188f3d68701b6487cd8 Mon Sep 17 00:00:00 2001 From: qmortier Date: Thu, 20 Jun 2024 21:47:57 +0200 Subject: [PATCH] fix onsites --- test/ctmrg/gradients.jl | 4 ++-- test/pwave.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/ctmrg/gradients.jl b/test/ctmrg/gradients.jl index 36de67e2..7b23ecee 100644 --- a/test/ctmrg/gradients.jl +++ b/test/ctmrg/gradients.jl @@ -102,7 +102,7 @@ function square_lattice_pwave(; t=1, μ=2, Δ=1) # on-site h0 = TensorMap(zeros, ComplexF64, V ← V) block(h0, FermionParity(1)) .= -μ - H0 = NLocalOperator{OnSite}(permute(h0, ((2,),(1,)))) + H0 = NLocalOperator{OnSite}(h0) # two-site (x-direction) hx = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) block(hx, FermionParity(0)) .= [0 -Δ; -Δ 0] @@ -133,7 +133,7 @@ steps = -0.01:0.005:0.01 ## Tests # ------ -@testset "AD CTMRG energy gradients for $(names[i]) model" for i in eachindex(models) +@testset "AD CTMRG energy gradients for $(names[i]) model" for i in eachindex(models) Pspace = Pspaces[i] Vspace = Pspaces[i] Espace = Espaces[i] diff --git a/test/pwave.jl b/test/pwave.jl index 13473d1d..4891ddd8 100644 --- a/test/pwave.jl +++ b/test/pwave.jl @@ -15,7 +15,7 @@ function square_lattice_pwave(; t=1, μ=2, Δ=1) # on-site h0 = TensorMap(zeros, ComplexF64, V ← V) block(h0, FermionParity(1)) .= -μ - H0 = NLocalOperator{OnSite}(permute(h0, ((2,),(1,)))) + H0 = NLocalOperator{OnSite}(h0) # two-site (x-direction) hx = TensorMap(zeros, ComplexF64, V ⊗ V ← V ⊗ V) block(hx, FermionParity(0)) .= [0 -Δ; -Δ 0]