def test_represent_hadamard():
 circuit = (HadamardGate(0) * Qubit('00'))
 answer = represent(circuit, nqubits=2)
 assert (answer == Matrix([sqrt2_inv, sqrt2_inv, 0, 0]))

def test_represent_hadamard ( ) : circuit = ( HadamardGate ( 0 ) * Qubit ( '00' ) ) answer = represent ( circuit , nqubits = 2 ) assert ( answer == Matrix ( [ sqrt2_inv , sqrt2_inv , 0 , 0 ] ) )
test the representation of the hadamard gate .