pygsti.tools.symplectic.colsum_acc

Contents

pygsti.tools.symplectic.colsum_acc#

colsum_acc(acc_s, acc_p, j, s, p, n)#

A helper routine used for manipulating stabilizer state representations.

Similar to colsum() except a separate “accumulator” column is used instead of the i-th column of s and element of p. I.e., this performs:

acc[0] -> generator[j] + acc[0]

Parameters:
  • acc_s (numpy array) – The matrix over the integers mod 2 representing the “accumulator” stabilizer state

  • acc_p (numpy array) – The ‘phase vector’ over the integers mod 4 representing the “accumulator” stabilizer state

  • j (int) – Index of the stabilizer generator being accumulated (see above).

  • s (numpy array) – The matrix over the integers mod 2 representing the stabilizer state

  • p (numpy array) – The ‘phase vector’ over the integers mod 4 representing the stabilizer state

  • n (int) – The number of qubits. s must be shape (2n,2n) and p must be length 2n.

Return type:

None