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

Improve contract performance #36

Merged
merged 5 commits into from
Oct 26, 2023
Merged

Conversation

PabloAndresCQ
Copy link
Collaborator

This PR changes the way cq.contract is called across mps.py, mps_gate.py and mps_mpo.py so that:

  • Handles of library and device are always passed to them as arguments.
  • When doing a contraction of a small number of tensors, the explicit contraction path is given.

A subset of these changes (in particular, those applying to vdot increased the performance of Mekena's use case on GCP).

Copy link
Contributor

@yapolyak yapolyak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may not have followed the logic of creating all contraction paths closely enough, but I am sure the tests would have caught if there was a mistake anywhere there.

@PabloAndresCQ PabloAndresCQ merged commit d0886c0 into develop Oct 26, 2023
7 checks passed
@PabloAndresCQ PabloAndresCQ deleted the bugfix/vdot_performance branch October 26, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants