Can you help me to configure the FakeOpenPulse2Q()
to produce more realistic pulses?
The code below instantiates 2 circuits and generates the waveforms for each.
The top waveform frame is 1-qubit circuits with a single U3 gate using backend='ibmq_armonk'
works fine.
The bottom waveform frame is generated by FakeOpenPulse2Q()
for a 2-qubit circuit using the same U3 gate on qubit 0 and the waveforms have the right structures but their shapes are simplified.
I'm guessing FakeOpenPulse2Q requires a definition of calibrated X90 and CNOT gates for each qubit. Can you help me to
a) transfer the X90 calibration of qubit 0 from ibmq_armonk
to FakeOpenPulse2Q()
b) use the same X90 calibration for qubit 1, except shift the drive & read frequencies by 300 and 400 MHz, respectively
c) define a realistic CNOT gate in FakeOpenPulse2Q
Thanks
Jan
import matplotlib.pyplot as plt
from qiskit import IBMQ
from qiskit import QuantumCircuit, transpile,schedule
from qiskit.test.mock import FakeOpenPulse2Q
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')
backend1 = provider.get_backend('ibmq_armonk')
backend2 = FakeOpenPulse2Q()
circ1 = QuantumCircuit(1,name='1Qcirc')
circ1.u(0.4,0.6,0.9,0)
qc1 = transpile(circ1, basis_gates=['u1','u2','u3'], optimization_level=1)
circ2 = QuantumCircuit(2,name='2Qcirc')
circ2.u(0.4,0.6,0.9,0)
circ2.sx(1)
qc2 = transpile(circ2, basis_gates=['u1','u2','u3'], optimization_level=1)
sched1=schedule(qc1,backend1)
sched2=schedule(qc2,backend2)
fig=plt.figure(1,facecolor='white', figsize=(14, 8))
ax1=plt.subplot2grid((3,1), (0,0), rowspan=1)
ax2=plt.subplot2grid((3,1), (1,0), rowspan=2)
sched1.draw('IQXDebugging', axis = ax1, show_waveform_info = True)
sched2.draw('IQXDebugging', axis = ax2, show_waveform_info = True)
print('circuit1:'); print(circ1)
print('circuit2:'); print(circ2)
plt.tight_layout()
plt.show()