-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
610 mzgate add native support (#617)
* interface [backends] - mzgate * implementation [backends/fockbackend] - mzgate * implementation [compilers/fock] - set mzgate as primitive gate * implementation [ops] - mzgate as primitive _apply method * implementation [backends/tfbackend] - mzgate * test [frontend] - test decomposition of MZgate * requirement [requirements.txt] - require dev version of The Walrus * fix [backends] - fix CodeFactor issues * fix [tests/frontend] - fix comment text * requirement [requirements.txt] - download dev version of The Walrus from wheel * add changes to CHANGELOG * test [backend] - test MZgate operation * fix [changelog] - typo Co-authored-by: Josh Izaac <josh146@gmail.com> * fix [docs/requirements] - use dev version of teh walrus from wheel * refactor [fockbackend/circuit] - remove duplicated code for MZgate and BSgate Both MZgate and BSgate use the same selections rules. This commit implement the same method for both. * fix [doc/requirements] - re-commit: use dev version of the walrus with docs * refactor [fockbackend/circuit] - CodeFactor * Apply suggestions from code review * fix [tfbackend/ops] - fix docstrings fix misleading docstrings for mzgate and two_mode_squeeze * remove breakpoint * test [test_tf_integration] - test_MZ_state_gradients * refactor [test_mzgate_operation] - all tests use initial fock |1,1> state instead of a coherent state * fix [tests/backend] - test_mzgate_operation get the test to catch and fail the malfunctioning mzgate on the tf backend * fix [tfbackend] - circuit: wrong parameter handling fix wrong handling of parameters when batching * impl [integration] - test_MZ_state_gradients implement assertions and refactor test * impl [backend] - test_mzgate_operation implement new test with initial |1,1> fock state checking P_11 and P_02 * fix [tests/backend] - test_mzgate_operation: parameters as list insted of np.array use a list for parametrized tests instead of numpy arrays * Revert "fix [tests/backend] - test_mzgate_operation: parameters as list insted of np.array" This reverts commit aa8a823. The commit does not solve the problem * fix [tests/backend] - test_mzgate_operation: use all_fock_prob use `all_fock_probabilities` instead of `ket` state to do assertions * fix [tests] - mzgate: bypass batched mode Co-authored-by: Josh Izaac <josh146@gmail.com> Co-authored-by: Nicolas Quesada <nicolas@xanadu.ai> Co-authored-by: Nicolas Quesada <zeitus@gmail.com>
- Loading branch information
1 parent
f5b5be6
commit b8f00c1
Showing
14 changed files
with
321 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.