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

Optimize targeted_left_multiply for onehot operators #5903

Closed
daxfohl opened this issue Oct 3, 2022 · 1 comment
Closed

Optimize targeted_left_multiply for onehot operators #5903

daxfohl opened this issue Oct 3, 2022 · 1 comment
Labels
area/channels area/operators kind/feature-request Describes new functionality triage/discuss Needs decision / discussion, bring these up during Cirq Cynque

Comments

@daxfohl
Copy link
Collaborator

daxfohl commented Oct 3, 2022

Is your feature request related to a use case or problem? Please describe.

Some operator matrices passed to targeted_left_multiply are onehot (times a constant). Kraus components in particular. I could be wrong, but I believe these can be sped up beyond the default einsum implementation.

Plausibly even the _apply_kraus_multi_qubit that calls it could be sped up for onehot operators, as there may be a way to do everything in one step. But I'm even less certain here.

Describe the solution you'd like

Investigate and fix if possible.

What is the urgency from your perspective for this issue? Is it blocking important work?

P3 - I'm not really blocked by it, it is an idea I'd like to discuss / suggestion based on principle

@daxfohl daxfohl added the kind/feature-request Describes new functionality label Oct 3, 2022
@daxfohl daxfohl changed the title Improve targeted_left_multiply for onehot operators Optimize targeted_left_multiply for onehot operators Oct 3, 2022
@viathor viathor added triage/discuss Needs decision / discussion, bring these up during Cirq Cynque area/channels area/operators labels Oct 4, 2022
@daxfohl
Copy link
Collaborator Author

daxfohl commented Oct 11, 2022

Closing since it creates extra overhead in the nominal case.

@daxfohl daxfohl closed this as completed Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/channels area/operators kind/feature-request Describes new functionality triage/discuss Needs decision / discussion, bring these up during Cirq Cynque
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants