When I run this program on ibmqx2 (the backend matters) in IBM Q Experience, the results are interesting. Essentially, the program measures the error rate on $|q_0\rangle$ after fiddling with $|q_1\rangle$.
OPENQASM 2.0;
include "qelib1.inc";
gate nG0 ( param ) q {
h q;
}
qreg q[2];
creg c[1];
ry(pi) q[1];
measure q[0] -> c[0];
Unexpectedly, the value of $|q_0\rangle$ depends on the angle of rotation around y-axis for $|q_1\rangle$. Here are typical runs of 8 192 shots on ibmqx2.
ry() q[1] Error rate q[0] Expected error rate q[0] 0 0.940% ~1% pi/4 9.351% ~1% pi/2 30.273% ~1% 3pi/4 52.209% ~1% pi 60.742% ~1% 5pi/4 51.941% ~1% 3pi/2 30.518% ~1% 7pi/4 9.509% ~1% 2pi 0.684% ~1%
A few notes:
- For $0$ and $2\pi$ the $Ry$ operations are optimized away in the transpiled code.
- Don't forget that we're operating on $|q_1\rangle$ and measuring $|q_0\rangle$. These qubits should be completely independent. Changes to $|q_1\rangle$ shouldn't impact $|q_0\rangle$.
- The error rate is above 50% from $\frac{3}{4}\pi$ to $\frac{5}{4}\pi$. That suggests that application of $Ry$ on $|q_1\rangle$ does not just destabilize the system, it causes that $|q_0\rangle$ favors the $|1\rangle$ state.
- Changing $Ry$ to $Rx$ also demonstrates the problem. Changing $Ry$ to $Rz$ makes the problem to go away.