MEDUSA (Multi-Terminal Binary DEcision Diagram-based QUantum SimulAtor) is an MTBDD-based quantum circuit simulator supporting OpenQASM circuits.
It is written in C and utilizes the Sylvan library for custom MTBDDs and MTBDD operations.
Dependencies:
gmplibrarySylvanand thereforeLacelibraries - can be installed viamake(needsgit), see below for more details
Before trying to build this project, make sure to have gmp library (libgmp-dev) installed on your machine.
Then you can download the remaining dependencies with:
make init
You can then build the project with:
make
The simulator accepts input files in the OpenQASM format, several circuit files can be found in the benchmarks directory:
./MEDUSA --file benchmarks/no-measure/BernsteinVazirani/01.qasm
You can also run the simulator with the flag --info to print runtime (wall-clock time) and peak physical memory usage to the standard output.
MEDUSA also supports symbolic loop simulation which can be enabled using --symbolic. You can find more information about program options with --help.
The result of the simulation can be found in file res.dot. Beware that as these files can be quite large, it can take a while to convert them into a graph with a tool such as Graphviz. This can be done with:
make plot
Sometimes the resulting numbers can be very large. In this case substitute variables are used for these numbers in res.dot. The values of these variables can be found in file res-vars.txt.