def qubit_to_matrix(qubit, format='sympy'):
 return represent(qubit, format=format)

def qubit_to_matrix ( qubit , format = 'sympy' ) : return represent ( qubit , format = format )
converts an add/mul of qubit objects into its matrix representation this function is the inverse of matrix_to_qubit and is a shorthand for represent .