pygsti.tools.symplectic.colsum#
- colsum(i, j, s, p, n)#
A helper routine used for manipulating stabilizer state representations.
Updates the i-th stabilizer generator (column of s and element of p) with the group-action product of the j-th and the i-th generators, i.e.
generator[i] -> generator[j] + generator[i]
- Parameters:
i (int) – Destination generator index.
j (int) – Sournce generator index.
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