pygsti.tools.errgenproptools

pygsti.tools.errgenproptools#

Tools for the propagation of error generators through circuits.

Functions

acom(P1, P2)

alpha(errorgen, tableau, desired_bitstring)

First-order error generator sensitivity function for probability.

alpha_numerical(errorgen, tableau, ...)

First-order error generator sensitivity function for probability.

alpha_pauli(errorgen, tableau, pauli)

First-order error generator sensitivity function for pauli expectations.

alpha_pauli_numerical(errorgen, tableau, pauli)

First-order error generator sensitivity function for pauli expectations.

amplitude_of_state(tableau, desired_state, ...)

Get the amplitude of a particular computational basis state for given stabilizer state.

approximate_stabilizer_pauli_expectation(...)

Calculate the approximate probability of a desired bit string using a first-order approximation.

approximate_stabilizer_pauli_expectation_numerical(...)

Calculate the approximate probability of a desired bit string using a first-order approximation.

approximate_stabilizer_probabilities(...[, ...])

Calculate the approximate probability distribution over all bitstrings using a first-order approximation.

approximate_stabilizer_probability(...[, ...])

Calculate the approximate probability of a desired bit string using an nth-order taylor series approximation.

bch_approximation(errgen_layer_1, errgen_layer_2)

Apply the BCH approximation at the given order to combine the input dictionaries of error generator rates.

bch_numerical(propagated_errorgen_layers, ...)

Iteratively compute effective error generator layer produced by applying the BCH approximation to the list of input error generator matrices.

bitstring_to_tableau(bitstring)

Map a computational basis bit string into a corresponding Tableau which maps the all zero state into that state.

bulk_alpha(errorgens, tableau, ...)

First-order error generator sensitivity function for probability.

bulk_alpha_pauli(errorgens, tableau, paulis)

First-order error generator sensitivity function for pauli expectations.

bulk_amplitude_of_state(tableau, ...)

Get the amplitudes particular computational basis state fors given stabilizer state.

bulk_phi(tableau, desired_bitstring, Ps, Qs)

Computes the phi function for multiple (P, Q) pairs at once while caching and reusing intermediate values computed via pauli_phase_update_all_zeros and amplitude_of_state.

com(P1, P2)

compute_phase_reference(tableau)

Compute a canonical state, corresponding to the smallest state with non-zero amplitude, to use as a phase reference in computing the phases of components of this stabilizer state.

errgen_coeff_label_to_stim_pauli_strs(...)

Converts an input GlobalElementaryErrorgenLabel to a tuple of stim.PauliString objects, padded with an appropriate number of identities.

error_generator_commutator(errorgen_1, ...)

Returns the commutator of two error generators.

error_generator_commutator_numerical(...[, ...])

Numerically compute the commutator of the two specified elementary error generators.

error_generator_composition(errorgen_1, ...)

Returns the composition of two error generators.

error_generator_composition_numerical(...[, ...])

Numerically compute the composition of the two specified elementary error generators.

error_generator_taylor_expansion(errorgen_dict)

Compute the nth-order taylor expansion for the exponentiation of the error generator described by the input error generator dictionary.

error_generator_taylor_expansion_numerical(...)

Compute the nth-order taylor expansion for the exponentiation of the error generator described by the input error generator dictionary.

errorgen_layer_to_matrix(errorgen_layer, ...)

Converts an iterable over error generator coefficients and rates into the corresponding dense numpy array representation.

errorgen_pauli_action(errorgen, pauli)

Apply the specified error generator to a given Pauli operator.

errorgen_pauli_action_numerical(errorgen, pauli)

Apply the specified error generator to a given Pauli operator.

in_stabilizer_support(tableau, desired_state)

Return whether or not the desired bitstring is in the support of the stabilizer state corresponding to the input tableau.

iterative_error_generator_composition(...)

Iteratively compute error generator compositions.

iterative_error_generator_composition_numerical(...)

Iteratively compute error generator compositions.

magnus_expansion(errorgen_layers[, ...])

Function for computing the nth-order magnus expansion for a set of error generator layers.

magnus_numerical(propagated_errorgen_layers, ...)

Compute effective error generator layer produced by applying the magnus expansions to the list of input error generator matrices.

pairwise_bch_numerical(mat1, mat2[, order])

Helper function for doing the numerical BCH in a pairwise fashion.

pauli_phase_update(pauli, bitstring[, dual])

Takes as input a pauli and a bit string and computes the output bitstring and the overall phase that bit string accumulates.

pauli_phase_update_all_zeros(pauli[, dual])

Specialized version of pauli_phase_update for the case of the all-zeros bitstring which is more computationally efficient.

pauli_product(P1, P2)

phi(tableau, desired_bitstring, P, Q)

This function computes a quantity whose value is used in expression for the sensitivity of probabilities to error generators.

phi_numerical(tableau, desired_bitstring, P, Q)

This function computes a quantity whose value is used in expression for the sensitivity of probabilities to error generators.

random_support(tableau[, return_support])

Compute the number of bits over which the stabilizer state corresponding to this stim tableau would have measurement outcomes which are random.

slow_amplitude_of_state(tableau, ...)

Get the amplitude of a particular computational basis state for given stabilizer state.

slow_bulk_alpha(errorgens, tableau, ...)

First-order error generator sensitivity function for probability.

slow_bulk_alpha_pauli(errorgens, tableau, paulis)

First-order error generator sensitivity function for pauli expectations.

slow_bulk_amplitude_of_state(tableau, ...)

Get the amplitudes particular computational basis state fors given stabilizer state.

slow_bulk_phi(tableau, desired_bitstring, Ps, Qs)

Computes the phi function for multiple (P, Q) pairs at once while caching and reusing intermediate values computed via pauli_phase_update_all_zeros and amplitude_of_state.

slow_pauli_phase_update(pauli, bitstring[, dual])

Takes as input a pauli and a bit string and computes the output bitstring and the overall phase that bit string accumulates.

slow_pauli_phase_update_all_zeros(pauli[, dual])

Specialized version of pauli_phase_update for the case of the all-zeros bitstring which is more computationally efficient.

stabilizer_pauli_expectation(tableau, pauli)

Calculate the output probability for the specified output bitstring.

stabilizer_pauli_expectation_correction(...)

Compute the kth-order correction to the expectation value of the specified pauli.

stabilizer_pauli_expectation_correction_numerical(...)

Compute the kth-order correction to the expectation value of the specified pauli.

stabilizer_probability(tableau, ...)

Calculate the output probability for the specified output bitstring.

stabilizer_probability_correction(...[, ...])

Compute the kth-order correction to the probability of the specified bit string.

stim_pauli_string_less_than(pauli1, pauli2)

Returns true if pauli1 is less than pauli lexicographically.

tableau_fidelity(tableau1, tableau2)

Calculate the fidelity between the stabilizer states corresponding to the given stim tableaus.

zassenhaus_formula(errorgen_groups[, ...])

Function for computing the nth-order Zassenhaus formula for a set of error generators.

zassenhaus_formula_numerical(...[, ...])

Function for numerically computing the nth-order Zassenhaus formula for a set of error generators.