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
Reduce average gate fidelity to process fidelity #1788
Reduce average gate fidelity to process fidelity #1788
Conversation
@fhopfmueller If you can merge dev.major into this branch and resolve the conflicts, I can review (I think the conflicts are just with the fixes that you made that got merged into 4.7). |
@fhopfmueller I merged dev.major into your branch, but I ended up dropping most of the |
Thanks a lot for awakening this PR from its slumber @hodgestar ! All the decorator The only test that is included in my original PR, but not after your merge, is Would you like to include that test? On the one hand, it contains copy-pasted code from the previous implementation, so the test isn't exactly elegant. On the other hand, it ensures that the new implementation of this PR gives the same result as the previous correct implementation. I'd favor including it. |
@fhopfmueller Thanks for the help! I've added back the test. I also made a separate commit to remove skipping the tests on Mac OS. Let's see what happens. |
Tests all pass on Mac OS now & the changes look good. Merging. Thanks @fhopfmueller. |
This PR reduces the calculation of average gate fidelity between two quantum channels to the recently merged implementation of process fidelity.
Additional minor change: raise an error when the channel passed to
process_fidelity
does not preserve the Hilbert space dimension of the input state. Previously it gave inconsistent results for that case, for different representations of equivalent channels. It's probably possible to define theprocess_fidelity
andaverage_gate_fidelity
for non-dimension-preserving channels if there is a use case for it? The previous version ofaverage_gate_fidelity
also was not defined for non-dimension-preserving channel.Related issues or PRs
Last part of the changes proposed in #1703. Builds on the implementation of process_fidelity from #1712, #1748.
Changelog
Re-implement average_gate_fidelity using process_fidelity.