Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Pulse pass manager skeleton was added by #11743. This PR fixes bugs.
Details and comments
1: Pass must be hashable.
Due to the original implementation of Qiskit PassManager, passes with the identical hash are considered as idempotent and execution of the duplicated (same hash) passes are omitted by design. There was long discussion in #10127 but we decided to remain this behavior.
qiskit/qiskit/passmanager/base_tasks.py
Lines 97 to 101 in 6ebb7aa
The base passes introduced in #11743 didn't implement hash, and crashes the pass manager since a pass instance cannot be added to the completed pass set.
2: Bug fix of schedule block -> IR conversion.
A small test added in #11743 was unintentionally passed due to
qiskit/qiskit/passmanager/passmanager.py
Lines 220 to 221 in 6ebb7aa
Although the pass and conversion logic had bugs, round trip test unintentionally succeeded because nothing was really executed (pass manager run just returned input object as-is, since no pass was added to the flow controller).