Skip to content

target.has_calibration takes no params, but target.get_calibration does #11658

@ajavadia

Description

@ajavadia

Environment

  • Qiskit Terra version:
  • Python version: 3.8
  • Operating system: mac

What is happening?

These two functions should look up the same calibrations. However right now one of them does not take params, so it is possible for has_calibration to report something wrong, which then get_calibration fails on.

This happens in at least one place: In the PulseGates transpiler pass, PulseGates.supported and PulseGates.get_calibration can mismatch, causing the former to not catch errors that the latter one will hit.

Related to #11657: I think the signature for these functions has to change to take the Operation and not the key.

How can we reproduce the issue?

looking at source code

What should happen?

has_calibration and get_calibration should have similar signatures

Any suggestions?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions