Code Monkey home page Code Monkey logo

topt's Introduction

TOpt

Implementation of T gate optimization algorithm in reference https://arxiv.org/abs/1712.01557.

Installation:

  1. Create a folder called "bin" in the directory of this readme file.
  2. Make sure GCC is installed and run "make all" in the TOpt directory.

Usage:

A simple test can be execute by using:

make test

which uses the command:

./TOpt <command name> {-<option character> <option argument>}

e.g.

./TOpt circuit test.tfc -a todd -o output.sqc

The above command optimizes the circuit in file test.tfc using the TODD algorithm and saves the output circuit to output.sqc.

Command line options

circuit Optimizes Clifford + T circuit. Takes as input .tfc file with path given by argument . See http://webhome.cs.uvic.ca/~dmaslov/mach-read.html for syntax description.

Options:
	-a <algorithm>
		Selects 3-STR solver where <algorithm> can take values the following values.
			todd	TODD algorithm.
			tool	TOOL algorithm. Has additional options:
				-b <0|1> 	Without feedback|Feedback
				-s <g|lg|r> 	Greedy|Least greedy|Random qubit order selection.
				-r <integer> 	Sets n_RM to <integer>
			re	RE algorithm.
			rm	RM algorithm.
	-o <filename>
		If set, saves output circuit to file with path given by argument <filename> in deprocated .sqc format. Will implement code to output in .tfc format soon.
	-v <0|1>
		If argument is 1, TOpt will verify the functional equivalence of the input and output circuits using a brute force simulation of the quantum circuit.
	-h <integer>
		Sets cap on number of Hadamard ancillas to <integer>.
	-c <filename>
		If set, TOpt will add a row to the .csv file specified by the option value that contains data for the input circuit, optimization algorithm and output circuit. The row format is decribed in file "doc/csv_output_format.txt".

signature Optimizes a signature tensor. Takes as input .sig file with path given by argument . A .sig file is a sparse representation of the signature tensor with syntax as follows. First line must be n which sets the number of qubits of signature tensor, S. Remaining lines are of format a FOR S_{alpha,alpha,alpha}=1 OR b FOR S_{alpha,beta,beta}=S_{alpha,alpha,beta}=1 OR c FOR S_{alpha,beta,gamma} where each line indicates a value for which signature tensor element equals 1.

help Displays this readme file.

topt's People

Contributors

imranashraf avatar luke-heyfron avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.