# How to realize this quantum error correction circuit on real hardware?

I want to realize this error correction circuit. To do that, I created a circuit: However, I cannot execute on real hardware. How can I create a circuit to realize this correction on real hardware?

• The simplest thing to do would be to do the classically controlled NOTs entirely classically, in the data post-processing, instead of no the device. For Clifford circuits you can always move (and probably want to move) classically controlled pauli gates into the classical post-processing so this isn't even cheating. Jan 13, 2020 at 18:48
• I didn't get the point. What is the classically controlled NOTs gate and classically controlled pauli gates? How to realize them? Jan 14, 2020 at 18:05

You can simply control $$X$$ gates with qubits $$q3$$ and $$q4$$. You DO NOT have to measure them firstly and then use classical bits for controlling.

The reason is that in quantum computing, controling some qubit with other qubits or with their measured results in classical register is the same.

Hence, you can implement the algorithm on real quantum computer.

• Thanks. I don't get it that how to control X gate with qubits q3 and q4? Jan 14, 2020 at 18:02
• @peachnuts: Use simply CNOT gate. Jan 14, 2020 at 18:22
• You mean use CNOT gate between q0,q3 and q0,q4, then compare the result of q3 and q4? In that case, we need to involve 2 CNOTs which I think we'll increase the error rate right? Does it mean that our device is not fault tolerant? Jan 14, 2020 at 18:36
• @peachnuts: Yes, that is what I proposed and yes, you are right that you increase a circuit complexity and make it more prone to errors. However, your question was how to implement your circuit on current real quantum hardware. For example in IBM Q composer, this is only possibility for time being. However, to have a actual error correction, a quantum processor has to have a possibility to control gates with classical register. The solution I proposed can help you to run your algorithm on current quantum computer. Jan 14, 2020 at 22:06
• Thanks! So, the ibm device can run the algorithm but is involved in more errors because it haven't realized to control gate with classical register. The current hardware cannot realize an actual error correction. Am I right? Jan 15, 2020 at 8:11

I don't think that this will be possible on real current quantum hardware.

An alternative would be to run it on a simulator with a realistic noise model. This means that the circuit will be run in a non-ideal environment, and so should incur errors similar to how it would if it was executed on a real device. This tutorial teaches you how to build a noise model.

• Thanks. Is there any possible error correction method realized on real hardware by now? Jan 13, 2020 at 15:35
• I found two examples of tutorials on implemented error correction here and here. Hope this helps! Jan 13, 2020 at 15:41
• Thanks a lot !! Jan 13, 2020 at 15:47

AFAIK, this is impossible on IBM's current hardware. See this github issue: https://github.com/Qiskit/qiskit-textbook/issues/119

• Thanks. Is there any possible error correction method realized on real hardware by now? Jan 13, 2020 at 15:35