-
Notifications
You must be signed in to change notification settings - Fork 27
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
Faster expectation values #491
Comments
I think this is related to the fact that Fock objects get converted to Bargmann, which might not be the optimal thing to do here (i.e. it's faster to convert the Dgate to fock). |
Here's a modified version of the above code, which generates new states every attempt to rule out speed improvements from caching
|
Here also testing using .to_fock() on the operator. Faster, but still slower than the direct multiplication
|
Before posting a feature request
Feature details
When calculating displacement-operator expectation-values of pure states in the Fock representation, the current implementation is ~10x slower than extracting the vectors and matrices of the state and operator and multiplying them together manually. So it seems something is limiting the speed of the current implementation.
Implementation
If the current method cannot be sped up, one could use bare matrix multiplication:
How important would you say this feature is?
2: Somewhat important. Needed this quarter.
Additional information
No response
The text was updated successfully, but these errors were encountered: