Skip to content

System-Verification-Lab/MEDUSA

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MEDUSA: An MTBDD-based quantum circuit simulator

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.

Build

Dependencies:

  • gmp library
  • Sylvan and therefore Lace libraries - can be installed via make (needs git), 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

Usage

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.


About

An MTBDD-based quantum circuit simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • OpenQASM 100.0%