LEQA

LEQA is a fast latency estimation tool for evaluating the performance of a quantum algorithm mapped to a quantum fabric. The actual quantum algorithm latency can be computed by performing detailed scheduling, placement and routing of the quantum instructions and qubits in a quantum operation dependency graph on a quantum circuit fabric. This is, however, a very expensive proposition that requires large amounts of processing time. Instead, LEQA, which is based on computing the neighborhood population counts of qubits, can produce estimates of the circuit latency with good accuracy (i.e., an average of less than 3% error) with up to two orders of magnitude speedup for mid-size benchmarks. This speedup is expected to increase super-linearly as a function of circuit size (operation count).

Download

You may download LEQA from here or from my github.

Change Log
  • 1.00: Initial release.
Directories & Files Structure

Requirements
  1. Ant 1.7
  2. Oracle Java 7-JDK or higher (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
Preinstall

Make sure that all the requirements are already installed. The following environmental variable should be set before the installation/running of the program.

  • JAVA_HOME should point where java and javac binary files are located.

Compile

Method 1: Run the following command in the root directory of the project to build QSPR:

This command will clean the built files:

Method 2: You may use Eclipse to import source files as explained next.

  1. Select File->Import.
  2. Select General->Existing Projects into Workspace and choose Next.
  3. In the root directory, point to the location of Java source files.
  4. Select Finish.
  5. Make sure JavaCC plugin is installed in Eclipse.

Note: We have included a pre-built version of LEQA called leqa-prebuilt.jar. It is recommended to use it if you do not want to modify LEQA.

Run

Run the following command to perform the scheduling and placement of quantum logical instructions, and routing of logical qubits.

LEQA options are listed below:

Example

Getting the latency estimation for the 8-bit adder circuit described in QASM:

Note: You can also provide quantum circuits described in TFC format to LEQA. LEQA first converts them to QASM and then performs the rest of its job. Note that this conversion is very simplistic and not optimal.

Sample Output

The provided tool is fully tested on a server machine with the following specification:
– OS: Debian Wheezy (Debian 7) AMD64 edition
– CPU: Intel Core i7-3770 CPU @ 3.40GHz
– Memory: 8 GB
Note: We have tested LEQA in Windows 7 and it worked flawlessly.

Output:

Developers

Mohammad Javad Dousti 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.