pygsti.tools.optools#
Utility functions operating on operation matrices
Module Attributes
Single source of truth for how far a (POVM-effect) eigenvalue may fall outside [0, 1] before |
Functions
|
Computes the average gate fidelity (AGF) between two gates. |
|
Computes the average gate infidelity (AGI) between two gates. |
|
Construct the elementary error generator matrices, either in a dense or sparse representation, corresponding to the specified types and list of basis element subscripts. |
Construct the dual elementary error generator matrices, either in a dense or sparse representation, corresponding to the specified types and list of basis element subscripts. |
|
|
Returns a gauge transformation that maps gate_mx into a matrix that is co-diagonal with target_gate_mx. |
|
Constructs a gate-like quantity for the POVM within model. |
|
Construct the elementary error generator matrix, either in a dense or sparse representation, corresponding to the specified type and basis element subscripts. |
|
Construct the dual elementary error generator matrix, either in a dense or sparse representation, corresponding to the specified type and basis element subscripts. |
|
Decompose a gate matrix into fixed points, axes of rotation, angles of rotation, and decay rates. |
|
Returns the approximate diamond norm describing the difference between gate matrices. |
|
Compute the pure state describing the action of density matrix vector dmvec. |
|
Extract the outcome label from a "simplified" effect label. |
|
Extract the POVM label from a "simplified" effect label. |
|
For positive semidefinite matrices (x, y), define M(x,y) = √(√x · y · √x). |
|
|
|
Compute the elementary error generators of a certain type. |
|
Compute the set of dual-to-elementary error generators of a given type. |
|
Returns the "entanglement" process fidelity between gate matrices. |
|
Returns the entanglement infidelity (EI) between gate matrices. |
|
Construct the error generator from a gate and its target. |
Extract a dictionary of elemenary error generator coefficients and rates from the specified dense error generator matrix. |
|
|
mat is Hermitian of order n. |
|
Returns the quantum state fidelity between density matrices. |
|
Get an upper bound on the fidelity of the given operation matrix with any unitary operation matrix. |
|
Returns the frobenius distance between arrays: ||a - b||_Fro. |
|
Returns the square of the frobenius distance between arrays: (||a - b||_Fro)^2. |
|
Computes the average-over-gates of the infidelity between gates in model and the gates in target_model. |
|
Returns the generator infidelity between a and b, where b is the "target" operation. |
|
The diamond distance between instruments a and b. |
|
Infidelity between instruments a and b |
|
|
Whether typ is a recognized Lindblad-gate parameterization type. |
|
|
Compute the Jamiolkowski trace distance between operation matrices. |
|
The array op_x represents a completely positive superoperator X on Hilbert-Schmidt space, using op_basis as the basis for that space. |
|
Construct a gate from an error generator and a target gate. |
|
Computes the diamond distance between POVM maps using |
|
Computes the process (entanglement) fidelity between POVM maps. |
|
Computes the Jamiolkowski trace distance between POVM maps using |
|
Compute the projections of a gate error generator onto a set of elementary error generators. |
|
Construct a new model(s) by projecting the error generator of model onto some sub-space then reconstructing. |
|
Project each gate of model onto the eigenspace of the corresponding gate within target_model. |
|
Temporarily lower the global |
|
Let E denote the Hermitian matrix representation effect_superket, where 0 ≤ E ≤ 1. |
|
Construct a rotation operation matrix. |
|
Construct an error generator from a SPAM vector and it's target. |
|
Compute the vectorized density matrix which acts as the state psi. |
|
Compute the unitary corresponding to the (unitary-action!) super-operator superop. |
|
|
|
TODO: docstring |
|
TODO: docstring |
|
op is a linear operator on a Hilbert-Schmidt space, S, represented as a matrix in the op_basis basis. |
|
Compute the trace distance between matrices. |
|
Compute the trace norm of matrix a given by: |
|
Returns the "unitarity" of a channel. |
Get the linear operator on (vectorized) density matrices corresponding to a n-qubit unitary operator on states. |
|
Compute the superoperator corresponding to unitary matrix u. |
|
|
TODO: docstring |