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

Raise error for complex arguments to Coherent, DisplacedSqueezed and Dgate gates #428

Closed ziofil closed 4 years ago

ziofil commented 4 years ago

Adds warnings if Dgate, S2gate and BSgate use new default values and errors if the arguments are complex.

codecov[bot] commented 4 years ago

Codecov Report

Merging #428 into master will decrease coverage by 5.23%. The diff coverage is 96.65%.

@@            Coverage Diff             @@
##           master     #428      +/-   ##
==========================================
- Coverage   97.84%   92.61%   -5.24%     
==========================================
  Files          58       69      +11     
  Lines        6784     7096     +312     
==========================================
- Hits         6638     6572      -66     
- Misses        146      524     +378     
Impacted Files Coverage Δ
strawberryfields/apps/plot.py 100.00% <ø> (ø)
strawberryfields/apps/train/embed.py 100.00% <ø> (ø)
...awberryfields/backends/gaussianbackend/__init__.py 100.00% <ø> (ø)
strawberryfields/backends/gaussianbackend/ops.py 100.00% <ø> (+2.70%) :arrow_up:
strawberryfields/circuitspecs/circuit_specs.py 100.00% <ø> (ø)
strawberryfields/circuitspecs/gaussian_unitary.py 100.00% <ø> (ø)
strawberryfields/circuitspecs/tensorflow.py 100.00% <ø> (ø)
strawberryfields/backends/fockbackend/ops.py 53.57% <23.52%> (-38.43%) :arrow_down:
strawberryfields/backends/fockbackend/circuit.py 69.23% <56.25%> (-29.20%) :arrow_down:
strawberryfields/backends/fockbackend/backend.py 61.48% <58.33%> (-38.52%) :arrow_down:
... and 54 more

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 69ba1e1...0ccaa9e. Read the comment docs.

antalszava commented 4 years ago