# Are there methods for returning QN value for an MPS or QN flux for an MPO?

Is there a method that can accept an MPS (where the indices have been defined with quantum numbers) and return the total quantum number of that state, or even the individual quantum number values of the ITensor objects within that state? Similarly, is there a method that can accept an MPO and return its QN flux? I know that you can compute this manually, but it would be nice to have a method that can make sure that it is doing what I intend it to do. I couldn't find such methods when looking through the Julia code on the GitHub page, but it's possible I just missed them.

Yes, if you call flux(psi) where psi is an MPS or flux(H) where H is an MPO it will tell you the total flux of that MPS or MPO.

Best,
Miles

commented by (52.6k points)
commented by (1.1k points)
Thank you so much! Just to be sure, this method works for MPSs and MPOs, but is there not a way to find the QN values for the individual tensors? I ask because it says, "For a tensor network such as an MPS or MPO, the flux is the sum of fluxes of each of the tensors in the network."
commented by (52.6k points)
Yes, you can call flux on each tensor individually too. Actually the implementation of flux(::MPS) is just a loop over the tensors of the MPS, summing the QN's together.
commented by (1.1k points)
OK, thank you so much!
commented by (52.6k points)
I think the version of flux taking an ITensor just isn't documented, currently. We need to do that!