Skip to main content

QFAST: Quantum Fast Approximate Synthesis Tool

QFAST is a quantum synthesis tool designed to produce short circuits and to scale well in practice. QFAST uses a mathematical model of circuits encoding both gate placement and function. This is packaged together with a hierarchical stochastic gradient descent formulation that combines “coarse-grained” fast optimization during circuit structure search with a better, but slower, stage only in the final circuit refinement.

Installation

The best way to install this python package is with pip.

pip install qfast

Usage

QFAST can be used to convert a quantum operation specified by a unitary matrix into a circuit given by openqasm code. There is a command-line interface provided with qfast that can be accessed by python -m qfast. This can be used to synthesize a matrix.

python -m qfast input.unitary output.qasm

Here the input.unitary file is a NumPy matrix saved with np.savetxt, the qasm output will be saved in the output.qasm file and the KAK native tool will be used. The command-line help option python -m qfast -h can be used for further information.

QFAST can also be used as a library, an example is included.

Native Tools

Native tools are necessary for QFAST to perform instantiation. During decomposition, the input unitary matrix is hierarchically broken into many smaller unitaries. At some level in the hierarchy, QFAST switches to instantiation, which uses a native synthesis tool to convert the small unitaries into native gates.

Included with this python package is the QSearch native tool. Here are some others:

References

Younis, Ed, et al. "QFAST: Quantum Synthesis Using a Hierarchical Continuous Circuit Space." arXiv preprint arXiv:2003.04462 (2020).

Quantum Fast Approximate Synthesis Tool (QFAST) Copyright (c) 2020, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

Metadata

Release files for qfast 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qfast 2.2.0
File Size Uploaded
qfast-2.2.0.tar.gz 25.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qfast 2.2.0
File Interpreter ABI Platform
qfast-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.8 kB

Release files / qfast-2.2.0.tar.gz

Download URL qfast-2.2.0.tar.gz
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
11b969812827293d4a684ce1d3d43a3e4bec0b6946f23aaf91b662ecca0662cf
BLAKE2b-256 checksum
How to use checksums
9df19ed74c799be8b8899f056d9371414e472f1f3791da4e7807513eedf8f3f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

Release files / qfast-2.2.0-py3-none-any.whl

Download URL qfast-2.2.0-py3-none-any.whl
Size 38.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
201e3f065de06e07f02168a2679ffa2613eb14f832d67ca815263703498698fb
BLAKE2b-256 checksum
How to use checksums
2109aecd410a7f1bc0092fac082cf5381854639b61a70a9962c1981d75a5ff43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page