Unit Cell Choice and interaction terms in VUMPS

Hello there! I was playing around with the iTensorInfiniteMPS package and I am encountering an issue while trying to perform VUMPS with subspace expansion.

Here is a code block with a very slight modification of the example code from the repository to fit my future use cases.

using ITensors, ITensorMPS
using ITensorInfiniteMPS
using HDF5

base_path = joinpath(pkgdir(ITensorInfiniteMPS), "examples", "vumps", "src")
src_files = ["vumps_subspace_expansion.jl", "entropy.jl"]
for f in src_files
    include(joinpath(base_path, f))
end

# VUMPS Parameters
maxdim = 20
cutoff = 1e-6
max_vumps_iters = 10
tol = 1e-5
outer_iters = 5
time_step = -Inf
solver_tol = (x -> x / 100) 
multisite_update_alg = "parallel"
conserve_qns = false
nsite = 1
localham_type = MPO

# Model Definition
function ITensorInfiniteMPS.unit_cell_terms(::Model"TransverseIsing1D"; λ)
    opsum = OpSum()
    opsum += -λ,"Z",1,"Z",2
    opsum += -(1-λ),"X",1
    return opsum
end

model_params = (λ=0.1,)
initstate(n) = "↑"
s = infsiteinds("S=1/2", nsite; initstate, conserve_szparity=conserve_qns)
ψ = InfMPS(s, initstate)

model = Model"TransverseIsing1D"()

H = InfiniteSum{localham_type}(model, s; model_params...)

vumps_kwargs = (tol=tol, maxiter=max_vumps_iters, solver_tol=solver_tol, multisite_update_alg = multisite_update_alg,)
subspace_expansion_kwargs = (cutoff=cutoff, maxdim=maxdim)

ψ = vumps_subspace_expansion(H, ψ; outer_iters, subspace_expansion_kwargs, vumps_kwargs)

The said modifications I am making is in the function:

function ITensorInfiniteMPS.unit_cell_terms(::Model"TransverseIsing1D"; λ)
    opsum = OpSum()
    opsum += -λ,"Z",1,"Z",2
    opsum += -(1-λ),"X",1
    return opsum
end

and

nsite = 1 # Number of sites per unit cell

where in the example code from the repository uses an XX and Z interactions, and nsite=2

My query results from the fact that when I do use XX and Z interactions, I can safely use the number of sites per unit cell to be 1, and the vumps algorithm works fine. But when I do use my definition of the model, (i.e., ZZ and X), the REPL throws the following error:

ERROR: DimensionMismatch: In scalar(T) or T[], ITensor T is not a scalar (it has indices ((dim=2|id=538|"S=1/2,Site,c=0,n=1")', (dim=2|id=538|"S=1/2,Site,c=0,n=1"), (dim=2|id=538|"S=1/2,Site,c=2,n=1"), (dim=1|id=954|"Link,c=2,l=1"), (dim=2|id=538|"S=1/2,Site,c=2,n=1")', (dim=1|id=954|"Link,c=2,l=1")', (dim=1|id=954|"Link,c=1,l=1"), (dim=1|id=229|"Link,c=1,l=1"), (dim=1|id=229|"Link,c=0,l=1"), (dim=1|id=229|"Link,c=0,l=1")', (dim=1|id=954|"Link,c=1,l=1")', (dim=1|id=229|"Link,c=1,l=1")')).

However, my code works fine only when I set nsite = 2. Any clarity as to why this is the case would be appreciated.

Many Thanks.