Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qiskit/transpiler/passes/scheduling/calibration_creators.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ def run(self, dag):
Returns:
DAGCircuit: A DAG with calibrations added to it.
"""
bit_indices = {bit: index for index, bit in enumerate(dag.qubits)}

for node in dag.nodes():
if node.type == 'op':
if self.supported(node.op):
params = node.op.params
qubits = [_.index for _ in node.qargs]
qubits = [bit_indices[qarg] for qarg in node.qargs]

schedule = self.get_calibration(params, qubits)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
other:
- |
Qubit.index has been deprecated. The CalibrationCreator was still using
this functionality which this PR fixes.