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

Updates docstring and simplifies Williamson #380

Closed nquesada closed 5 months ago

nquesada commented 5 months ago

Simplifies the internal working of Williamson avoiding the calculation of a matrix inverse in the return statement. Moreover corrects the dosctring, which now correctly state that we factorize V = S @ n @ S.T and not V = S.T @ n @ S .

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (0b1af63) 100.00% compared to head (e2a528a) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #380 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 28 28 Lines 1963 1964 +1 ========================================= + Hits 1963 1964 +1 ``` | [Files](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/380?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/380?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/380?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/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [0b1af63...e2a528a](https://app.codecov.io/gh/XanaduAI/thewalrus/pull/380?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).