(self)
return number
Return the numerical value of the qubit.
Return the numerical value of the qubit.
Return the numerical value of the qubit .
def as_int(self):
        """Return the numerical value of the qubit."""
        number = 0
        n = 1
        for i in reversed(self.qubit_values):
            number += n*i
            n = n << 1
        return number
def as_int ( self ) : number = 0 n = 1 for i in reversed ( self . qubit_values ) : number += n * i n = n << 1 return number