"ops" bug with ITensorMPS

Hi!

I started to migrate my code with ITensorMPS and I encountered an error while running the following example from the libraray:

WARNING: both ITensorMPS and ITensors export “ops”; uses of it in module Main must be qualified
ERROR: LoadError: UndefVarError: ops not defined

This error doesn’t appear while only using ITensors library, however, the inner function throws an error in that case.

Is there a way to define these gates with ITensorMPS library?

If you change the line to gates = ITensors.ops(... things should work

For the warning, the line should be @show inner(psi', rho, psi), the inner is missing a prime.

(also it would be helpful if you wanted to open a PR on github to fix these!)

That looks like a bug, the code in your original post should work. I’ll take a look.

Fixing this in Fix `ops` export by mtfishman · Pull Request #26 · ITensor/ITensorMPS.jl · GitHub.

1 Like

The fix is being registered in ITensorMPS.jl v0.2.5, please update your packages and let us know if that fixes your original issue.

Thank you for fixing the bug quickly.
However, I am having trouble with updating to v.0.2.5.
I removed the current version and tried to install it again, I am getting the following error:

(@v1.9) pkg> add ITensorMPS@v0.2.5
Resolving package versions…
ERROR: Unsatisfiable requirements detected for package ITensorMPS [0d1a4710]:
ITensorMPS [0d1a4710] log:
├─possible versions are: 0.1.0-0.2.4 or uninstalled
└─restricted to versions 0.2.5 by an explicit requirement — no versions left

Please try again, I’m able to update to ITensorMPS v0.2.5. You may have just tried too quickly and the registration process hadn’t completed.