2

I'm trying to reproduce the Bell-state pulse display as shown in this tutorial. The code is very short:

bell = QuantumCircuit(2, 2)
bell.h(0)
bell.cx(0,1)
qc = transpile(bell,backend)
sched_circ = schedule(qc,backend)
sched_circ.draw()

but if I use the backend ibmq_armonk there are not enough qubits and, for ibmq_qasm_simulator, Qiskit-pulse is not supported. Is there a way to get it working? I do not need to run the waveforms on a device - I just want to analyze them.

P.S. If anyone has a compact IO protocol writing/reading scheduler pulses for multi-qubit Qiskit circuits in HD5 format I'd be interested to collaborate.

Follow up: After I upgraded my qiskit to ver 0.25.3 the backend=FakeOpenPulse2Q() works exactly as suggested below. Thanks for the help. Jan

ryanhill1
  • 2,623
  • 1
  • 11
  • 39

1 Answers1

1

You can use fake pulse backend to do this.

from qiskit.circuit import QuantumCircuit
import matplotlib.pyplot as plt
from qiskit.test.mock import FakeOpenPulse2Q
backend = FakeOpenPulse2Q()
from qiskit import transpile, schedule 
bell = QuantumCircuit(2, 2)
bell.h(0)
bell.cx(0,1)
qc = transpile(bell,backend)
pulse_schedule = schedule(qc, backend)

fig, ax = plt.subplots(figsize=(14, 10)) pulse_schedule.draw('IQXDebugging', axis = ax, show_waveform_info = True)

You will get something like below:

enter image description here

KAJ226
  • 14,182
  • 2
  • 12
  • 34