# How does one get the right counts for the measurement of a single qubit in the presence of noise with qiskit?

I am using a single qubit in the IBM quantum lab running on ibm_armonk and it is simulated with real noise, however when I try to measure out a state where the coefficient of the 0 state is less than 0.1 I get the wrong counts. I always get the result that there were roughly 1/10 of the counts in the 0 state and 9/10 in the 1 state (for example, if I try to initialize the state so that the probability of 0 is 0.01). I used 8192 shots but when I try to repeat the experiment I get the same results. This doesn't make sense to me because I would expect the effect of noise to lead to a more Gaussian type of distribution around the average, so after enough measurements the counts should lead to the average value. My code involves the following:

initial_state = [0.1,math.sqrt(0.9)] # my code is a little different here, but this
# should give an idea of the numbers I am
# using
circuit.initialize(initial_state,0)
circuit.measure(0,0)
job = execute(circuit,device,shots=8192)
result = job.result()
result = result.get_counts(circuit)
print(counts)

• Your observations are consistent with what is called "measurement" or "readout" error (as opposed to other types like "gate error" or "thermal relaxation"). I could try to answer your question, but it is a bit vague at the moment. Can you make it more specific? Oct 20 at 18:00
• Is there any way to reduce the measurement error? By measurement error I assume you mean not the effect of noise changing the overall state of the qubit but the noise making it difficult to distinguish the 0 and 1 states, so would there be any way to deal with this problem? Oct 20 at 21:39
• Yes - if you know how likely a |0⟩ gets read as 1 and a |1⟩ gets read as 0, you can reverse the statistics in a classical post-processing step. See this tutorial: qiskit.org/documentation/tutorials/noise/… Oct 21 at 0:11