0 votes
asked by (120 points)

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
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.


commented by (51.6k points)
Hi Vittorio, yes I think there should be a good way to do this, with mostly tools we have available in the code already. (Yes it would be easier to do some of this with the Julia version since it is more flexible and offers more low-level tools to manipulate QN blocks.)

I assume your state |psi> is an MPS correct?

commented by (120 points)
Yes, It is an MPS.


Please log in or register to answer this question.

Welcome to ITensor Support Q&A, where you can ask questions and receive answers from other members of the community.

Formatting Tips:
  • To format code, indent by four spaces
  • To format inline LaTeX, surround it by @@ on both sides
  • To format LaTeX on its own line, surround it by $$ above and below
  • For LaTeX, it may be necessary to backslash-escape underscore characters to obtain proper formatting. So for example writing \sum\_i to represent a sum over i.
If you cannot register due to firewall issues (e.g. you cannot see the capcha box) please email Miles Stoudenmire to ask for an account.

To report ITensor bugs, please use the issue tracker.