@staticmethod<EOL><INDENT>def compose_u3(theta1, phi1, lambda1, theta2, phi2, lambda2):<DEDENT>
<EOL>thetap, phip, lambdap = Optimize1qGates.yzy_to_zyz((lambda1 + phi2), theta1, theta2)<EOL>(theta, phi, lamb) = (thetap, phi1 + phip, lambda2 + lambdap)<EOL>return (theta, phi, lamb)<EOL>
Return a triple theta, phi, lambda for the product.

        u3(theta, phi, lambda)
           = u3(theta1, phi1, lambda1).u3(theta2, phi2, lambda2)
           = Rz(phi1).Ry(theta1).Rz(lambda1+phi2).Ry(theta2).Rz(lambda2)
           = Rz(phi1).Rz(phi').Ry(theta').Rz(lambda').Rz(lambda2)
           = u3(theta', phi1 + phi', lambda2 + lambda')

        Return theta, phi, lambda.