Raw File
Tip revision: fb0341d7eb6d3ae899a20f913e9f550f738d1bea authored by ah744 on 22 December 2016, 07:02:43 UTC
afree patch
Tip revision: fb0341d
\section{Stand-Alone Installation}
The instructions below allow for the installation of the RKQC tool as a stand-alone application. The full RKQC tool also comes fully integrated in new ScaffCC installations.


The first step in installation is to obtain RKQC from the public repository. It can be cloned through the Git tool by:
    mkdir rkqc 
    git clone rkqc/

\subsection{Build and Compile}

There are two steps to building and compiling RKQC. The first is to build and obtain the dependencies, and the second is to compile the system. These are both combined in the script "", and invoking this script from the main directory will build and compile the system. 


RKQC is now built and compiled on your system.

\section{First Example}

The example circuits are located in: 

In order to compile and run any of these examples, the "revkit" script may be invoked, located in the main directory of RKQC. 

The example circuit "e001\_hello\_world.cpp": 

	using namespace revkit;
	int main( int argc, char ** argv )
	   qbit a;
	   qbit b;
	   qbit c;
		cnot(b, c);
		toffoli(a, b, c);
	   return 0;


can be compiled with RKQC by invoking the revkit script and the example circuit name, without the file extension, from the main directory of RKQC. This circuit has three input and output signals, and three reversible logic gates.  

	./revkit e001\_hello\_world

The compiler then creates the output ".qasm" file, containing the quantum assembly language instructions generated for this circuit. For "e001", the file "e001\_hello\_world.qasm" contains:

    qubit w0
    qubit w1
    qubit w2
    X w0
    cnot w1, w2
    toffoli w0,w1,w2

back to top