pygsti.objects.TPParameterizedGate

class pygsti.objects.TPParameterizedGate(M)

Encapsulates a gate matrix that is fully parameterized except for the first row, which is frozen to be [1 0 ... 0] so that the action of the gate, when interpreted in the Pauli or Gell-Mann basis, is trace preserving (TP).

__init__(M)

Initialize a TPParameterizedGate object.

Parameters:M (array_like or Gate) – a square 2D numpy array representing the gate action. The shape of this array sets the dimension of the gate.

Methods

__init__(M) Initialize a TPParameterizedGate object.
compose(otherGate) Create and return a new gate that is the composition of this gate followed by otherGate, which must be another TPParameterizedGate.
convert_to_matrix(M) Static method that converts a matrix-like object to a 2D numpy array.
copy() Copy this gate.
deriv_wrt_params([wrtFilter]) Construct a matrix whose columns are the vectorized derivatives of the flattened gate matrix with respect to a single gate parameter.
from_vector(v) Initialize the gate using a vector of parameters.
get_dimension() Return the dimension of the gate matrix.
num_params() Get the number of independent parameters which specify this gate.
set_matrix(M) Attempts to modify gate parameters so that the specified raw gate matrix becomes mx.
to_vector() Get the gate parameters as an array of values.
transform(S, Si) Update gate matrix G with inv(S) * G * S,