Closed josh146 closed 4 years ago
Merging #343 into master will decrease coverage by
0.03%
. The diff coverage is100%
.
@@ 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.
Context:
The
RemoteEngine.run_async()
method had the erroneous lineThe
dict.update
method is an in-place method, and returnsNone
, resulting in an incorrectly compiled blackbird program.Description of the Change:
The line above has been modified to remove the assignment.
A tests has been added to catch this behaviour in future.
The logic in determining the run options has been moved to
RemoteEngine.run_async
, as it makes more logical sense here than as part of theConnection
object.I noticed that SF was not providing a default value for the number of shots in the remote engine. Local engine has
shots=1
by default, but this is because thefock
andtf
backends don't support multishot sampling yet, so isn't as applicable to the remote engine. TheRemoteEngine.run_async
method now raises an error if number of shots is not provided.Benefits:
Fixes a bug
More robust remote engine tests
Possible Drawbacks: n/a
Related GitHub Issues: n/a