Hi all,
I am fairly new to ITensor and C++.
Thus if you have any advice that can be easier implemented in Julia I could take it into account, too.
First let me describe the system I am dealing with:
I consider a Bosonic chain of N sites: Boson(N,{"ConserveQNs=",true,"MaxOcc",1})).
I would like to construct the reduced density matrix of the system and project it on a given subspace.
In formulas, given the reduced density matrix @@\rho_A=Tr(|\psi><\psi|)@@
I would like
$$
\rho_A(q)=\frac{P_q \rho_A P_q}{Tr(\rho_A P_q)}
$$
Where @@P_q@@ is the projector on the subspace with a given number of particles
$$
\sum_{i=1}^{l}n_i=q.
$$
Here @@n_i@@ is the number of Bosons at site i and l is the length of the subsystem.
The question is the following: is there a way to do obtain @@\rho_A(q)@@, using IQTensor, without computing explicitly the reduced density matrix and the projector, since it is very inefficient?
I saw in the source code of qutil.h the function getBlock, but I'm not used to C++ and I could not deduce its functionalities.
Thank you for your time.
Best,
Vittorio