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

Add support for MultiControlledU via C-U and MultiAnd #1131

Closed
4 tasks done
anurudhp opened this issue Jul 11, 2024 · 3 comments
Closed
4 tasks done

Add support for MultiControlledU via C-U and MultiAnd #1131

anurudhp opened this issue Jul 11, 2024 · 3 comments
Milestone

Comments

@anurudhp
Copy link
Contributor

anurudhp commented Jul 11, 2024

  • Generalize MultiControlledPauli to accept any Bloq U with a single-bit control.
  • Replace MultiControlledX with MultiControlledU(XGate())
  • Return this as the default in Bloq.controlled()?
  • Document: When the user needs $\text{MC-U}^\dagger \cdot V \cdot \text{MC-U}$, they can use MultiAnd to compute the controls, and only uncompute at the end (instead of twice when using MultiControlledU)

Related: #914

@mpharrigan
Copy link
Collaborator

The fallback for Bloq.controlled() returns qualtran.Controlled(subbloq) meta-wrapper. For (3), I'm proposing that we switch the decomposition for Controlled (which right now just does a multi-controlled version of each subbloq) to use an And ladder to produce one control bit, and then do a singly-controlled version of each subbloq

@anurudhp
Copy link
Contributor Author

this was completed in #1451 and #1456

@mpharrigan
Copy link
Collaborator

wooooooo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants