# How can I generate (suitably random) symplectic matrices?

I would like to write a computer script to generate a lot of symplectic matrices. How can I do this? Is there a parameterization of all symplectic matrices?

-

http://www-stat.stanford.edu/~cgates/PERSI/papers/what-is.pdf

-
Choose a subgroup that is easy to generate, say $Sp(2)$, and pick a random pair of coordinates $i < j$ and a random element in $Sp(2)$ spanning the subspace spanned by those two coordinates. This gives a markov chain analogous to the Kac random walk. It is known that this procedure converges. In fact if it measures the convergence rate in the transportation distance, then the rate is $n^2 \log n$.