i am trying to calculate the ground state energy of a two leg ladder model by DMRG method using ITensor(Julia), but i have some doubts regarding this. the questions are as follows.

a)How to introduce the electron density parameter in the code ? For example : At Half filling of 1D Hubbard model(Spin-1/2 electrons) the electron density is 1/2. ( I know one can calculate total no. of electrons from electron density ,put it in the initial state of the code and keep the filling quantum number fixed, but i am asking can i put the electron density parameter directly in the code?)

b) Is there anyway to calculate the expectation values("Sz" or "Ntot" or anyother ) after each sweep rather then after all sweeps?

Sorry if i have asked very basic questions.

Thanks

Paban