# Simple program produces consistently skewed results in IBM Q Experience

I'm running this program (essentially a two bit random number generator) on ibmqx2 in IBM Q Experience. The backend matters. Other machines give unexpected results, but the graph looks different for other backends. So far ibmqx2 has been a good choice because a) it produces results that are far from the expected outcome and b) it produces results that are consistent run over run.

OPENQASM 2.0;
include "qelib1.inc";
gate nG0 ( param ) q  {
h q;
}

qreg q[2];
creg c[2];

h q[0];
h q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];


I always get results with the following shape. Note that "11" is a full ten points higher than "10". That happens almost every run. Any idea what's going on?

It seems like the skew is indeed high on qubit 0. I ran a single Hadamard followed by measure on this qubit, and see about 13% skew. The other qubits on this device seem fine (less than 2% skew).

This is probably an error on the backend's discriminator (i.e. manifesting as high readout error). To see this, you can try applying readout error mitigation (code for this exists in Qiskit Ignis). When I do this, the skew is completely gone.

This will be fixed on the backend. Thanks for reporting.

• I'm not sure that qubit 0 by itself is the issue. When I do a single H gate followed by a measurement, I see pretty equal results. The original program still produces skewed results, though, and so does this even simpler version: OPENQASM 2.0; include "qelib1.inc"; qreg q[2]; creg c[1]; h q[0]; h q[1]; measure q[0] -> c[0]; Dec 26 '19 at 21:24
• Hmm that's not what I was seeing. I got the above histogram using only qubit 0. (h q[0]; measure q[0] -> c[0];) Dec 27 '19 at 6:34
• Then that issue's better, but the multi-qubit version is still wildly wrong. And it's still only necessary to measure a single cubit, as in the simplified version above, it's just somehow crucial that the other has been prepared. Dec 27 '19 at 8:13
• Maybe I did it incorrectly, but I used the referenced Qiskit tools to create a noise filter based on ibmqx2 and then ran local simulations biased by that filter. The results were not consistent with our observed results. Dec 27 '19 at 8:24

Each quantum processor has specific so-called error rate and a little bit different type of noise caused by specific conditions the processor runs in. Therefore, results produced by same circuits can be different on different quantum processors.

In your case, there is apparently a bias caused by some external factors specific for ibmqx2. You can try to run your program after ibmqx2 recalibration which occurs in regular intervals (ask IBM Q support when a next maintanance is planned). After that, results can be more correct, i.e. closer to uniform distribution.

• You're probably right, but the variance seems quite extravagant for the reported error rate. Dec 23 '19 at 5:39
• Yes, you are right too. I tried to run your program under my account on IBM Q. I will inform you about results. In the mean time, this thread is on disscusion of error rates: quantumcomputing.stackexchange.com/questions/9231/…. It might be interesting for you. Dec 23 '19 at 5:44
• @balios: Just finished my simulation. My results are more or less same as yours. You had better to ask IBM Q support team as there is probably an issue on ibmqx2. Dec 23 '19 at 5:46
• Thanks for checking. I'm going to leave this open for now in case IBM support wants to chime in. I'll close it if there's no more follow up. Dec 23 '19 at 5:50