-
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.
Add pulse instruction and schedule equality testing (#2873)
This adds pulse instruction and schedule equality testing. This will make writing Schedule tests easier. I also added a small change to return instructions with a fixed ordering. This was required for the initial way I implemented equality testing, but have since refactored so that it is not necessary. Instruction testing verifies that the lhs and rhs have the same Command on the same channels. Schedule testing first ensures that the lhs and rhs each have the same channels and the same number of instructions. Then it verifies that each instruction at each time in the rhs is contained within the rhs. * Add schedule and instruction equality testing. * Modify equality check to be more straight forward. * Updated changelog. * refactor equality checking of Commands to not check name and also use the super class of eq. * Update qiskit/pulse/commands/command.py Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com> * Fix unpythonic equality checks. * Add proper hashes for commands. * Update test/python/pulse/test_schedule.py Co-Authored-By: Lauren Capelluto <laurencapelluto@gmail.com> * Change equality check to be based on position in .
- Loading branch information
1 parent
33b2508
commit 87de275
Showing
11 changed files
with
140 additions
and
51 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
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
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
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