Skip to content

Luke-Heyfron/TOpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages