-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Remove faer usage from quantum_volume #13714
Conversation
As part of Qiskit#13665 this migrates the faer-rs usage in quantum_volume.rs to just use nalgebra instead. The only faer usage there was for the qr decomposition and everything else was done with fixed sized arrays or Array2. This migration is fairly simple but it's a good start towards the goal of eventually removing our faer-rs usage in Qiskit. It might improve performance because we remove one layer of heap allocated objects by moving from Array2 to Matrix4 for rust operations. Although we do need an equivalent heap allocation for generating the numpy arrays used in `UnitaryGate` so it might not really change anything significantly.
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 13169712982Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Not an expert by any means on linear algebra in rust but this change seems straightforward enough.
This is largely duplicated in #13765 but I used nalgebra slightly differently in that PR (I forgot I had this PR open when I wrote it). I'm fine merging this as is, and just rebasing #13765 on top of this. Or we can just close this and move proceed solely with #13765. I'll defer to what you think is best @ElePT. |
This has been superseded by: #13765 |
Summary
As part of #13665 this migrates the faer-rs usage in quantum_volume.rs to just use nalgebra instead. The only faer usage there was for the qr decomposition and everything else was done with fixed sized arrays or Array2. This migration is fairly simple but it's a good start towards the goal of eventually removing our faer-rs usage in Qiskit. It might improve performance because we remove one layer of heap allocated objects by moving from Array2 to Matrix4 for rust operations. Although we do need an equivalent heap allocation for generating the numpy arrays used in
UnitaryGate
so it might not really change anything significantly.Details and comments
Part of #13665