pygsti.tools.optools.spam_error_generator#
- spam_error_generator(spamvec, target_spamvec, mx_basis, typ='logGTi')#
Construct an error generator from a SPAM vector and it’s target.
Computes the value of the error generator given by errgen = log( diag(spamvec / target_spamvec) ), where division is element-wise. This results in a (non-unique) error generator matrix E such that spamvec = exp(E) * target_spamvec.
Note: This is currently of very limited use, as the above algorithm fails whenever target_spamvec has zero elements where spamvec doesn’t.
- Parameters:
spamvec (ndarray) – The SPAM vector.
target_spamvec (ndarray) – The target SPAM vector.
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).
typ ({"logGTi"}) –
The type of error generator to compute. Allowed values are:
”logGTi” : errgen = log( diag(spamvec / target_spamvec) )
- Returns:
errgen – The error generator.
- Return type:
ndarray