XanaduAI / thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.
https://the-walrus.readthedocs.io
Apache License 2.0
99 stars 54 forks source link

Update decompositions.py and readds the Takagi decomposition #363

Closed nquesada closed 1 year ago

nquesada commented 1 year ago

Simplifies the construction of blochmessiah and adds takagi with a very simple elegant implementation derived from http://info.phys.unm.edu/~caves/courses/qinfo-s17/lectures/polarsingularAutonne.pdf .

Note that this implementation of takagi should replace the implementation of takagi in strawberryfields here.

More generally, bloch_messiah and williamson should not remain in sf and instead just be imported from here.

codecov[bot] commented 1 year ago

Codecov Report

Merging #363 (531e8be) into master (d1b4922) will not change coverage. The diff coverage is 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #363 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 27 27 Lines 1891 1927 +36 ========================================= + Hits 1891 1927 +36 ``` | [Impacted Files](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/363?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) | Coverage Δ | | |---|---|---| | [thewalrus/decompositions.py](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/363?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-dGhld2FscnVzL2RlY29tcG9zaXRpb25zLnB5) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/363?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/363?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [d1b4922...531e8be](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/363?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI).
sduquemesa commented 1 year ago

Failing doc build is fixed by merging #364