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

Fix RemoteEngine.run_async kwargs bug, and add test #343

Closed josh146 closed 4 years ago

josh146 commented 4 years ago

Context:

The RemoteEngine.run_async() method had the erroneous line

kwargs = kwargs.update(self._backend_options)

The dict.update method is an in-place method, and returns None, resulting in an incorrectly compiled blackbird program.

Description of the Change:

Benefits:

Possible Drawbacks: n/a

Related GitHub Issues: n/a

codecov[bot] commented 4 years ago

Codecov Report

Merging #343 into master will decrease coverage by 0.03%. The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #343      +/-   ##
==========================================
- Coverage    97.7%   97.67%   -0.04%     
==========================================
  Files          51       51              
  Lines        6354     6355       +1     
==========================================
- Hits         6208     6207       -1     
- Misses        146      148       +2
Impacted Files Coverage Δ
strawberryfields/api/connection.py 97.61% <100%> (-0.09%) :arrow_down:
strawberryfields/engine.py 95.45% <100%> (+0.12%) :arrow_up:
strawberryfields/backends/tfbackend/ops.py 95.74% <0%> (-0.35%) :arrow_down:

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 0c2520e...5353e3a. Read the comment docs.