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

Certificate in device #679

Closed thisac closed 2 years ago

thisac commented 2 years ago

Context: The certificate is needed for the TD3 pipeline. It makes sense adding it to the DeviceSpec class (which contains the device specification). This also warrants a name change of the class, calling it Device rather than DeviceSpec(this also makes sense since we've had a tendency to call DeviceSpec objects simply device).

Note: The plan is to later to remove the sf.Device class altogether and only keep the xcc.Device class. Some further changes need to be made for this to work properly, although this would probably be the better solution in the long run, avoiding using multiple abstractions for the same thing.

Description of the Change:

Benefits:

Possible Drawbacks:

Related GitHub Issues: None

codecov[bot] commented 2 years ago

Codecov Report

Merging #679 (f60d9a8) into master (529e97e) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #679   +/-   ##
=======================================
  Coverage   98.33%   98.34%           
=======================================
  Files          75       75           
  Lines        9036     9038    +2     
=======================================
+ Hits         8886     8888    +2     
  Misses        150      150           
Impacted Files Coverage Δ
strawberryfields/program.py 100.00% <ø> (ø)
strawberryfields/tdm/tdmprogram.py 98.29% <ø> (ø)
strawberryfields/__init__.py 95.83% <100.00%> (ø)
strawberryfields/device.py 96.77% <100.00%> (ø)
strawberryfields/engine.py 95.88% <100.00%> (-0.04%) :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 529e97e...f60d9a8. Read the comment docs.