Closed dwierichs closed 5 years ago
Wouldn't you be able to achieve the same result by using All(Rx(theta)) | qureg
[1] ?
[1] Assuming that qureg
is a quantum register of size 2.
The newly implemented gates exponentiate the tensor product, being equivalent to cos(theta/2) Id - i sin(theta/2) X_0 X_1 whereas exp(-i/2 theta X_0) exp(-i/2 theta X_1) = [cos^2(theta/2)-sin^2(theta/2)] Id - i cos(theta/2)sin(theta/2) [X_0 + X_1] ,where the index of the Pauli X is the qubit it acts on, is the tensor product of the exponents. I hope I did not overlook something here but then the two are indeed different.
It seems you have yet to sign the CLA agreement for contributor to ProjectQ. Could you please send an email to info@projectq.ch requesting the CLA and then sign it ?
For convenience, these two-qubit rotation gates might be added to the gate set: Two-qubit X rotation exp(-i/2 \theta XX) Two-qubit Y rotation exp(-i/2 \theta YY) Two-qubit Z rotation exp(-i/2 \theta ZZ)