Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scipy > 1.9.3 breaks QuarticFermionicSimulationGate decompose method. #815

Closed
fdmalone opened this issue Apr 20, 2023 · 5 comments
Closed
Assignees

Comments

@fdmalone
Copy link
Collaborator

fdmalone commented Apr 20, 2023

Tracking this here. A bug was introduced into scipy for linalg.sqrtm for complex valued matrices which appears starting v1.10.0 (see #18250). This causes our tests to fail for QuarticFermionicSimulationGate due to loss of precision. I'll pin the scipy dependency to < 1.10.0 for the moment.

@yurivict
Copy link

@fdmalone

Do you know if there is a fix for this?

@fdmalone
Copy link
Collaborator Author

It hasn't been fixed in scipy yet, but there does look to be an open PR. If there's no more activity there we may need to implement our own OR relax our test thresholds. The square root function is only used once in openfermion.

@mpharrigan
Copy link
Collaborator

This is becoming increasingly more of an issue, xref #851 . It's not clear from the linked issue whether there will be a fix or not.

Can we just bump our input precision to complex256?

@fdmalone
Copy link
Collaborator Author

I'll look into it. Worst case we could probably just write a custom square root function.

@fdmalone
Copy link
Collaborator Author

Fixed with #864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants