-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update PulseGate pass to use Target internally.
When inst_map is provided, it copies schedules there into target instance. This fixes a bug that custom schedules in the inst_map are ignored when transpiling circuit with V2 backend. To support this behavior, internal machinery of Target is updated so that a target instance can update itself only with inst_map without raising any error. Also InstructionProperties.calibration now only stores CalibrationEntry instances. When Schedule or ScheduleBlock are provided as a calibration, it converts schedule into CalibrationEntry instance.
- Loading branch information
1 parent
e016f9c
commit 48e6724
Showing
7 changed files
with
254 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
releasenotes/notes/update-pulse-gate-pass-for-target-ebfb0ec9571f058e.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
features: | ||
- | | ||
A new method :meth:`.CalibrationEntry.get_duration` has been added to | ||
calibration entries. This method returns duration of calibration | ||
in units of dt when available, otherwise returns None. | ||
upgrade: | ||
- | | ||
:meth:`.Target.update_from_instruction_schedule_map` no longer raises | ||
KeyError nor ValueError when qubits are missing in the target instruction | ||
or inst_name_map is not provided for undefined instruction. | ||
In the former case, it just ignores the inst map definition for undefined qubits. | ||
In the latter case, gate mapping is pulled from the standard Qiskit gates | ||
and finally custom :class:`.Gate` object is defined from the schedule name. | ||
- | | ||
:class:`PulseGates` transpiler pass has been upgraded to respect | ||
``inst_map`` when ``target`` is also provided, rather than ignoring it. | ||
The pass now uses the target data to find custom calibration, but it | ||
copies instruction schedule map into it before transforming the DAG circuit. | ||
fixes: | ||
- | | ||
A bug that custom gates in the instruction schedule map is ignored | ||
when transpiling a circuit with V2 backend has been fixed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.