I am trying to measure stabilizers in a surface code, a common circuit to measure stabilizers look like this: https://arxiv.org/pdf/1404.3747
The problem is when Measuring the X-stabilizer circuits in Qiskit (python). It returns nothing useful. Take the following code snippet which implement fig 2a's circuit:
ar_z = QuantumRegister(1, 'ar_z')
cr_z = ClassicalRegister(1, 'cr_z')
dr = QuantumRegister(4, 'd')
qc = QuantumCircuit(ar_z,dr, cr_z)
qc.h(ar_z[0])
qc.cx(ar_z[0], dr[1])
qc.cx(ar_z[0], dr[0])
qc.cx(ar_z[0], dr[3])
qc.cx(ar_z[0], dr[2])
qc.h(ar_z[0])
qc.measure(ar_z, cr_z)
simulator = AerSimulator()
result = simulator.run(qc).result()
print(result.get_counts())
qc.draw(output='mpl')
plt.show()
Drawing the output:
And the resutls:
{'1': 536, '0': 488}
This tells me nothing useful about the ancilla or weather an error was induced on one of the data qubits. My thoughts was that if a z-error was induced on one of the qubits, the ancilla would return 1? else 0. Is this not the case? if so How do I measure the X-stabilizers?


 
     
    