gate.control() #2804
Labels
status: pending PR
It has one or more PRs pending to solve this issue
type: enhancement
It's working, but needs polishing
Milestone
Enhance the Gate class with a method for controlling it.
This should return a new
ControlledGate
(which derives fromGate
).ControlledGate
class. Existing controlled gates such as CX and CH and CSWAP and CCX should derive from this now. (add ControlledGate class #2862)After this implementation, the following should work:
Follow ups:
notes:
1-
control
currently clashes with a property of the instruction. So let's use theq_if
method for now, with the goal of eventually moving tocontrol
.2- The decomposition should be shallow, in the sense that the controlled gate provides a definition only in terms of controlling its subcomponents. It will be the job of the unroller to take this definition recursively until the end and implement a circuit over U3 and CX.
The text was updated successfully, but these errors were encountered: