Closed ETucks closed 3 years ago
Hi @Etucks --- Your fix seems to break a number of tests. In particular your PR breaks the tests test_fidelity_vac_to_displaced_squeezed
and test_fidelity_squeezed_vacuum
in test_quantum.py
.
This issue is addressed in https://github.com/XanaduAI/thewalrus/pull/226 . I will close this issue.
Looking at the paper from which the fidelity calculation is derived (https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.115.260501), it can be seen that the code was missing a square root in the final step.
Before submitting
Please complete the following checklist when submitting a PR:
[ ] All new features must include a Python unit test, C++ unit test, or both if applicable. If you've fixed a bug or added code that should be tested, add a test to the tests (C++) and thewalrus/tests directory!
[ ] All new Python and C++ code must be clearly commented and documented. Python code is documented using Napolean Google style, and C++ code is documented using Doxygen. If you do make documentation changes, make sure that the docs build and render correctly by running
make docs
.[ ] Ensure that the test suite passes, by running
make test
.[ ] Add a new entry to the
.github/CHANGELOG.md
file, summarizing the change, and including a link back to the PR.[ ] The Walrus source code conforms to PEP8 standards. We check all of our code against Pylint. To lint modified files, simply
pip install pylint
, and then runpylint pennylane/path/to/file.py
.When all the above are checked, delete everything above the dashed line and fill in the pull request template.
Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues: