Quantum ULB Factory Designer (QUFD) maps a given QASM file to a supplied PMD fabric. The resultant MCL file of the mapped circuit will be generated. This tool designs Ion Trap tiles to be used by Quantum Physical Designer (such as HL-QSPR or Squash). It calculates the physical resource requirements for the mapping process.
Download
You may download QUFD from here or from my github.
Change Log
- 1.00: Initial release.
Directories & Files Structure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
QUFD |-- build.xml -> Ant build file |-- FTGates -> QASM files for each fault-tolerant gate |-- PMD |-- IonTrap.xml -> IonTrap fabric description |-- qufd.pdf -> QUFD paper published in QIP 2014 |-- src |-- edu -> Java source code directory |-- libs |-- commons-cli-1.2.jar -> Appache Commons CLI library |-- commons-lang3-3.1.jar -> Apache Commons Lang library |-- commons-logging-1.1.3.jar -> Apache Commons Logging library |-- gurobi.jar -> Gurobi 5.6.2 Java interface |-- jar-in-jar-loader.zip -> Jar loader file taken from Eclipse. |-- javacc.jar -> Java Compiler Compiler (JavaCC) |-- javaoctave-0.6.4.jar -> JavaOctave library. A bridge from Java to Octave, useful if you want to use the free solver (qpOASES). |-- jgrapht-jdk1.6.jar -> JGraphT library. |-- qpOASES-3.0beta -> A free quadratic programming solver. `-- README -> This readme file. |
Requirements
- Ant 1.7
- Oracle Java 7-JDK or higher (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
- Gurobi Optimizer 5.6.2 (free for academic use.)
or - Octave 3.6
— liboctave-dev
— octave-common
Note: If you intend to use any version of Gurobi other than 5.6.2, you must replace src/libs/gurobi.jar with the one provided in the version you have (located in the “lib” directory) and recompile the project.
Preinstall
Make sure that all the requirements are already installed. The following environmental variables should be set before the installation/running of the program.
- JAVA_HOME should point where java and javac binary files are located.
- GUROBI_HOME and GRB_LICENSE_FILE should point to the appropriate location. Please refer to the installation readme of Gurobi. PATH and LD_LIBRARY_PATH should also be updated accordingly.
or - Octave binary file should be in the system PATH.
Compile
A Makefile takes care of the build process.
- The following command makes QUFD with Gurobi support:
1 |
make |
- The following command makes QUFD with qpOASES support:
1 |
make no_gurobi |
- The following command cleans the project:
1 |
make clean |
Again, note that if you intend to use any version of Gurobi other than 5.6.2, you must replace src/libs/gurobi.jar with the one provided in the version you have (located in the “lib” directory) and recompile the project.
Run
Run the following command to perform tile design for Ion-Trap PMD.
1 |
java -jar qufd.jar |
QUFD options are listed below:
1 2 3 4 5 6 7 8 9 |
usage: qufd [-h] [-i <file>] [-m <file>] [-p <file>] [-q <path>] [-r <file>] QUFD maps a given QASM to a supplied PMD fabric. The resultant MCL file of the mapped circuit will be generated. -h,--help Shows this help menu -i,--input <file> QASM input file -m,--mcl <file> MCL output file -p,--pmd <file> PMD file -q,--qpOASES <path> Uses qpOASES solver -r,--re <file> Resource estimation file |
Note: In order to use the free QP solver (qpOASES), the command should be changed as follows:
1 |
java -jar qufd.jar -q src/libs/qpOASES-3.0beta |
Examples
Getting the physical resource estimation for the FT-H gate, Ion Trap PMD, and [[7,1,3]] Steane code:
1 |
java -jar qufd.jar -i FTGates/H.qasm -p PMD/IonTrap.xml -r H.re -m H.mcl |
Example Outputs
Content of H.re:
1 2 3 4 5 6 7 8 9 10 11 |
rotz 7 c-x 7 measx 21 Qubit 35 rotxy 7 Move 5287 c-z 7 measz 7 geophase 64 Y 128 Z 128 |
Content of H.mcl (first 40 lines):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
Total Latency: 6064 us Qubit count: 35 Qubit q106 is placed @(5,1,5,4). Qubit q105 is placed @(8,0,2,5). Qubit q104 is placed @(7,0,3,5). Qubit q103 is placed @(4,0,6,5). Qubit q102 is placed @(7,2,3,3). Qubit q306 is placed @(6,4,4,1). Qubit q101 is placed @(3,0,7,5). Qubit q305 is placed @(9,0,1,5). Qubit q100 is placed @(8,1,2,4). Qubit q304 is placed @(4,4,6,1). Qubit q303 is placed @(9,1,1,4). Qubit q302 is placed @(8,2,2,3). Qubit q506 is placed @(6,0,4,0). Qubit q301 is placed @(2,0,8,5). Qubit q505 is placed @(6,0,4,0). Qubit q300 is placed @(3,1,7,4). Qubit q504 is placed @(6,0,4,0). Qubit q503 is placed @(6,0,4,0). Qubit q502 is placed @(6,0,4,0). Qubit q501 is placed @(6,0,5,0). Qubit q500 is placed @(6,0,5,0). Qubit q006 is placed @(5,0,5,5). Qubit q005 is placed @(6,0,4,5). Qubit q004 is placed @(7,1,3,4). Qubit q003 is placed @(6,1,4,4). Qubit q002 is placed @(6,2,4,3). Qubit q206 is placed @(4,2,6,3). Qubit q001 is placed @(4,1,6,4). Qubit q205 is placed @(6,3,4,2). Qubit q000 is placed @(7,3,3,2). Qubit q204 is placed @(3,2,7,3). Qubit q203 is placed @(5,2,5,3). Qubit q202 is placed @(4,3,6,2). Qubit q201 is placed @(5,3,5,2). Qubit q200 is placed @(7,4,3,1). SimTime: 10 Move q500 (6,0,5,0)->(6,0,4,0) Move q506 (6,0,4,0)->(6,0,5,0) Move q501 (6,0,5,0)->(6,0,4,0) Move q002 (6,2,4,3)->(6,2,4,2) Move q000 (7,3,3,2)->(7,3,3,1) Move q005 (6,0,4,5)->(6,0,4,6) Move q003 (6,1,4,4)->(6,1,4,3) Move q006 (5,0,5,5)->(5,0,5,4) Move q001 (4,1,6,4)->(4,1,6,3) Move q004 (7,1,3,4)->(7,1,3,5) Move q202 (4,3,6,2)->(4,3,6,1) Move q200 (7,4,3,1)->(7,4,3,0) Move q205 (6,3,4,2)->(6,3,4,3) Move q203 (5,2,5,3)->(5,2,5,4) Move q206 (4,2,6,3)->(4,2,6,4) Move q201 (5,3,5,2)->(5,3,5,3) Move q204 (3,2,7,3)->(3,2,7,2) Move q100 (8,1,2,4)->(8,1,2,3) Move q102 (7,2,3,3)->(7,2,3,4) Move q503 (6,0,4,0)->(6,0,5,0) Move q504 (6,0,4,0)->(6,0,5,0) Move q103 (4,0,6,5)->(4,0,6,4) Move q505 (6,0,4,0)->(6,0,5,0) Move q105 (8,0,2,5)->(8,0,2,4) Move q101 (3,0,7,5)->(3,0,7,6) Move q106 (5,1,5,4)->(5,1,5,5) Move q104 (7,0,3,5)->(7,0,3,4) Move q300 (3,1,7,4)->(3,1,7,3) Move q302 (8,2,2,3)->(8,2,2,2) Move q303 (9,1,1,4)->(9,1,1,3) Move q305 (9,0,1,5)->(9,0,1,4) Move q301 (2,0,8,5)->(2,0,8,6) Move q306 (6,4,4,1)->(6,4,4,2) Move q304 (4,4,6,1)->(4,4,6,2) Move q502 (6,0,4,0)->(6,0,3,0) SimTime: 20 Move q500 (6,0,4,0)->(6,0,3,0) Move q502 (6,0,3,0)->(6,0,2,0) Move q501 (6,0,4,0)->(6,0,4,1) Move q002 (6,2,4,2)->(6,2,4,1) Move q003 (6,1,4,3)->(6,1,4,2) Move q006 (5,0,5,4)->(5,0,5,3) Move q001 (4,1,6,3)->(4,1,6,2) Move q200 (7,4,3,0)->(7,3,3,10) Move q205 (6,3,4,3)->(6,3,4,4) Move q203 (5,2,5,4)->(5,2,5,5) Move q206 (4,2,6,4)->(4,2,6,5) Move q201 (5,3,5,3)->(5,3,5,4) Move q204 (3,2,7,2)->(3,2,7,1) Move q100 (8,1,2,3)->(8,1,2,2) Move q102 (7,2,3,4)->(7,2,3,5) Move q103 (4,0,6,4)->(4,0,6,3) Move q106 (5,1,5,5)->(5,1,5,6) Move q104 (7,0,3,4)->(7,0,3,3) Move q504 (6,0,5,0)->(6,0,6,0) Move q005 (6,0,4,6)->(6,0,4,7) Move q503 (6,0,5,0)->(6,0,6,0) Move q505 (6,0,5,0)->(6,0,6,0) Move q000 (7,3,3,1)->(7,3,3,0) Move q004 (7,1,3,5)->(7,1,3,6) Move q202 (4,3,6,1)->(4,3,6,0) Move q105 (8,0,2,4)->(8,0,2,3) Move q101 (3,0,7,6)->(3,0,7,7) Move q300 (3,1,7,3)->(3,1,7,2) Move q302 (8,2,2,2)->(8,2,2,1) Move q303 (9,1,1,3)->(9,1,1,2) Move q305 (9,0,1,4)->(9,0,1,3) Move q301 (2,0,8,6)->(2,0,8,7) Move q306 (6,4,4,2)->(6,4,4,3) Move q304 (4,4,6,2)->(4,4,6,3) Move q506 (6,0,5,0)->(6,0,6,0) |
Benchmarking Results
The provided tool is fully tested on a server machine with the following specification:
- OS: Debian Wheezy (Debian 7) AMD64 edition
- CPU: 4 x Intel Xeon Processor E7-8837 (a total of 32 cores)
- Memory: 64GB
- Storage: 6 x HP 300GB 6G SAS 15K RPM SFF
Example runtime: less than 1 min
Note: We have tested QUFD in Windows 7 and it worked flawlessly.
Developers
Hadi Goudarzi, Mohammad Javad Dousti, Alireza Shafaei Bejestan, and Massoud Pedram
Questions or Bugs?
You may contact Mohammad Javad Dousti for any questions you may have or bugs that you find.
License
Note: The 3rd-party library files included in src/libs have their own respective licenses.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Copyright (C) 2014 Hadi Goudarzi, Mohammad Javad Dousti, Alireza Shafaei Bejestan, and Massoud Pedram, SPORT lab, University of Southern California. All rights reserved. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any non-commercial purpose, provided that the above copyright notice and the following four paragraphs appear in all copies of this software, whether in binary form or not. IN NO EVENT SHALL THE AUTHORS OR THE UNIVERSITY OF SOUTHERN CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THEY HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND THE UNIVERSITY OF SOUTHERN CALIFORNIA SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. If you use this software or a modified version of it, either of the following papers must be cited: - H. Goudarzi, M. J. Dousti, A. Shafaei, and M. Pedram, "Design of a universal logic block for fault-tolerant realization of any logic operation in trapped-ion quantum circuits," Quantum Inf Process, vol. 13, no. 5, pp. 1267–1299, May 2014. - M. J. Dousti and M. Pedram, "Minimizing the Latency of Quantum Circuits During Mapping to the Ion-trap Circuit Fabric," in Proceedings of the Conference on Design, Automation and Test in Europe, San Jose, CA, USA, 2012, pp. 840–843. |