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

Better type handling for `rshift`s #369

Closed SamFerracin closed 8 months ago

SamFerracin commented 8 months ago

Context:

from mrmustard.lab_dev import Coherent

Coherent([0, 1]) >> Coherent([0]).dual

At the moment, the code above returns a CircuitComponent. We want it to return a Ket.

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 88.88889% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.53%. Comparing base (2ee1b98) to head (591ef93).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #369 +/- ## =========================================== - Coverage 86.61% 86.53% -0.08% =========================================== Files 78 78 Lines 5677 5659 -18 =========================================== - Hits 4917 4897 -20 - Misses 760 762 +2 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/369?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) | Coverage Δ | | |---|---|---| | [mrmustard/lab\_dev/transformations/base.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/369?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvdHJhbnNmb3JtYXRpb25zL2Jhc2UucHk=) | `100.00% <100.00%> (ø)` | | | [mrmustard/lab\_dev/states/base.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/369?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvc3RhdGVzL2Jhc2UucHk=) | `95.23% <81.81%> (-1.38%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/369?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/369?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [2ee1b98...591ef93](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/369?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).