An object that can be decomposed into operations on given qubits.Returning
Nonemeans “not decomposable”. Otherwise anoperation, list of operations, or generally anything meeting the
OP_TREEcontract can be returned.For example, a SWAP gate can be turned into three CNOTs. But in order todescribe 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 areknown.The main user of this protocol is
GateOperation, which decomposes itselfby delegating to its gate. The qubits argument is needed because gates arespecified independently of target qubits and so must be told the relevantqubits. A
SupportsDecomposeas long as its gateimplements
Initialize self. See help(type(self)) for accurate signature.