|View source on GitHub|
An object that can be decomposed into operations on given qubits.
cirq.SupportsDecomposeWithQubits( *args, **kwargs )
None means "not decomposable". Otherwise an
operation, list of operations, or generally anything meeting the
contract can be returned.
For example, a SWAP gate can be turned into three CNOTs. But in order to describe those CNOTs one must be able to talk about "the target qubit" and "the control qubit". This can only be done once the qubits-to-be-swapped are known.
The main user of this protocol is
GateOperation, which decomposes itself
by delegating to its gate. The qubits argument is needed because gates are
specified independently of target qubits and so must be told the relevant
SupportsDecompose as long as its gate