I am doing Qiskit Lab 4 about Iterative Phase Estimation. I created a circuit implementing IPE for theta = 1/3 (phase of 2pi/3). Here's the circuit:

enter image description here

It seems to do okay if I run it without noise in a QASM sim:

enter image description here

Then the lab compares how IPE performs compared to QPE when you add noise - in this lab they use NoiseModel.from_backend() from the Athens IBM computer to simulate the noise.

The lab guide says I'm supposed to get something like this:

enter image description here

In reality I get this:

enter image description here

I have zero idea how to approach this problem because I tried inputing several values of theta to simulate in QASM without noise and everything seems to be fine there. Any ideas?

For reference, the code implementing IPE is below:

import math
theta = 2/3*math.pi
IPE = QuantumCircuit(2)
cregs = []
for i in range(n):
for i in range(n):
    if i > 0:
        for j in range(i):

UPDATE: Apparently specifying the initial_layout during transpiling is crucial as it seems to have worked!

  • $\begingroup$ Did you implement error mitigation? (maybe the their results have error mitigation) And how many shots did you use? Also you shouldn't expect an identical graph... $\endgroup$
    – KAJ226
    Apr 6, 2021 at 13:54
  • $\begingroup$ @KAJ226 I did 20,000 shots, which should be enough to get a representative distribution... I am fairly sure they didn't do error mitigation, they would've written something in the notebook otherwise... The whole point of the exercise is to show IPE is more robust against noise, if I understand correctly. $\endgroup$ Apr 6, 2021 at 14:30
  • $\begingroup$ This must due to the noise level that you added is different that what they did. Have you figured this out. $\endgroup$
    – KAJ226
    Apr 12, 2021 at 5:23
  • $\begingroup$ ahh just saw your update. Yes, this is because different qubits have different error/noise... so you want to make sure you are consistent with the qubits you use... $\endgroup$
    – KAJ226
    Apr 12, 2021 at 5:26


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.