XanaduAI / MrMustard

A differentiable bridge between phase space and Fock space
https://mrmustard.readthedocs.io/
Apache License 2.0
78 stars 25 forks source link

QuadratureEigenstate hbar #467

Closed apchytr closed 1 month ago

apchytr commented 1 month ago

Context: When playing around with QuadratureEigenstate and BtoQ I noticed a discrepancy in results by a factor of sqrt(hbar). This introduces the missing hbar.

Description of the Change: Introduced hbar in the computation of c in quadrature_eigenstates_Abc.

Questions: @kaspernielsen96 mentioned fock amplitudes will depend on the value of hbar. Is this what we want?

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 89.20%. Comparing base (7255f25) to head (9f207b3). Report is 7 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #467 +/- ## =========================================== - Coverage 89.22% 89.20% -0.02% =========================================== Files 102 102 Lines 7201 7201 =========================================== - Hits 6425 6424 -1 - Misses 776 777 +1 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/467?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) | Coverage Δ | | |---|---|---| | [mrmustard/physics/triples.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/467?src=pr&el=tree&filepath=mrmustard%2Fphysics%2Ftriples.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3BoeXNpY3MvdHJpcGxlcy5weQ==) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/467/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/467?dropdown=coverage&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/MrMustard/pull/467?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [7255f25...9f207b3](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/467?dropdown=coverage&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).