pygsti.tools.optools.unitarity

Contents

pygsti.tools.optools.unitarity#

unitarity(a, mx_basis='gm')#

Returns the “unitarity” of a channel.

Unitarity is defined as in Wallman et al, “Estimating the Coherence of noise” NJP 17 113020 (2015). The unitarity is given by (Prop 1 in Wallman et al):

u(a) = Tr( A_u^{dagger} A_u ) / (d^2 - 1),

where A_u is the unital submatrix of a, and d is the dimension of the Hilbert space. When a is written in any basis for which the first element is the normalized identity (e.g., the pp or gm bases), The unital submatrix of a is the matrix obtained when the top row and left hand column is removed from a.

Parameters:
  • a (array or gate) – The gate for which the unitarity is to be computed.

  • mx_basis ({"std","gm","pp"} or a Basis object, optional) – The basis of the matrix.

Return type:

float