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

Random #442

Closed arsalan-motamedi closed 3 months ago

arsalan-motamedi commented 3 months ago

Context: Adding random methods. Description of the Change: We have Ket.random(modes), DM.random(modes), Unitary.random(modes), Channel.random(modes)

Benefits: Clear: an obvious use case is for writing tests.

Possible Drawbacks: None. Related GitHub Issues: None.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 88.15%. Comparing base (a07bfc1) to head (dc56d2a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #442 +/- ## =========================================== + Coverage 88.05% 88.15% +0.09% =========================================== Files 80 80 Lines 6473 6542 +69 =========================================== + Hits 5700 5767 +67 - Misses 773 775 +2 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/442?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/states/base.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/442?src=pr&el=tree&filepath=mrmustard%2Flab_dev%2Fstates%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvc3RhdGVzL2Jhc2UucHk=) | `96.83% <100.00%> (+0.20%)` | :arrow_up: | | [mrmustard/physics/bargmann.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/442?src=pr&el=tree&filepath=mrmustard%2Fphysics%2Fbargmann.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3BoeXNpY3MvYmFyZ21hbm4ucHk=) | `100.00% <100.00%> (ø)` | | | [mrmustard/lab\_dev/transformations/base.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/442?src=pr&el=tree&filepath=mrmustard%2Flab_dev%2Ftransformations%2Fbase.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL2xhYl9kZXYvdHJhbnNmb3JtYXRpb25zL2Jhc2UucHk=) | `97.67% <93.33%> (-2.33%)` | :arrow_down: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/442?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/442?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [a07bfc1...dc56d2a](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/442?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).