1
$\begingroup$

I replicated successfully the qiskit tutorial (in a jupyter notebook using VSCode) found here: https://learn.qiskit.org/course/quantum-hardware-pulses/calibrating-qubits-using-qiskit-pulse

But when I tried to calibrate a different qubit (changing the line qubit = 0 to, say, qubit = 1, I get only background noise (ranging from -6.15 to -5.90 a.u.) instead of a nice peak (reaching around 2 a.u.) when plotting sweep_values. By the way, I don't know if this is important, I had to also change the line sweep_values.append(res[qubit]) to sweep_values.append(res[0]) because it was giving me an error (res is of size 1). This was on ibm_hanoi.

Why do I get only noise when switching to another qubit?

$\endgroup$

1 Answer 1

0
$\begingroup$

Did you modify this cell in section 2?

sweep_gate = Gate("sweep", 1, [freq])

qc_sweep = QuantumCircuit(1, 1)

qc_sweep.append(sweep_gate, [0])
qc_sweep.measure(0, 0)
qc_sweep.add_calibration(sweep_gate, (0,), sweep_sched, [freq])

# Create the frequency settings for the sweep (MUST BE IN HZ)
frequencies_Hz = frequencies_GHz*GHz
exp_sweep_circs = [qc_sweep.assign_parameters({freq: f}, inplace=False) for f in frequencies_Hz]

Try replacing it with this:

n_bits = backend_config.n_qubits
sweep_gate = Gate("sweep", 1, [freq])

qc_sweep = QuantumCircuit(n_bits, 1)

qc_sweep.append(sweep_gate, [qubit])
qc_sweep.measure(qubit, 0)
qc_sweep.add_calibration(sweep_gate, (qubit,), sweep_sched, [freq])

# Create the frequency settings for the sweep (MUST BE IN HZ)
frequencies_Hz = frequencies_GHz*GHz
exp_sweep_circs = [qc_sweep.assign_parameters({freq: f}, inplace=False) for f in frequencies_Hz]

I would recommend looking through all the cells to see if there are other places where they also assumed qubit = 0.

$\endgroup$
2
  • $\begingroup$ Thanks for your answer! I'll check later when I have time and report back. $\endgroup$
    – Daniel L
    May 6, 2023 at 1:29
  • $\begingroup$ That worked just fine, thanks a lot! They should change the tutorial, I think, as it gives the impression that all you have to do is change the line qubit = 0. $\endgroup$
    – Daniel L
    May 13, 2023 at 1:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.