  The problem of decomposing an arbitrary Clifford element into a sequence of
Clifford gates is known as Clifford synthesis. Drawing inspiration from
similarities between this and the famous Rubik's Cube problem, we develop a
machine learning approach for Clifford synthesis based on learning an
approximation to the distance to the identity. This approach is probabilistic
and computationally intensive. However, when a decomposition is successfully
found, it often involves fewer gates than existing synthesis algorithms.
Additionally, our approach is much more flexible than existing algorithms in
that arbitrary gate sets, device topologies, and gate fidelities may
incorporated, thus allowing for the approach to be tailored to a specific
device.
