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 188 forks source link

Tidy up (un)rolling #702

Closed thisac closed 2 years ago

thisac commented 2 years ago

Context: Rolling/unrolling/space-unrolling wasn't always working as one might intuitively expect. This PR tweaks the (un)rolling a bit and also fixes a few issues.

Description of the Change:

Benefits: Things look and work better.

Possible Drawbacks: (un)rolling no longer returns the (un)rolled circuit. It only happens in place.

Related GitHub Issues: None

codecov[bot] commented 2 years ago

Codecov Report

Merging #702 (dee6998) into master (1948e33) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #702      +/-   ##
==========================================
+ Coverage   98.69%   98.71%   +0.02%     
==========================================
  Files          75       75              
  Lines        9212     9217       +5     
==========================================
+ Hits         9092     9099       +7     
+ Misses        120      118       -2     
Impacted Files Coverage Δ
strawberryfields/tdm/tdmprogram.py 99.16% <100.00%> (+0.87%) :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 1948e33...dee6998. Read the comment docs.