Quantum Computing, Qiskit, Quantum, Quantum Optimization, Quantum Physics.
return qProg p = 1.0/2.0 + sqrt(6.0)/6.0 theta1 = 2.0*acos(sqrt(1.0/3.0)) theta2 = 2.0*acos(sqrt(2.0/3.0)) lambda1 = 2.0*acos(sqrt(p)) lambda2 = 2.0*acos(sqrt(1.0-p)) def encoding001(qProg, a, b): qProg.u3(theta2, 0, 0, a) qProg.x(a) qProg = ch(qProg, a, b) qProg.x(a) return qProg def