1
$\begingroup$

I am just trying to calculate the highest fidelity of preparing GHZ states on IBM quantum computers and I run my circuit on qubits with the lowest readout error. However, I just obtain fidelity of the state about 0.5 to 0.6. like the following:

state Fidelity = 0.5924363421816463

is it OK? or I am doing something wrong. Because I suppose it must be higher than this.

Here is my code:

q1 = QuantumRegister(1)
q2 = QuantumRegister(1)
q3 = QuantumRegister(1)
c = ClassicalRegister(3)
qc = QuantumCircuit(q1, q2, q3, c)
qc.h(q1)
qc.cx(q1, q2)
qc.ccx(q1, q2, q3)
st = StateTomography(qc, physical_qubits=[85, 84, 83])
stdata = st.run(backend).block_for_results()
state_result = stdata.analysis_results("state")
array_to_latex(state_result.value)
fid_result = stdata.analysis_results("state_fidelity")
print(f"state Fidelity = {fid_result.value}")
$\endgroup$
3
  • $\begingroup$ This is incorrect circuit for GHZ state construction. You should have qc.cx(q2,q3) rather than qc.ccx(q1, q2, q3). $\endgroup$
    – R.G.J
    Commented Mar 20 at 5:06
  • $\begingroup$ Theoretically, the results are the same. Using CX on q2 and q3 has the same impact that we apply CCX on q1, q2, and q3. I have tried this also. But I arrive at the same results. If I run with the simulator, I get 0.9 for the fidelity which is more logic. But on the real devices, the results seam to be so noisy. $\endgroup$
    – physicino
    Commented Mar 20 at 8:46
  • $\begingroup$ Yes, you have to do error mitigation to have anything meaningful from hardware results at the moment. $\endgroup$
    – R.G.J
    Commented Mar 20 at 17:57

0