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

XIR converter #643

Closed thisac closed 2 years ago

thisac commented 2 years ago

Context: To fully support XIR in SF we need to have a way to convert back and forth between XIR and SF programs.

Description of the Change: Function to be able to convert between XIR and SF programs (both ways) are added.

Benefits: SF supports serializing XIR!

Possible Drawbacks: None

Related GitHub Issues: None

codecov[bot] commented 2 years ago

Codecov Report

Merging #643 (bc9653b) into master (4161918) will increase coverage by 0.00%. The diff coverage is 97.24%.

@@           Coverage Diff            @@
##           master     #643    +/-   ##
========================================
  Coverage   98.28%   98.29%            
========================================
  Files          72       75     +3     
  Lines        8824     9029   +205     
========================================
+ Hits         8673     8875   +202     
- Misses        151      154     +3     
Impacted Files Coverage Δ
strawberryfields/io/blackbird_io.py 93.39% <93.39%> (ø)
strawberryfields/io/utils.py 98.24% <98.24%> (ø)
strawberryfields/io/xir_io.py 98.27% <98.27%> (ø)
strawberryfields/io/__init__.py 100.00% <100.00%> (ø)
strawberryfields/tdm/tdmprogram.py 98.29% <100.00%> (+0.01%) :arrow_up:

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 4161918...bc9653b. Read the comment docs.