Closed thisac closed 2 years ago
Merging #687 (8b6d019) into master (627b491) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #687 +/- ##
=======================================
Coverage 98.69% 98.69%
=======================================
Files 75 75
Lines 9198 9209 +11
=======================================
+ Hits 9078 9089 +11
Misses 120 120
Impacted Files | Coverage Δ | |
---|---|---|
strawberryfields/device.py | 97.18% <100.00%> (+0.40%) |
:arrow_up: |
strawberryfields/program.py | 100.00% <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 627b491...8b6d019. Read the comment docs.
Context: Currently, there's no check against using different targets in the specification (
Device.target
, orDevice._spec["target"]
) and in the Blackbird layout (target field inDevice.layout
, orBlackbirdProgram.target
). This shouldn't be an issue for the user unless the specification is incorrect, although it's safer to have a check for this at device creation directly.Description of the Change:
Device.assert_spec
static method is added which checks that the target in the layout is the same as the target field in the specification. This check is also performed atDevice
initialization.CircuitError
would be raised.Benefits:
Possible Drawbacks: None
Related GitHub Issues: None