Adds new TwoQubitPauliTwirlPass class to perform Pauli twirling randomly on all two qubit gates of a circuit during transpilation.
Details and comments
This is a utility class to avoid manual twirling in present and upcoming notebooks.
There are plans for a notebook exposing how the class is built.
Needed for the Utility Scaling notebook, demoed at IBM Quantum Practitioner's Forum 2023.
Adds a number of internal auxiliary structures:
PauliTwirl class -- to represent a single Pauli twirl (i.e. pre- and post-operations plus an induced global phase).
generate_pauli_twirls function -- to compute operation-preserving Pauli twirls.
PauliTwirlPass parent class -- to perform Pauli twirling in all gates of the circuit (i.e. not just two-qubit gates).
A suite of related validation functions to handle user input smoothly.
Adds an internal library of pre-computed Pauli twirls for all unparameterized two-qubit in the standard library today. This library is used for performance purposes (i.e. to avoid numerical re-computation of the twirls).
Summary
Adds new
TwoQubitPauliTwirlPass
class to perform Pauli twirling randomly on all two qubit gates of a circuit during transpilation.Details and comments
PauliTwirl
class -- to represent a single Pauli twirl (i.e. pre- and post-operations plus an induced global phase).generate_pauli_twirls
function -- to compute operation-preserving Pauli twirls.PauliTwirlPass
parent class -- to perform Pauli twirling in all gates of the circuit (i.e. not just two-qubit gates).