yvdriess / mcc

Compiles a quantum computation in the form of Measurement Calculus command sequences and generates C++ code using intel Cnc
8 stars 2 forks source link

Measurement Calculus Compiler

  1. Introduction

Files included:

Any questions or comments can be sent to 'yvdriess at vub.ac.be'

  1. Installation

Requires

Quick start 'sh quickstart.sh' to bootstrap, compile and run a non-trivial program that should run in the order of single-digit seconds.

Bootstrapping 'sh bootstrap.sh' runs a save-lisp-and-die on the MCC program written in Common Lisp, this creates a binary called ./mcc which accepts valid Measurement Calculus programs.

Compiler './mcc < w3.mc' feeds a non-trivial (W3-entanglement creation) quantum computation to the compiler; producing C++ source and header files, respectively 'mccompiled.C' and 'mccompiled.h' QFT examples for 2 to 22 qubits can be found in the qft/ directory.

Running the mccompiled program run 'make' to build the generated C++ program and run the resulting './mccompiled'. You can control the number of threads with the -t argument, -s will make CnC report scheduler statistics and -d will output a CnC execution trace for debugging purposes. ./mccompiled [-t num_threads] [-s] [-d]

  1. See Also

    MCC compiles to a low-level 'quantum virtual machine' instruction set.

A fast stand-alone implementation of the low-level measurement calculus operations can be found on github as well: https://github.com/yvdriess/qvm