Hi all,
I am considering a long-range Hamiltonian with conserved number and I want to time evolve under it an initial product state using the TDVP package. Nonetheless, the state doesn’t change and I think the issue traces back to the initial bond dimension being 1. When the number conservation is off, I manage to increase the bond dimension of the initial state to 2
function increase_bond_dimension!(psi,dimension)
for bond in 1:(length(psi)-1)
bond_index = commonind(psi[bond], psi[bond + 1])
aux = Index(dimension; tags=tags(bond_index))
psi[bond] = psi[bond] * delta(bond_index, aux)
psi[bond + 1] = psi[bond + 1] * delta(bond_index, aux)
end
return psi
end;
(following some code here The equivalent Hamiltonian produces unequal results) and I obtain results in agreement with those for an initial entangled state, which has infidelity 1e-9 to the targeted product state.
I have tried to increase the bond dimension also when the number conservation is on, but I get the following error message
ERROR: LoadError: Attempting to contract IndexSet:
((dim=4|id=427|"Qudit,Site,n=1") <Out>
1: QN("Number",0) => 1
2: QN("Number",1) => 1
3: QN("Number",2) => 1
4: QN("Number",3) => 1, (dim=1|id=376|"Link,l=1") <In>
1: QN("Number",0) => 1)
with IndexSet:
((dim=1|id=376|"Link,l=1") <In>
1: QN("Number",0) => 1, (dim=2|id=77|"Link,l=1"))
QN indices must have opposite direction to contract, but indices:
(dim=1|id=376|"Link,l=1") <In>
1: QN("Number",0) => 1
and:
(dim=1|id=376|"Link,l=1") <In>
1: QN("Number",0) => 1
do not have opposite directions.
and I don’t manage to flip the direction.
I have also tried to use the expand function and/or nsite=2 but I don’t get agreement with the previous results.
Thanks for the help!