Using Coalton to Implement a Quantum Compiler
It is a surprising fact that you can build any 2n by 2n size complex unitary matrix out of the few basic matrices by way of matrix multiplications and Kronecker products.
One of the primary tasks of a quantum compiler is to break down arbitrary unitary matrices, usually given by the quantum programmer, into a sequence of native ones.
Different quantum computers each have a different set of native operations, so quilc must be a retargetable compiler.