Skip to content

Commit 05c2044

Browse files
authored
Replace InfiniteITensorSum with a more generic parametrized type InfiniteSum{T} (#49)
1 parent 75e761e commit 05c2044

16 files changed

+41
-37
lines changed

examples/vumps/transfer_matrix_spectrum.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ initstate(n) = "↑"
3939
ψ = InfMPS(s, initstate)
4040

4141
# Form the Hamiltonian
42-
H = InfiniteITensorSum(model, s; model_params...)
42+
H = InfiniteSum{MPO}(model, s; model_params...)
4343

4444
# Check translational invariance
4545
@show norm(contract.AL[1:N]..., ψ.C[N]) - contract.C[0], ψ.AR[1:N]...))

examples/vumps/vumps_from_dmrg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ end
6060

6161
= siteinds(ψ∞, Cell(1))
6262

63-
Σ∞h = InfiniteITensorSum(model, s¹; J=J, h=h)
63+
Σ∞h = InfiniteSum{MPO}(model, s¹; J=J, h=h)
6464

6565
ψ∞_opt = vumps(Σ∞h, ψ∞)
6666

examples/vumps/vumps_heisenberg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ initstate(n) = isodd(n) ? "↑" : "↓"
2727
model = Model("heisenberg")
2828

2929
# Form the Hamiltonian
30-
H = InfiniteITensorSum(model, s)
30+
H = InfiniteSum{MPO}(model, s)
3131

3232
# Check translational invariance
3333
@show norm(contract.AL[1:N]..., ψ.C[N]) - contract.C[0], ψ.AR[1:N]...))

examples/vumps/vumps_hubbard_extended.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ model = Model"hubbard"()
3636
@show model, model_params
3737

3838
# Form the Hamiltonian
39-
H = InfiniteITensorSum(model, s; model_params...)
39+
H = InfiniteSum{MPO}(model, s; model_params...)
4040

4141
# Check translational invariance
4242
println("\nCheck translational invariance of initial infinite MPS")

examples/vumps/vumps_ising.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ initstate(n) = "↑"
4242
ψ = InfMPS(s, initstate)
4343

4444
# Form the Hamiltonian
45-
H = InfiniteITensorSum(model, s; model_params...)
45+
H = InfiniteSum{MPO}(model, s; model_params...)
4646

4747
# Check translational invariance
4848
@show norm(contract.AL[1:nsite]..., ψ.C[nsite]) - contract.C[0], ψ.AR[1:nsite]...))

examples/vumps/vumps_ising_extended.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ initstate(n) = "↑"
2929
ψ = InfMPS(s, initstate);
3030

3131
model = Model("ising_extended");
32-
H = InfiniteITensorSum(model, s; J=J, J₂=J₂, h=h);
32+
H = InfiniteSum{MPO}(model, s; J=J, J₂=J₂, h=h);
3333

3434
@show norm(contract.AL[1:N]..., ψ.C[N]) - contract.C[0], ψ.AR[1:N]...));
3535

examples/vumps/vumps_ising_noncontiguous.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ initstate(n) = "↑"
2828
ψ = InfMPS(s, initstate);
2929

3030
model = Model("ising");
31-
H = InfiniteITensorSum(model, s; J=J, h=h);
31+
H = InfiniteSum{MPO}(model, s; J=J, h=h);
3232
#to test the case where the range is larger than the unit cell size
3333
for x in 1:N
3434
temp = MPO(3)

examples/vumps/vumps_localham.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ h = 1.5
2222
model = Model(:ising)
2323

2424
# Form the Hamiltonian
25-
Σ∞h = InfiniteITensorSum(model, s; J=J, h=h)
25+
Σ∞h = InfiniteSum{MPO}(model, s; J=J, h=h)
2626

2727
χ = 6
2828
ψ = InfiniteMPS(s; space=χ)

examples/vumps/vumps_localham_qns.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ energy_finite, ψfinite = dmrg(Hfinite, ψfinite, sweeps)
3131
@show energy_finite / Nfinite
3232

3333
# Form the Hamiltonian
34-
Σ∞h = InfiniteITensorSum(model, s; model_kwargs...)
34+
Σ∞h = InfiniteSum{MPO}(model, s; model_kwargs...)
3535

3636
d = 1
3737
χ = [QN("SzParity", 1, 2) => d, QN("SzParity", 0, 2) => d]

src/ITensorInfiniteMPS.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export Cell,
5050
InfiniteMPS,
5151
InfiniteCanonicalMPS,
5252
InfMPS,
53-
InfiniteITensorSum,
53+
InfiniteSum,
5454
InfiniteMPO,
5555
InfiniteSumLocalOps,
5656
ITensorMap,

0 commit comments

Comments
 (0)