pygsti.tools.symplectic.random_symplectic_index

pygsti.tools.symplectic.random_symplectic_index#

random_symplectic_index(n, rand_state=None)#

The index of a uniformly random 2n x 2n symplectic matrix 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:
  • n (int) – Number of qubits (half dimension of symplectic matrix).

  • rand_state (RandomState, optional) – A np.random.RandomState object for seeding RNG

Return type:

numpy.ndarray