Hi Miles. Thank you for the comments. Yes I still has that purpose, but I found that using the member function ".generate" with a random number generator seems will do the job and therefore I removed that part.
I have another reason for the flux function for a particular element but it is more complicated as follows. Given an MPS |psi> with no particle number QN, the overall goal is to 1) project |psi> to a particular particle number, and 2) cast the MPS to have particle-number QN. In the process, I need to cast an ITensor that does not have QN structure but should have a well defined QN, to an ITensor having QN structure. In this step I want to copy the elements based on checking the QN flux of the QN ITensor. I have implemented it by reading the QNs from the indices, but I think it would be very useful if there is a build-in function that gives the QN flux of a particular position. Since when assigning element to a QN ITensor, the code will check the flux for the proposed position, I thought there is already such a function there.
Of course if you have any comment about how to cast an MPS to having QN, it is also very helpful, but I think it would be kind of beyond this question.