It can be shown that any classical function $f$ can be implemented by a quantum circuit $Q_f$, so that $$ \sum_{x}|x,0^k\rangle \xrightarrow{\mathit{Q_f}} \sum_{x}|x,f(x)\rangle $$ where $f$ has $k$ output bits, and ingnoring normalization. I have seen such circuits called quantum oracles and treated as black boxes in quantum algorithms. If I want to write a quantum computer program that includes the circuit $Q_f$, it is convenient to write a classical program for $f$ in a high level language (like C or Java or python) and have it compiled to a quantum circuit.
My question is: is there an implementation of a compiler (preferably open source) that will compile my classical high-level program for $f$ into some representation of the quantum circuit $Q_f$ (e.g. using OpenQASM)? If not, is there a compiler that will compile into reversible gates?
Thanks!
kgi