# Partial Filling in VUMPS

**URL:** <https://itensor.discourse.group/t/partial-filling-in-vumps/1463>\
**Category:** DMRG and Numerical Methods\
**Tags:** dmrg, mps\
**Created:** [February 6, 2024, 4:37pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463 "2024-02-06T16:37:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewkhardy](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/andrewkhardy/32/439_2.png) [@andrewkhardy](https://itensor.discourse.group/u/andrewkhardy)\
**Post date:** [February 6, 2024, 4:37pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/1 "2024-02-06T16:37:38Z")

</div>

I am interested in making an electronic initial MPS state at various filling fractions for VUMPS. The simplest state for half filling that conserves `Sz=0` for example is

```auto
initstate(n) = isodd(n) ? "↑" : "↓"
s = infsiteinds("Electron", N; initstate, conserve_qns)
ψ = InfMPS(s, initstate)

```

If I consider 1/4 filling, I would naively write

```auto
initstate(n) = isodd(n) ? "↑" : "0"
s = infsiteinds("Electron", N; initstate, conserve_qns)
ψ = InfMPS(s, initstate)

```

but this now does not conserve `Sz=0`. Do I need a 4 site unit cell then ? If I wanted filling 1/8 would I then also need 8 sites in order to conserve `Sz=0` ?

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [February 6, 2024, 4:39pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/2 "2024-02-06T16:39:41Z")

</div>

Yes, you would need to use larger unit cells for those fillings.

---

<div class="post-metadata">

**Author:** ![andrewkhardy](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/andrewkhardy/32/439_2.png) [@andrewkhardy](https://itensor.discourse.group/u/andrewkhardy)\
**Post date:** [February 6, 2024, 5:07pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/3 "2024-02-06T17:07:22Z")

</div>

@mtfishman As I understand, the unit cell roughly resembles the width of cylinders in iDMRG. Does this mean that computationally I’m limited to fillings around 1/8th or so?

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [February 6, 2024, 5:09pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/4 "2024-02-06T17:09:21Z")

</div>

If you are using a 1D model (a model with local interactions in 1D) the cost should scale linearly with the unit cell size.

---

<div class="post-metadata">

**Author:** ![andrewkhardy](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/andrewkhardy/32/439_2.png) [@andrewkhardy](https://itensor.discourse.group/u/andrewkhardy)\
**Post date:** [February 6, 2024, 5:24pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/5 "2024-02-06T17:24:15Z")

</div>

Sorry, If I am trying say a 2-leg ladder for example, I’m not clear how to construct a 1/4th filling unit cell as it seems the unit cell size can be used to extend either along the infinitely repeated line or along the new dimension?

---

<div class="post-metadata">

**Author:** ![mtfishman](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/mtfishman/32/11_2.png) [@mtfishman](https://itensor.discourse.group/u/mtfishman)\
**Post date:** [February 6, 2024, 5:30pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/6 "2024-02-06T17:30:55Z")

</div>

For a 2-leg ladder, it would make sense to me to make a 4-site unit cell based on 2 rungs of the ladder.

---

<div class="post-metadata">

**Author:** ![andrewkhardy](https://yyz2.discourse-cdn.com/free1/user_avatar/itensor.discourse.group/andrewkhardy/32/439_2.png) [@andrewkhardy](https://itensor.discourse.group/u/andrewkhardy)\
**Post date:** [March 21, 2024, 8:59pm UTC](https://itensor.discourse.group/t/partial-filling-in-vumps/1463/7 "2024-03-21T20:59:33Z")

</div>

Hi Matt, our solution for this has been to use the following initial state function.

```auto
function InitState(; N::Int64=4, filling::Int64=2, SzTot::Float64=0.0)::Vector{String}
    ##### Filling the state with up and down electrons #####
    Nup = Int((filling + (2 * SzTot)) / 2)
    Ndn = Int((filling - (2 * SzTot)) / 2)
    ##### Choosing random sites to fill the up-electrons and down-electrons #####
    stateUp = state_fill(N, Nup, "Up")
    stateDn = state_fill(N, Ndn, "Dn"; starting = (filling/N) == 1.0 ? 2 : 3)
    state = stateUp .* stateDn
    state = [x == "" ? "Emp" : x for x in state]
    return state
end

```

This seems to work for half-filling (N=4, filling = 4 for example), but for large interaction strengths (J = 5 for a 1D t-J model) for partial filling ( (N=4, filling = 2) , we’re getting the error

```auto
┌ Warning: Right precision error 1.052545211436737 is too high!
└ @ ITensorInfiniteMPS ~/.julia/packages/ITensorInfiniteMPS/v5Lx4/src/vumps_nonlocalham.jl:404
┌ Warning: Left precision error 1.397765999575384 is too high!
└ @ ITensorInfiniteMPS ~/.julia/packages/ITensorInfiniteMPS/v5Lx4/src/vumps_nonlocalham.jl:402
VUMPS iteration 4 (out of maximum 200). Bond dimension = 32, energy = ([-5.313809909935317, -6.956322928281491, -8.465293657965256, -1.723316220609907], [-3.390841907800686, -5.141353622968244, -0.3790025062582366, -6.223079887932087]), ϵᵖʳᵉˢ = 1.397765999575384, tol = 1.0e-6, iteration time = 1.663362496 seconds

```

and the VUMPs does not converge. Do you have a suggestion for going about debugging this? Since it only occurs for large interaction strengths (J = 4.5 does not do it for example).
