Skip to content
Quantum computing

Quantum error correction explained with IBM hardware results

Explore real IBM quantum hardware data to understand how quantum error correction works, its limits, and what to try next week for better qubit reliability.

Researcher analyzing quantum error correction data in a lab
Illustration generated with AI.

Quantum error correction (QEC) lets fragile qubits keep their information longer, and recent IBM runs show it works in practice.

The data reveal where the technique shines, where it still falters, and how you can experiment with it yourself next week.

How the logical Bell pair experiment proved QEC works on real chips

Experiment setup and code version

The test ran with QuBIOS v1.2.2, the quantum research suite hosted on the QuBIOS project page. The code prepared a [[4,2,2]] error‑detected logical Bell state, meaning four physical qubits encoded two logical qubits with distance two. The logical circuit inserted a parity check after entangling the two logical qubits, discarding runs that triggered the detector.

IBM hardware used

Three IBM Heron r2 QPUs participated: ibm_fez, ibm_marrakesh, and ibm_kingston. Each device offers 156 superconducting qubits, arranged in a lattice that supports the required connectivity for the [[4,2,2]] layout. The runs were executed on 7 Nov 2026, with the same pulse schedules on all three machines.

Fidelity comparison

For each device the experiment measured the Bell‑state fidelity after post‑selection. The logical pair achieved 97.7 % fidelity at a 10 µs observation window. By contrast, the best raw physical Bell pair on the same hardware stayed below 90 % (89.7 % bound). The improvement exceeds the statistical error of the runs, showing that the error‑detected encoding filtered out the dominant noise events.

Interpretation of the result

The logical fidelity surpasses the physical limit precisely because the detector discards runs where a single‑qubit error flips the parity. This demonstrates that a simple error‑detecting code can raise the effective quality of entanglement on current noisy intermediate‑scale quantum (NISQ) devices. It also confirms the theoretical prediction that a distance‑two code can protect against any single‑error event, provided you are willing to accept a reduced success probability.

Practical takeaways

If you plan to run QEC experiments yourself, start with a distance‑two code and a post‑selection strategy. The QuBIOS repository includes the circuit definition; you only need to map the four logical qubits onto a device with sufficient connectivity, as the IBM Heron r2 machines demonstrated. Expect a trade‑off: the logical success rate will be lower than the raw shot count, but the fidelity of the retained results can be significantly higher.

What the 9‑qubit repetition code tells us about error suppression

Experimental setup on IBM QPUs

The 9‑qubit repetition code was executed on the same IBM Heron r2 devices used for the logical Bell pair test (ibm_fez, ibm_marrakesh, ibm_kingston). Each run encoded a single logical bit across nine physical qubits and applied a matching decoder after a fixed idle period. The code leveraged the native gate set of the devices, so no extra compilation overhead was introduced.

Measured error rates

When the logical qubit was left idle for roughly 150 µs, the decoded error probability was about 3.0 %. By contrast, a bare physical qubit stored for the same duration exhibited error rates between 41 % and 75 % depending on the processor. The improvement factor exceeds tenfold, confirming that the repetition code can dramatically extend coherence for short‑term storage.

Implications for larger circuits

These results show that even a modest code can protect information against dominant decoherence mechanisms on current hardware. For deeper algorithms, each logical gate must be compiled into a fault‑tolerant layer that includes the same repetition structure. The trade‑off is a larger qubit budget: nine physical qubits replace one logical qubit, and the decoder adds classical post‑processing latency.

If you plan to scale beyond a few logical qubits, the error suppression demonstrated here suggests a linear reduction in logical error per added redundancy, but only up to the point where cross‑talk and control errors dominate. In practice, you will need to balance the code distance against the available qubit count on the free tier.

Practical take‑away for developers

When you design a circuit for the free tier, allocate at least nine qubits for any data you wish to protect and insert measurement‑based parity checks after each logical block. Use the matching decoder described in the QuBIOS project documentation to translate raw syndrome data into a corrected state. The overhead is predictable: each round of error detection adds roughly 2 µs of circuit depth on these devices.

