pygsti.tools.optools.project_errorgen

pygsti.tools.optools.project_errorgen#

project_errorgen(errorgen, elementary_errorgen_type, elementary_errorgen_basis, errorgen_basis='pp', return_dual_elementary_errorgens=False, return_projected_errorgen=False)#

Compute the projections of a gate error generator onto a set of elementary error generators. TODO: docstring update

This standard set of errors is given by projection_type, and is constructed from the elements of the projection_basis basis.

Parameters:
  • errorgen (: ndarray) – The error generator matrix to project.

  • projection_type ({"hamiltonian", "stochastic", "affine"}) – The type of error generators to project the gate error generator onto. If “hamiltonian”, then use the Hamiltonian generators which take a density matrix rho -> -i*[ H, rho ] for Pauli-product matrix H. If “stochastic”, then use the Stochastic error generators which take rho -> P*rho*P for Pauli-product matrix P (recall P is self adjoint). If “affine”, then use the affine error generators which take rho -> P (superop is |P>><<1|).

  • projection_basis ({'std', 'gm', 'pp', 'qt'} or Basis object) – The source and destination basis, respectively. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp), and Qutrit (qt) (or a custom basis object).

  • mx_basis ({'std', 'gm', 'pp', 'qt'} or Basis object) – The source and destination basis, respectively. Allowed values are Matrix-unit (std), Gell-Mann (gm), Pauli-product (pp), and Qutrit (qt) (or a custom basis object).

  • return_generators (bool, optional) – If True, return the error generators projected against along with the projection values themselves.

  • return_scale_fctr (bool, optional) – If True, also return the scaling factor that was used to multiply the projections onto normalized error generators to get the returned values.

Returns:

  • projections (numpy.ndarray) – An array of length equal to the number of elements in the basis used to construct the projectors. Typically this is is also the dimension of the gate (e.g. 4 for a single qubit).

  • generators (numpy.ndarray) – Only returned when return_generators == True. An array of shape (#basis-els,op_dim,op_dim) such that generators[i] is the generator corresponding to the i-th basis element. Note that these matrices are in the std (matrix unit) basis.