(self)
return len(self.targets)
The total number of qubits this gate acts on.

        For controlled gate subclasses this includes both target and control
        qubits, so that, for examples the CNOT gate acts on 2 qubits.
The total number of qubits this gate acts on.
The total number of qubits this gate acts on .
def nqubits(self):
        """The total number of qubits this gate acts on.

        For controlled gate subclasses this includes both target and control
        qubits, so that, for examples the CNOT gate acts on 2 qubits.
        """
        return len(self.targets)
def nqubits ( self ) : return len ( self . targets )