Quantum intermediate representations