def superposition_basis(nqubits):
 amp = (1 / sqrt((2 ** nqubits)))
 return sum([(amp * IntQubit(n, nqubits)) for n in range((2 ** nqubits))])

def superposition_basis ( nqubits ) : amp = ( 1 / sqrt ( ( 2 ** nqubits ) ) ) return sum ( [ ( amp * IntQubit ( n , nqubits ) ) for n in range ( ( 2 ** nqubits ) ) ] )
creates an equal superposition of the computational basis .