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

fix slow import: only import quimb.tensor when needed #949

Merged
merged 4 commits into from
May 16, 2024

Conversation

anurudhp
Copy link
Contributor

partially addresses #947: reduces import qualtran time from ~3.2s to ~1.4s

@anurudhp
Copy link
Contributor Author

@mpharrigan ptal

@mpharrigan
Copy link
Collaborator

is it accurate to say that the change is only strictly required in controlled.py, since all the other locations aren't actually pulled in when you import qualtran.?

@anurudhp
Copy link
Contributor Author

is it accurate to say that the change is only strictly required in controlled.py, since all the other locations aren't actually pulled in when you import qualtran.?

Yep. The remaining changes speed up import qualtran.bloqs.basic_gates by ~2s.

@mpharrigan mpharrigan merged commit 0c3da85 into quantumlib:main May 16, 2024
7 checks passed
@anurudhp anurudhp deleted the 2024-05-fix-slow-import branch May 16, 2024 23:18
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.

None yet

2 participants