-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate PauliTable #7245
Deprecate PauliTable #7245
Conversation
Pull Request Test Coverage Report for Build 1519291394
💛 - Coveralls |
Milestone: 0.19 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecating PauliTable is good, however keeping StabilizerTable is avoiding the problem that the API for StabilizerTable (which is the same as PauliTable) is outdated and needs to go too since it differs quite drastically in some cases from PauliList.
There is no real need for a separate StabilierTable class when its functionality is a strict subset of functionality of PauliList. The only place StabilizerTable is used is in the Clifford class where the differences are StabilizerTable uses a Z_2 phase instead of Z_4, and stores the table as a single array instead of X and Z arrays separately. This can be addressed by directly adding phase
and array
setter and getter methods to the Clifford
class that convert the PauliList to these formats as they were in the old StabilizerTable (stack X and Z, convert phase to/from Z_2). Then all the internal code in Clifford should just has to replace obj.table.array
and obj.table.phase
with obj.array
and obj.phase
.
The stabilizer and stabilizer methods can be updated to return the internal PauliLists, and the table method itself could either return the full PauliList or be deprecated.
@chriseclectic: I'd recommend against having non-trivial |
I'll modify this PR after #7269. (So, don't merge this) |
I'll deprecate PauliTable and StabilzierTable at the same time in 0.23. |
Summary
PauliTable
StabilizerTable.pauli
StabilizerTable
a standalone (i.e. independent from PauliTable)Details and comments
TODO