Closed thisac closed 3 years ago
Merging #496 (79df368) into master (98f557a) will increase coverage by
0.00%
. The diff coverage is98.07%
.
@@ Coverage Diff @@
## master #496 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 70 70
Lines 7316 7368 +52
=======================================
+ Hits 7160 7211 +51
- Misses 156 157 +1
Impacted Files | Coverage Δ | |
---|---|---|
strawberryfields/io.py | 96.85% <98.07%> (+0.45%) |
: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 98f557a...79df368. Read the comment docs.
Thanks for the clarification @thisac! The main piece missing for me was that internally we'd already have the numeric values for gate parameters (which actually makes a lot of sense now) and we'd like to convert those numeric values to expressions that contain np.pi
.
[ch1778]
Context: The convert-to-python-code functionality in SF interactive should be moved to SF.
Description of the Change: Added a
generate_code
function toio.py
that generates SF code from aProgram
or aTDMProgram
, returning the code as a string. If an engine is passed, the engine-related code is also serialized.Benefits: It's possible to convert a program/engine into code directly via SF.
Possible Drawbacks: None
Related GitHub Issues: None