Hi,
I’m wondering if there’s a way to set value (in this case, fixing occupation level and correlations) for a part of a larger system, with block-sparse tensors.
For example, if I have a 100-site Fermionic system, but I would like to set the occupation on site 99 and 100 to be 0.7, 0.3:
I can maybe do something like this:
N = 100
s = siteinds("Fermion", N; conserve_qns = true)
psi1 :: MPS = some_operation(s)
# here, some_operation is done such that expect(psi1, "N")[99] = 1.0, and
# expect(psi1, "N")[100] = 0.0, which is easy to do
psi2 = copy(psi1)
psi = add( sqrt(0.7) * psi1, sqrt(0.3) * psi2)
But 1) AFAIK adding two MPS already involves a lot of approximation/truncation, and it’s not guaranteed to give me the correct result. 2) I’m very limited in setting other observables, for example if I need to set \langle c_{99}^{\dagger}c_{100}\rangle = 0.1 then I don’t know how.
Doing
psi1.data[1].tensor.storage.data = [sqrt(0.7), sqrt(0.3)]
won’t work because it’s immutable.
Is this even doable? it would be nice if I can generate a block-sparse tensor and replace sites 99 and 100 from a correlation matrix (in this case C = [0.7, 0.1; 0.1, 0.3]), but I’m not sure how it can be done