Replication Package




Prerequisites and Installation Guide

This section presents all the software required and the installation guide to Ubuntu 18.04.4 .

Install Quipper (version 0.9), which needs Haskell and Cabal :

$ sudo apt install haskell-platform
$ cabal update

Then run the following command line.

$ cabal install quipper

You may need to run the ensuing commands.

$ echo 'PATH="$HOME/.cabal/bin:$PATH"' >> .bashrc
$ source .bashrc

Create an IBM Q Experience account to run the quantum programs in a quantum device.

Although IBM Q Experience allows running the experiences online, it may be necessary to install Qiskit (version 0.14.1) to replicate the results in the paper.

Start to download Anaconda and execute the sh file.

Then run the following command line.

$ conda create -n name_of_my_env python=3
$ source activate name_of_my_env
$ pip3 install -Iv qiskit==0.14.1

To improve the quantum programs is essential to install PyZX . Run the ensuing commands.

$ git clone "https://github.com/Quantomatic/pyzx.git"
$ cd pyzx/
$ pip install -e .

Finally, install Gawk.

$ sudo apt install gawk

Experiment

The experiments in the paper follow the tool-chain.
Tool-chain of the experience.

Consider the matrix of GHCi that already produced when defining the case study.

Download the ensuing file to execute the Quipper section.

Afterward, employ the instructions on the Quipper Instructions link.

The tool quipperToQiskit does not change the least significant bit with the most significant bit. Do this process manually and correct any inconsistencies. Then, convert the Quipper circuit into a Qiskit circuit by running the following command line.

$ awk -f quipperToQiskit.gawk circuit_cnot_7x2_quipper_A.txt > circuit_cnot_7x2_qiskit.txt

Use the following Jupyter File to execute all remaining sections.