Utilities#

fidelities.fidelity(P1, P2)

Compute the fidelity between two probability distributions.

fidelities.normalized_fidelity(exact_probs, ...)

Normalize fidelity against a fully depolarized output distribution.

noiseless_simulation.compute_ideal_outputs(qc)

Compute the ideal probabilities of the quantum circuit for all possible reversed (big-endian) bitstrings.

noiseless_simulation.final_statevector(qc)

Remove the final measurement of a quantum circuit and return the statevector of the circuit.

PauliTwirl([gates_to_twirl, seed])

Randomly insert Pauli twirls around chosen two-qubit gates.