I would recommend testing the code on a single device first, record the raw syndrome distribution, then compare the corrected error rate against the bare‑qubit baseline you obtain by running the same idle interval without encoding. This side‑by‑side comparison makes the benefit of error suppression unmistakable.

Practical steps to run a simple QEC test on IBM Quantum Free tier next week

  1. Create an IBM Quantum account at quantum-computing.ibm.com. Use your email, verify the link, and accept the free‑tier terms. The dashboard appears after you sign in.

  2. Generate an API token from the Account page. Copy the token; you will need it for the Qiskit environment.

  3. Install Qiskit in a local Python environment: pip install qiskit. Then set the token with IBMQ.save_account('YOUR_TOKEN'). This registers the free backend for subsequent calls.

  4. Open a new Jupyter notebook or a plain Python script. Import the necessary modules:

    from qiskit import QuantumCircuit, transpile, IBMQ
    from qiskit.providers.ibmq import least_busy
    

    Load the free backend, typically ibmq_qasm_simulator for quick tests, or ibmq_lima if you want real hardware.

  5. Build a 3‑qubit repetition code circuit. Encode a logical |0⟩ by applying CNOT from qubit 0 to qubits 1 and 2, then insert a single‑qubit X error on qubit 1 for demonstration. Finally, decode with the inverse CNOTs and measure all qubits.

    qc = QuantumCircuit(3,3)
    qc.h(0)  # prepare superposition for logical |+⟩
    qc.cx(0,1)
    qc.cx(0,2)
    qc.x(1)  # optional error
    qc.cx(0,1)
    qc.cx(0,2)
    qc.measure([0,1,2],[0,1,2])
    
  6. Transpile the circuit for the chosen backend: t_qc = transpile(qc, backend). Then submit the job with job = backend.run(t_qc, shots=1024). The free tier allows a few hundred shots per day, enough for a statistical comparison.

  7. Retrieve the result: counts = job.result().get_counts(). Expect the majority of shots to return '000' or '111' depending on the initial state, with a small fraction showing error patterns.

  8. Compare the observed error rate with the bare‑qubit baseline reported in the QuBIOS project. The 9‑qubit repetition code in that study kept a qubit coherent for ~150 µs at 3 % error, while a single physical qubit decayed much faster. Your simple 3‑qubit test will illustrate the same principle on a much smaller scale.

  9. If you want to iterate, adjust the error insertion or increase the number of repetitions. Each change requires a new job submission; the free tier queues jobs, so plan a few minutes between runs.

  10. When you have gathered enough data, export the counts to CSV for offline analysis or share them via the contact form if you need help interpreting the results.

Frequently asked questions

How many qubits are needed for a basic error‑detecting code?

A simple error‑detecting code can be built with three physical qubits encoding a logical qubit. The [[4,2,2]] code demonstrated on IBM Heron devices used four qubits to detect a single‑error event while preserving two logical bits. For experimental work you often start with four qubits because the overhead is modest and the circuit fits comfortably on current 156‑qubit machines.

Can I run QEC experiments for free on IBM’s cloud platform?

IBM offers a free tier that provides limited access to its quantum processors, including the Heron r2 family. You can submit jobs that implement small error‑correction circuits, but the queue is shared and runtime is capped. For larger batches or longer experiments you will need to upgrade to a paid plan or request academic allocation.

Next steps for your quantum error correction experiments

Pick a hardware target that matches the error profile you want to study; the IBM Heron r2 devices used in our QuBIOS runs are a good reference point. Start by reproducing the 9‑qubit repetition code experiment, then vary the decoder parameters to see how the logical lifetime changes. When you have a stable baseline, try scaling the code size and compare the GHZ decoherence scaling you observe with the N^0.7–1.0 trend we reported. Keep an eye on the fidelity bound; crossing it with an error‑detected logical state is a clear indicator that your correction scheme is effective. For detailed job submission scripts and result analysis, see the most relevant Qubitpage page. Proceed methodically, and you’ll avoid the pitfalls we encountered with the Steane decoder.

Written by

Mircea S. Rusu

Founder and engineer of Qubitpage. Support engineer since 2005, CMS developer, former technical consultant at Niguarda Ca' Granda Hospital in Milan, and author of the book “The Architect”.

More about the author →