def qubits ( self ) : return [ ( v , i ) for k , v in self . qregs . items ( ) for i in range ( v . size ) ]
put all quantifiable variables in a list in python
Return a list of qubits as ( QuantumRegister index ) pairs .
def qubits(self):
        """Return a list of qubits as (QuantumRegister, index) pairs."""
        return [(v, i) for k, v in self.qregs.items() for i in range(v.size)]