0

I'm trying to replicate a Bell state through a circuit in Qiskit.

I created the circuit described below:

from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
from numpy import pi

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

circuit.reset(qreg_q[0])
circuit.h(qreg_q[0])
circuit.reset(qreg_q[1])
circuit.cx(qreg_q[0], qreg_q[1])
circuit.measure(qreg_q[0], creg_c[0])
circuit.measure(qreg_q[1], creg_c[1])

Then I runned a simulation on an IBM Quantum Computer (a real one, not a simulator). Notice that I have reset the qubits to |0> state. If I do this, the simulation result gives me |00> and |11> as possible measured states, each with approx.50% probability of being measured.

I used to think that qubits in Qiskit were always initialized to |0> state. BUT if I comment the resetting of the qubits the simulation gives me 01 as the resulting state.

Is this to be expected? Or am I doing something incredibly foolish and obviously wrong that I'm not seeing?

Thanks a lot.

Gustavo Mirapalheta
  • 931
  • 2
  • 11
  • 25
  • 1
    Hello, this is quite disturbing. Could you maybe show us exactly the result you got? Via the number of counts, or the histogram. My first intuition would be that on a real backend, it is normal to have a little bit of "unexpected" results because of the errors coming from this same backend. So here by running your circuit, it is normal to see a little of 01 and 10 resulting, but the majority counts should be with 00 and 11. Is it the case on your job? And by the way, what backend did you use? – Lena May 31 '21 at 15:14
  • By the way, if you want, you can find [here](https://quantum-computing.ibm.com/lab/docs/iql/manage/systems/reset/backend_reset) all the info about the reset functionality – Lena May 31 '21 at 15:18
  • 1
    Hi Lena, I used "ibmq_jakarta". But now when I try to get those odd results I'm getting the correct answers. First trip of a sailor... anything that can happen... will happen. Anyhow, thanks a lot for your answer. – Gustavo Mirapalheta Jun 01 '21 at 15:51
  • Great it worked out in the end! Btw, there is a platform especially for Quantum Computing, https://quantumcomputing.stackexchange.com, feel free to go there for QC questions, you'll find more experts there :) – Lena Jun 01 '21 at 15:52

0 Answers0