XanaduAI / strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
https://strawberryfields.ai
Apache License 2.0
754 stars 191 forks source link

Updates BaseGaussianState to be feature compatible with BaseFockState #407

Closed josh146 closed 4 years ago

josh146 commented 4 years ago

Context: More Fock-basis functionality is available for Gaussian state post-processing thanks to The Walrus. This PR integrates the latest Walrus functionality, elevating the Gaussian state to the same level of functionality as the Fock state.

Description of the Change:

Benefits: The Gaussian state is now feature complete with the Fock state.

Possible Drawbacks: Some of the new functionality is only available in the latest version of The Walrus 0.13.0-dev. Unfortunately, this version of The Walrus breaks Fock gate compatibility. Therefore, this PR branches off #381, as the corresponding Walrus fix has already been implemented there.

Related GitHub Issues: n/a

codecov[bot] commented 4 years ago

Codecov Report

Merging #407 into update_fock_ops will increase coverage by 0.00%. The diff coverage is 100.00%.

@@               Coverage Diff                @@
##           update_fock_ops     #407   +/-   ##
================================================
  Coverage            97.84%   97.84%           
================================================
  Files                   58       57    -1     
  Lines                 6784     6740   -44     
================================================
- Hits                  6638     6595   -43     
+ Misses                 146      145    -1     
Impacted Files Coverage Δ
...awberryfields/backends/gaussianbackend/__init__.py 100.00% <ø> (ø)
strawberryfields/backends/gaussianbackend/ops.py 100.00% <ø> (+2.70%) :arrow_up:
...rawberryfields/backends/gaussianbackend/backend.py 98.56% <100.00%> (-0.11%) :arrow_down:
...fields/backends/gaussianbackend/gaussiancircuit.py 98.09% <100.00%> (-0.38%) :arrow_down:
strawberryfields/backends/states.py 97.41% <100.00%> (+0.31%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update cad48ad...bf66e89. Read the comment docs.