# removeqns(ITensor) in Julia

+1 vote
edited

Hi,

I would like to remove the quantum numbers of ITensors (or MPS) in Julia, so that I can do contractions between MPS with QNs and operators which do NOT have the corresponding quantum symmetry.

I find a similar problem has been solved,

http://itensor.org/support/2320/convert-a-quantum-number-mps-to-a-no-quantum-number-mps

But that function (i.e., removeqns(psi)) with the same name in Julia can only be applied to indices, not ITensors nor MPS.

Best,
Junsen

Hi Junsen,
This is a good question. For the Julia version of ITensor, we are soon planning to implement removeqns for the ITensor level but haven't just yet.

But if what you want for now is to map block sparse ITensors to dense ITensors, you can call the function dense on an ITensor and it will do the behavior that you are wanting.

The plan for removeqns is that it will keep other sparsity (such as diagonal sparsity) while removing QN information. This is in contrast to the dense functiono which removes all sparsity, whether associated with QNs or not.

So in short, please try dense on your ITensors. I'm implementing a version of that you can call directly on an MPS too right now, but with the current version you'll need to call it on each tensor yourself.

Best,
Miles

commented by (46.8k points)
Here's our plan for how dense versus removeqns will behave in the Julia version of ITensor:
https://github.com/ITensor/ITensors.jl/issues/344
commented by (130 points)
Thank you, Miles. This dense function is indeed a workaround for my case!

I am also looking forward to that more advanced 'removeqns' function in the Julia version.