# Error Correction over time

I am in year 12 and am a Science Extension student. My research question was "To what extent does an error-correcting algorithm reduce the inaccuracy of a quantum computation over time?".

To conduct this experiment I utilised Shors 3-qubit bit flip error correcting algorithm within my circuit as shown below. I have utilised a loop within my circuit to increase the amount of time the that the computation takes thus leaving more time for error to occur. I also ran a circuit without the error-correcting algorithm and just the loops to measure the fidelity of the quantum computation. I was expecting the circuit with the error-correcting algorithm to have a higher fidelity however after running both circuits through IBM's quantum computer ibmq_belem the circuit without the error-correcting algorithm turned out to be significantly more accurate. Can someone please tell me why this is?

num_repeats = 1000 #This number represents how many times the certain part of the circuit will be repeated.
pause_time = gate_length * num_repeats

qreg_q = QuantumRegister(4, 'q')
creg_c = ClassicalRegister(4, 'c')
circuit = QuantumCircuit(qreg_q, creg_c)

circuit.h(qreg_q[0])
circuit.cx(qreg_q[0], qreg_q[1])
circuit.cx(qreg_q[0], qreg_q[2])
circuit.h(qreg_q[0])
circuit.h(qreg_q[1])
circuit.h(qreg_q[2])

for blah in range(num_repeats):
circuit.barrier(qreg_q[0], qreg_q[1], qreg_q[2], qreg_q[3])
circuit.x(qreg_q[3])

circuit.barrier(qreg_q[0], qreg_q[1], qreg_q[2], qreg_q[3])

circuit.h(qreg_q[0])
circuit.h(qreg_q[1])
circuit.h(qreg_q[2])
circuit.cx(qreg_q[0], qreg_q[1])
circuit.cx(qreg_q[0], qreg_q[2])
circuit.ccx(qreg_q[2], qreg_q[1], qreg_q[0])
circuit.h(qreg_q[0])
circuit.measure(qreg_q[0], creg_c[0])
# @columns [0,1,2,3,3,3,4,5,6,7,7,7,8,9,10,11,12]