# How to improve results from the IBM Quantum hardware?

I have a simple dynamic circuit as follows. I ran it on the IBM simulator and the real quantum hardware. The result from the simulator is 100% mathematically accurate. The result from the hardware has 62 on '0 0' and 1 on '1 0'. I guess they are caused by the noises? I use the toy IBM Quantum like ibm_narobi (only 5 raw physical qubits?). Have you accessed any more powerful hardware in the IBM Quantum family to experiment on error corrections? Would you please share your results?

Result from the simulator:

Result from the real IBM quantum hardware:

Yes, the cause of unexpected results in your measurement is noise (due to different kind of effects as qubits decoherence, gate operations imperfections, etc). There are many kinds of error correction and error mitigation techniques available (see Qiskit - Measurement Error Mitigation as ax example) that can reduce (or remove, in some cases) the impact of noise.

The quantum devices from IBM Quantum that you can experiment on for free are the following:

As you see in the picture, ibm_nairobi has 7 physical qubits. To access larger and more powerful computers you need Premium account on the IBM Quantum platform.

The noise causes biases in the outcome on real architectures. The outcome you got is not surprising.

In fact, one of the most common noise is the loss of energy, or spontaneous decay.

This explains why you witnessed the error concentrated over the state 00, which you can interpret as an undesired decay of the first qubit from the exited state 1 to the ground state 0.

First, it's great to see you working with dynamic circuits!

"The result from the simulator is 100% mathematically accurate."

Let's break down the operations that are applied. Assuming you start in the state $$\left| q_1, q_0 \right> = \left| 00 \right>$$,

(1) The first operation on $$q_0$$ will put the qubit into a superposition, $$1/\sqrt{2} \left[ \left| 0 \right> + \left| 1 \right>\right]$$.

(2) Measuring $$q_0$$ in the $$Z$$-basis will give (roughly speaking) $$Pr(0) = Pr(1) = 0.5$$; effectively a 50/50 chance of 0 or 1. If we consider only this measurement, the (noiseless) result, would be be a classical bit 0 half of the time, and a classical bit 1 half of the time.

(3) Given (2), controlling on $$c_0$$ and targeting $$q_1$$ will yield $$\left| q_1 \right> = \left| 0 \right>$$ half of the time, and $$\left| q_1 \right> = \left| 1 \right>$$ half of the time.

(4) As in (2), the (noiseless) result, would be be a classical bit 0 half of the time, and a classical bit 1 half of the time.

We don't see a 50/50 split in shots because of intrinsic randomness in the circuit execution--use of random numbers. If you don't set a seed, you will see the results vary run-to-run.

The result from the hardware has 62 on '0 0' and 1 on '1 0'. I guess they are caused by the noises?

Exactly. You can apply your own noise model--e.g., setting depolarizing noise, amplitude damping, etc.--to see how different types of noise affect results.

toy IBM Quantum like ibm_narobi (only 5 raw physical qubits?)

There's nothing really 'toylike' about ibm_nairobi; it's a real quantum computing system based on transmon qubits (and has 7 qubits). Perhaps you mean it is quite limited in the number of qubits compared to state-of-the-art like ibm_washington and ibm_sherbrooke (127 qubits)?

more powerful hardware in the IBM Quantum family

How do you define "more powerful"? Quantum volume (QV)? Circuit layers per second (CLOPS)? Number of qubits? Noise?

[EDIT] Sorry, I misread your original circuit. In any case, my explanation still holds (switch the first operation NOT -> H).