Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MM einsum #544

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

MM einsum #544

wants to merge 8 commits into from

Conversation

ziofil
Copy link
Collaborator

@ziofil ziofil commented Jan 22, 2025

This PR adds the mm_einsum function, which is like numpy's einsum but for circuit components. It returns the ansatz of the contraction of the components. It requires users to specify the connectivity of the set of components and it calculates the optimal contraction path. TODO: add a heuristic contraction path finding, in case there are many components (the optimal path finding scales factorially with the number of wires).

@ziofil ziofil added the no changelog Pull request does not require a CHANGELOG entry label Jan 22, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 90.01%. Comparing base (2de68b2) to head (e09b030).

Files with missing lines Patch % Lines
mrmustard/physics/mm_einsum.py 90.00% 8 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #544      +/-   ##
===========================================
- Coverage    90.01%   90.01%   -0.01%     
===========================================
  Files          102      103       +1     
  Lines         6222     6302      +80     
===========================================
+ Hits          5601     5673      +72     
- Misses         621      629       +8     
Files with missing lines Coverage Δ
mrmustard/physics/mm_einsum.py 90.00% <90.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2de68b2...e09b030. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Pull request does not require a CHANGELOG entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant