XanaduAI / MrMustard

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

Porting States to develop #359

Closed SamFerracin closed 8 months ago

SamFerracin commented 8 months ago

Context: Porting all the States in prototype-tn into develop, with the addition of Number.

Note: Please review Number very well as it has not been reviewed in the prototype branch

codecov[bot] commented 8 months ago

Codecov Report

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

Project coverage is 86.14%. Comparing base (45e14b5) to head (3423e0f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #359 +/- ## =========================================== + Coverage 85.90% 86.14% +0.23% =========================================== Files 74 77 +3 Lines 5343 5435 +92 =========================================== + Hits 4590 4682 +92 Misses 753 753 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) | Coverage Δ | | |---|---|---| | [mrmustard/lab\_dev/\_\_init\_\_.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | | | [mrmustard/lab\_dev/states/\_\_init\_\_.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvc3RhdGVzL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [mrmustard/lab\_dev/states/base.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvc3RhdGVzL2Jhc2UucHk=) | `100.00% <100.00%> (ø)` | | | [mrmustard/lab\_dev/states/states.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvc3RhdGVzL3N0YXRlcy5weQ==) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?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/359?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [45e14b5...3423e0f](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/359?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).
SamFerracin commented 8 months ago

Looks good to me.

Only three states here though. Do we have a plan for others? like the squeezed vacuum is something definitely useful in that notebook.

@sylviemonet for sure! I just wanted to get a few states and transformations out to get the ball rolling, but now we can easily add every state and gate that was previously supported