pygsti.tools.symplectic.compute_symplectic_label

pygsti.tools.symplectic.compute_symplectic_label#

compute_symplectic_label(gn, n=None)#

Returns the “canonical” index of 2n x 2n symplectic matrix gn over the finite field containing 0 and 1.

Code from “How to efficiently select an arbitrary Clifford group element” by Robert Koenig and John A. Smolin.

Parameters:
  • gn (numpy.ndarray) – symplectic matrix

  • n (int, optional) – Number of qubits (if None, use gn.shape[0] // 2).

Returns:

The canonical index of gn.

Return type:

int