Skip to content

Commit

Permalink
fix onsites
Browse files Browse the repository at this point in the history
  • Loading branch information
qmortier committed Jun 20, 2024
1 parent 559633d commit c8734f5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/ctmrg/gradients.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion test/pwave.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit c8734f5

Please sign in to comment.