Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Add support for `MultiControlledU` via `C-U` and `MultiAnd`

Open anurudhp opened this issue 1 year ago • 1 comments

  • [x] Generalize MultiControlledPauli to accept any Bloq U with a single-bit control.
  • [x] Replace MultiControlledX with MultiControlledU(XGate())
  • [ ] Return this as the default in Bloq.controlled()?
  • [x] 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

anurudhp avatar Jul 11 '24 23:07 anurudhp

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

mpharrigan avatar Jul 12 '24 20:07 mpharrigan

this was completed in #1451 and #1456

anurudhp avatar Oct 29 '24 17:10 anurudhp

wooooooo

mpharrigan avatar Oct 30 '24 19:10 mpharrigan