StationQ / Liquid

The Language-Integrated Quantum Operations (LIQUi|>) Simulator
http://StationQ.github.io/Liquid
Other
440 stars 97 forks source link

Take QASM code as simulator input? #34

Closed yongshanding closed 8 years ago

yongshanding commented 8 years ago

Hello, our research group is trying to take advantage of the simulation power of Liquid. Is there a way to perform simulations on user QASM code (perhaps by translating QASM code to something that's compatible with Liquid), or does the circuit have to be compiled and simulated all within Liquid? By the way, is the UserSample() function in Liquid/linux/Main.fs built for this purpose? Thank you!

dbwz8 commented 8 years ago

I think what you suggest would be the easiest. Just translate the QASM code (pretty much line for line) to LIQUi|> gate function calls. You could then set it up as a script to run fairly easily. The example in my UserCode directory goes the other way, translating a LIQUi|> circuit to QASM for use in other simulators. You could use Teleport.fsx in the samples folder as a templet for how to write a script.

yongshanding commented 8 years ago

Thank you very much for the reply!