DSLValidationError. Like single-qubit gates, multi-qubit gates route automatically to the exact or broad IR path depending on which decorator wraps the calling function. Parametric two-qubit gates (cry, crz) are only available in @parametric and @adaptive programs.
Gate overview
cx
|1⟩. cx is self-inverse.
Allowed in: exact programs, compute blocks.
cz
|1⟩. Equivalent to applying Z then CX, or H · CX · H on the target. cz is self-inverse and symmetric: cz(a, b) == cz(b, a).
Allowed in: exact programs, phase blocks.
swap
swap is self-inverse.
Allowed in: exact programs, compute blocks.
cry
ry(theta) to the target when the control is |1⟩. Parametric — not in the exact gate set.
Allowed in: @parametric and @adaptive programs only.
crz
rz(theta) to the target when the control is |1⟩. Parametric — not in the exact gate set.
Allowed in: @parametric and @adaptive programs only.
ccx
c0 and c1 are |1⟩. ccx is self-inverse and is the canonical three-qubit gate for reversible classical computation.
Allowed in: exact programs, compute blocks.
ccz
|1⟩. ccz is self-inverse and a diagonal gate.
Allowed in: exact programs, phase blocks.
mcx
|1⟩. Requires at least one control wire. mcx generalises cx (one control) and ccx (two controls) to any number of controls.
Allowed in: exact programs, compute blocks.
A sequence of one or more control qubit wires. All wires must be distinct from each other and from
target.mcz
|1⟩. Requires at least one control wire. mcz is a diagonal gate.
Allowed in: exact programs, phase blocks.
A sequence of one or more control qubit wires. All wires must be distinct from each other and from
target.