You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add gradient of textbook fidelity and a test with FD (#573)
* Add gradient of textbook fidelity and a test with FD
* Fix preexisting tests specializes.jl
* Add fidelity2 and fidelity2'
Implement a squared version of the fidelity.
This improves numerical stability for algorithms that intentionally minimize the overlap,
since, in contrast to the existing gradient fidelity',
no division by the overlap occurs in the gradient.
Additionally:
-Implement tests for fidelity2 and fidelity2'
-Add a docstring for fidelity2 and fidelity2' and integrate them into the interface
-Add the internal function pure_state_fidelity2 which uses abs2 instead of abs
The docstrings are concise but reference the fidelity docstring and clarify the differences.
* Fix docstring and clean up tests
* Remove unused circuits in tests
* Let fidelity2 call into fidelity
---------
Co-authored-by: Yanick Kind <[email protected]>
0 commit comments