Closed sduquemesa closed 2 years ago
Merging #665 (77dbc29) into master (9e6eff1) will increase coverage by
0.00%
. The diff coverage is98.36%
.
@@ Coverage Diff @@
## master #665 +/- ##
========================================
Coverage 98.34% 98.34%
========================================
Files 75 75
Lines 9041 9163 +122
========================================
+ Hits 8891 9011 +120
- Misses 150 152 +2
Impacted Files | Coverage Δ | |
---|---|---|
strawberryfields/decompositions.py | 99.44% <98.11%> (-0.33%) |
:arrow_down: |
strawberryfields/ops.py | 98.35% <100.00%> (+0.03%) |
: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 9e6eff1...77dbc29. Read the comment docs.
@sduquemesa this is very exciting! :tada: Happy to review if you need an extra pair of eyes.
@sduquemesa this is very exciting! 🎉 Happy to review if you need an extra pair of eyes.
@glassnotes, that'd be wonderful!
Almost there @sduquemesa : https://app.codecov.io/gh/XanaduAI/strawberryfields/compare/665/diff I think what is needed is to also permute the rows of the unitary...
@sduquemesa : the changes in this PR were not updated in the CHANGELOG file. Worth adding them!
Context: The paper "Simple factorization of unitary transformations" proposes a factorization scheme that decomposes elements of SU(n) as a sequence of SU(2) transformations. This sequence of SU(2) transformations can then be mapped to an operation on optical modes including two phase plates and one beam splitter.
Code in this PR is based on Olivia di Matteo's @glassnotes CASPAR implementation.
Description of the Change: This PR implements a new decomposition for unitary matrices U passed to
ops.Interferometer
by expressing them as U = det(U) S and then applying the decomposition here referenced to S.The result is a circuit containing a
Rgate
on each mode (related to the determinant of the unitary U) in addition to the recursive decomposition of the operation.Benefits: This PR implements the factorization above mentioned, hence making all the known (to date) unitary factorizations available on strawberry fields.
Possible Drawbacks: None
Related GitHub Issues: None