PauliList Class #6
dsvandet
started this conversation in
Project Notes
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
These notes are related to the PauliList class representing a list of Pauli Operators
Introduction
These notes are in regards to satisfying the following requirement:
This requirement is can be located at:
There are two related topics for discussion here: Pauli and PauliList classes from quantum_info
Comments on Current Pauli and PauliList classes
A list of Pauli operators can be used as (for example)
It should be noted here that I am using the term operator in the more general abstract mathematical object rather than just a matrix representation as often used in Qiskit.
The quantum_info module within qiskit terra provides some classes that could be used for this purpose. Of interest for this requirement is the set of capabilities in the operators directory. The symplectic folder holds the following classes
The PauliTable class cannot store any phases and the StabilizerTable can only store a restricted class of phases meaning that you cannot have a list of general Pauli operators with any (allowable Pauli phase$-1, 1, -i, i$ ). An issue Terra-Issue #5993 was raised and a new PauliList class is being developed. The PR for this is Terra-PR-pauli-list. This PR has now be completed.
As it stands currently PauliList will replace both StabilizerTable and PauliTable. PauliList is a subclass of the modified BasePauli which in the PR above now can store a list of Pauli Operators with all allowed phases.
PauliList should be suitable as a base for the needs in qiskit-qec.
Examples:
Location of Code
Currently these changes are staged at dsvandet/qiskit-terra/tree/paulilist_representations.
Modifications to PauliList Class
PauliList(['X','ZY'])
and get the equivalent formPauliList(['IX', 'ZY'])
. This is essential when using index notation for Pauli strings. For examplemy_list = PauliList(["X1X2X3X4", "Y9Y6X3X1"])
will give youPauliList(['IIIIIXXXXI', 'YIIYIIXIXI'])
. You can specify the number of quits in index form using something likePauliList("X1X2X3", "Z3X7I23")
if needed.Beta Was this translation helpful? Give feedback.
All reactions