Hello, everyone.

I'm working on the spinful Fermi-Hubbard model. I'd like to construct an infinite-temperature state where number of fermions equals to the lattice sites L (so-called half-filling). The number of spin-up and spin-down fermions are flexible with the total number of fermions conserved. I've found the module "PurificationMPS.from_infiniteT_canonical" but I don't know how to set the charge_sector specifically. Could anyone give an specific example to code that? Thanks a lot.

Best,

Amadeus.

## How can I construct a canonical infinite-temperature state with fixed total number of fermions ?

### Re: How can I construct a canonical infinite-temperature state with fixed total number of fermions ?

I guess the answer is a bit late, but for those finding this in the future: it should just work like this:
This should generate a canonical ensemble fixing both charges N (particle number) and Sz (spin).

At the time of writing this (and in version 1.0), there's still a slight bug, though, that we will address in Issue #398.

The case of a single charge works however, i.e. a canonical ensemble fixing only N but not Sz (or vice versa):

Python: Select all

```
In [10]: M = tenpy.FermiHubbardModel(dict(L=10, cons_Sz='Sz', cons_N='N'))
In [11]: M.lat.unit_cell[0].leg.chinfo
Out[11]: ChargeInfo([1, 1], ['N', '2*Sz'])
In [12]: psi = tenpy.PurificationMPS.from_infiniteT_canonical(M.lat.mps_sites, [M.lat.N_sites, 0])
```

At the time of writing this (and in version 1.0), there's still a slight bug, though, that we will address in Issue #398.

The case of a single charge works however, i.e. a canonical ensemble fixing only N but not Sz (or vice versa):

Python: Select all

```
In [18]: M = tenpy.FermiHubbardModel(dict(L=10, cons_Sz=None, cons_N='N'))
In [19]: psi = tenpy.PurificationMPS.from_infiniteT_canonical(M.lat.mps_sites(), [M.lat.N_sites])
```