-
Notifications
You must be signed in to change notification settings - Fork 706
Quantum automatic differentiation #8640
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
base: master
Are you sure you want to change the base?
Conversation
- combine inequality checks into one
- Fix inequality
|
One small issue @albi3ro ... Certainly the observables should be given in terms of Paulis... The examples for the Hamiltonians provided and the method discussed to calculate the groupings are also in terms of Paulis, in the table which is really the most relevant piece of the paper to this PR.
|
I think I just needed to make more use of |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8640 +/- ##
==========================================
- Coverage 99.42% 99.42% -0.01%
==========================================
Files 587 587
Lines 61967 61989 +22
==========================================
+ Hits 61612 61633 +21
- Misses 355 356 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@isaacdevlugt I wanted to ask you about this module in terms of documentation, etc. At the moment I have written my function in keeping with the rest of the module i.e. there are dev comments but, as with the other private functions in the module, there is no function docstring. Is this kosher or do we want to update the entire module to have more robust documentation? |




Context: Implementing the quantum automatic differentiation algorithm detailed in this paper from the Quantum Systems Lab at Yale University.
Description of the Change:
We check if we have a work wire -> direct or standard differentiation.
check if we are doing forward or reversed (switch the generator with the measured op) based how many combinations there are. Depends on the combinations of expectations and terms in the Hamiltonian, for example. i.e. if the terms in the Hamiltonian are on different wires we can measure them at the same time, but still need different circuits for the controls, can refer to the hamiltonian’s "grouping indices" list: its length gives the number of shots need for the expectations. See Table III in https://arxiv.org/pdf/2408.05406 for exact formulas.
Benefits: Allows the optimal differentation method to be selected automatially based on the number of shots required and the availability of auxilliary wires.
Possible Drawbacks: Still a Work In Progress (WIP) needing feeback!
Related ShortCut Stories: [sc-103833]