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
751 stars 187 forks source link

Rectangular gkp #668

Open elib20 opened 2 years ago

elib20 commented 2 years ago

Context: Currently, strawberryfields only supports square lattice GKP states. The simplest more general type of GKP states are rectangular lattice GKP states (instead of peak spacing by sqrt(pi) in q quadrature, it's sqrt(alpha*sqrt(pi)). This allows for, e.g. GKP sensor states.

Description of the Change: Adds the ability to initialize rectangular GKP states to the bosonic and fock backends.

Benefits: Wider class of states to simulate.

Possible Drawbacks:

Related GitHub Issues:

codecov[bot] commented 2 years ago

Codecov Report

Merging #668 (0d6c810) into master (7ee0dd4) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #668   +/-   ##
=======================================
  Coverage   98.29%   98.29%           
=======================================
  Files          75       75           
  Lines        9029     9035    +6     
=======================================
+ Hits         8875     8881    +6     
  Misses        154      154           
Impacted Files Coverage Δ
...trawberryfields/backends/bosonicbackend/backend.py 100.00% <100.00%> (ø)
strawberryfields/backends/fockbackend/backend.py 100.00% <100.00%> (ø)
strawberryfields/backends/fockbackend/circuit.py 98.41% <100.00%> (ø)
strawberryfields/backends/fockbackend/ops.py 95.26% <100.00%> (ø)
strawberryfields/ops.py 98.30% <100.00%> (ø)

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 7ee0dd4...0d6c810. Read the comment docs.