You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When drawing the scheduled circuit with PadDynamicalDecoupling pass from qiskit_ibm_runtime.transpiler.passes.scheduling , an error is returned that says
TypeError Traceback (most recent call last)
Cell In[2], [line 1](vscode-notebook-cell:?execution_count=2&line=1)
----> [1](vscode-notebook-cell:?execution_count=2&line=1) draw(dd_pm_ibm_runtime.run(t_qc), style=IQXStandard(**my_style), show_idle=False, show_delays=False)
TypeError: can only concatenate tuple (not "int") to tuple
Steps to reproduce
from qiskit.circuit.random import random_circuit
from qiskit_ibm_runtime.fake_provider import FakeOsaka
from qiskit import transpile
from qiskit.transpiler import PassManager
from qiskit.visualization.timeline import draw, IQXStandard
from qiskit.circuit.library.standard_gates import XGate
fake_backend = FakeOsaka()
num_qubits = 6
depth = 4
seed = 42
qc = random_circuit(num_qubits,depth,measure=False, seed=seed)
qc.measure_all()
t_qc = transpile(qc, backend=fake_backend, optimization_level=3, scheduling_method='alap')
dd_sequence = [XGate(), XGate()]
from qiskit_ibm_runtime.transpiler.passes.scheduling import ALAPScheduleAnalysis as alap_ibm_runtime
from qiskit_ibm_runtime.transpiler.passes.scheduling import PadDynamicalDecoupling as pad_dd_ibm_runtime
dd_pm_ibm_runtime = PassManager(
[
alap_ibm_runtime(fake_backend.instruction_durations),
pad_dd_ibm_runtime(durations=fake_backend.instruction_durations, dd_sequences=dd_sequence),
]
)
my_style = {
'formatter.general.fig_width': 40,
'formatter.general.fig_unit_height': 1,
}
draw(dd_pm_ibm_runtime.run(t_qc), style=IQXStandard(**my_style), show_idle=False, show_delays=False)
Expected behavior
The expected behaviour should be to draw the circuit without raising any error like when PadDynamicalDecoupling is called from qiskit.transpiler. The following code draws the scheduled circuit.
from qiskit.transpiler.passes.scheduling import ALAPScheduleAnalysis as alap_qiskit
from qiskit.transpiler.passes.scheduling import PadDynamicalDecoupling as pad_dd_qiskit
dd_pm_qiskit = PassManager(
[
alap_qiskit(fake_backend.instruction_durations),
pad_dd_qiskit(durations=fake_backend.instruction_durations, dd_sequence=dd_sequence),
]
)
draw(dd_pm_qiskit.run(t_qc), style=IQXStandard(**my_style), show_idle=False, show_delays=False)
Suggested solutions
Additional Information
qiskit-ibm-runtime version: 0.23.0
Python version: Python 3.10.14
Operating system: Macbook pro with macOS Sonoma (V 14.5) and Apple M1 pro chip
The text was updated successfully, but these errors were encountered:
Describe the bug
When drawing the scheduled circuit with
PadDynamicalDecoupling
pass fromqiskit_ibm_runtime.transpiler.passes.scheduling
, an error is returned that saysSteps to reproduce
Expected behavior
The expected behaviour should be to draw the circuit without raising any error like when
PadDynamicalDecoupling
is called fromqiskit.transpiler
. The following code draws the scheduled circuit.Suggested solutions
Additional Information
The text was updated successfully, but these errors were encountered: