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

Fixes to triples.py #430

Closed apchytr closed 4 months ago

apchytr commented 4 months ago

Context: Some calls in triples.py were relying on a call to tf.experimental.numpy.experimental_enable_numpy_behavior() when using a tensorflow backend. This would only be triggered when calling math.kron. As a result, the full test suite would pass but individual tests would fail.

Description of the Change: Changed some .reshape calls to math.reshape.

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 87.80%. Comparing base (31a1f8a) to head (2970a59).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #430 +/- ## ======================================== Coverage 87.80% 87.80% ======================================== Files 81 81 Lines 6230 6230 ======================================== Hits 5470 5470 Misses 760 760 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/430?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/430?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%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/430?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/430?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [31a1f8a...2970a59](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/430?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).