Getting Started

The Berkeley Quantum Synthesis Toolkit (BQSKit) [bis • kit] is a powerful and portable quantum compiler framework. It can be used with ease to compile quantum programs to efficient physical circuits for any QPU.


BQSKit is available for Python 3.8+ on Linux, macOS, and Windows. BQSKit and its dependencies are listed on the Python Package Index, and as such, pip can easily install it:

pip install bqskit

Basic Usage

A standard BQSKit workflow loads a program into the framework, models the target QPU, compiles the program, and exports the resulting circuit. The below example uses BQSKit to optimize an input circuit provided by a qasm file:

from bqskit import compile, Circuit

# Load a circuit from QASM
circuit = Circuit.from_file("input.qasm")

# Compile the circuit
compiled_circuit = compile(circuit)

# Save output as QASM"output.qasm")

To learn more about BQSKit, follow the tutorial series or refer to the documentation.

How to Cite

You can use the software disclosure to cite the BQSKit package.

Additionally, if you used or extended a specific algorithm, you should cite that individually. BQSKit passes will include a relevant reference in their documentation.