pygsti.extras.idletomography.pauliobjs.NQOutcome#
- class NQOutcome(string_rep)#
Bases:
objectA string of 0’s and 1’s representing a definite outcome in the Z-basis.
Create a NQOutcome.
- Parameters:
string_rep (str) – A string of 0s and 1s, one per qubit, e.g. “0010”.
Methods
__init__(string_rep)Create a NQOutcome.
flip(*indices)Flip "0" <-> "1" at any number of indices.
weight_1_string(n, i)creates a n-bit string with a 1 in location i.
weight_2_string(n, i, j)creates a n-bit string with 1s in locations i and j.
- flip(*indices)#
Flip “0” <-> “1” at any number of indices. This function takes a variable number of integer arguments specifying the qubit indices whose value should be flipped.
- Returns:
A new outcome object with flipped bits.
- Return type:
- classmethod weight_1_string(n, i)#
creates a n-bit string with a 1 in location i.
- classmethod weight_2_string(n, i, j)#
creates a n-bit string with 1s in locations i and j.