pygsti.extras.idletomography.pauliobjs.NQPauliState#
- class NQPauliState(string_rep, signs=None)#
Bases:
objectA N-qubit state that is the tensor product of N 1-qubit Pauli eigenstates. These can be represented as a string of Xs, Ys and Zz (but not Is) each with a +/- sign indicating which of the two eigenstates is meant.
A NQPauliState object can also be used to represent a POVM whose effects are the projections onto the 2^N tensor products of (the given) Pauli eigenstates. The +/- sign in this case indicates which eigenstate is equated with the “0” (vs “1”) outcome.
Create a NQPauliState
- Parameters:
string_rep (str) – A string with letters in {X,Y,Z} (note: I is not allowed!), specifying the Pauli basis for each qubit.
signs (tuple, optional) – A tuple of 0s and/or 1s. A zero means the “+” eigenvector is either prepared or corresponds to the “0” outcome (if this NQPauliState is used to describe a measurment basis). A one means the opposite: the “-” eigenvector is prepared and it corresponds to a “0” outcome. The default is all zeros.
Methods
__init__(string_rep[, signs])Create a NQPauliState
to_circuit(pauli_basis_dict)Convert this Pauli basis state or measurement to a fiducial operation sequence.
- to_circuit(pauli_basis_dict)#
Convert this Pauli basis state or measurement to a fiducial operation sequence.
When the returned operation sequence follows a preparation in the |0…0> Z-basis state or is followed by a Z-basis measurement (with all “+” signs), then the Pauli state preparation or measurement described by this object will be performed.
- Parameters:
pauli_basis_dict (dict) – A dictionary w/keys like “+X” or “-Y” and values that are tuples of gate names (not labels, which include qubit or other state-space designations), e.g. (“Gx”,”Gx”). This dictionary describes how to prepare or measure in Pauli bases.
- Return type: