# Please do not post # Omar Aceval Garcia, due 2/09/2025. Assignment 4 # UM(alpha, beta, gamma, delta) # Here is code that gives a unitary 2 by 2 matrix from four given real values, alpha through delta # This comes from taking the decomposition given by the book and doing the matrix multiplications: UMabgd := proc(alpha, beta, gamma, delta): return [ [exp(I*(alpha - (beta + delta)/2))*cos(gamma/2), -exp(I*(alpha - (beta + delta)/2))*sin(gamma/2)], [exp(I*(alpha + (beta - delta)/2))*sin(gamma/2), exp(I*(alpha + (beta - delta)/2))*cos(gamma/2)] ]: end: # I checked IsUM(UMabgd(1,2,3,4)) and got back false, but upon adding a "simplify()" to the procedure of IsUM() it returned true. Hooray.