QUASAR
QUantum Assembler for Star-topology ARchitectures
A Python package for compiling quantum circuits on star-topology devices, with support for both gate-level and pulse-level compilation for quantum computing and quantum sensing applications. Its gate-level synthesis backend is C++-based for performance.
Overview • Why QUASAR? • Installation • Licensing • Key Features • Target Architectures • Typical Workflow • Roadmap • Contact
Overview
Hardware-aware compilation is a prerequisite for running quantum algorithms and quantum sensing protocols on real devices, where the compiled circuit has to respect the connectivity and the native gate set of the hardware.
QUASAR is designed specifically for star-topology quantum architectures, with a particular focus on central-spin platforms such as nitrogen-vacancy (NV) centers in diamond. These platforms are promising for both quantum computing and quantum sensing, but their hardware structure introduces unique compilation challenges, including:
star-topology connectivity
architecture-specific native gate constraints
native gates realized directly by control pulses, with device-dependent durations and phases
QUASAR addresses these challenges through architecture-aware compilation methods that generate optimized implementations at both the gate and pulse levels.
QUASAR ships as two packages:
quasar: the pure-Python frontend — public API, gate-set abstractions, gate-level and pulse-level compiler orchestration, and Qiskit interoperabilityquasarcpp: the compiled backend that performs the gate synthesis. Distributed as a pre-built wheel; installed automatically withquasar.
Why QUASAR?
General-purpose quantum compilers often do not fully exploit the structure of star-topology hardware. QUASAR is designed to do exactly that.
Compared with established compilers such as BQSKit and Qiskit, QUASAR can help:
reduce two-qubit gate count
better match compilation output to hardware connectivity and gate asymmetry
support controlled trade-offs between circuit depth and gate errors
improve expected execution fidelity by reducing error accumulation
In the benchmarks described in the associated work, QUASAR currently supports circuits with up to 5 qubits.
This makes it applicable to NV-center quantum computing, quantum sensing protocol compilation, pulse sequence generation, and architecture-specific benchmarking.
Installation
QUASAR needs Python 3.11, 3.12 or 3.13, on Linux, macOS (Apple silicon) or Windows. The compiled backend is already prebuilt for each of those combinations.
Install
git clone git@github.com:faulhornlabs/quasar.git
cd quasar
python -m venv env
source env/bin/activate # env\Scripts\activate on Windows
pip install --find-links=wheels/ .
Install from GitHub
pip install git+https://github.com/faulhornlabs/quasar.git is not supported; clone the
repository and install from the local wheels as shown above instead.
Reinstall (update an existing install)
After a git pull, reinstall both packages:
pip install --force-reinstall --no-deps --no-index --find-links=wheels/ quasarcpp
pip install --force-reinstall --no-deps --find-links=wheels/ .
The first line installs the compiled backend from
wheels/only.The second line installs
quasaritself.--force-reinstallis needed because a new build inwheels/can keep its version number, and pip skips a package whose version already matches.--no-depskeeps the other dependencies as they are.
At import, quasar checks that the installed quasarcpp is the version it was released with.
If it is not, the error names both versions.
Pulse-level backends
Pulse compilation is optional. SimphonyBackend, which runs the pulse sequence in
simulation, needs simphony:
pip install --find-links=wheels/ ".[simphony-backend]"
This one pulls simphony, a spin-dynamics simulator, from its own repository.
Warning: an unrelated project holds the name
simphonyon PyPI, so the extra names the repository directly, and pip needs git available.
XeedQBackend emits pulse programs for real XeedQ hardware.
Plotting
Some built-in plotting functions and the tutorials’ circuit drawings need matplotlib:
pip install --find-links=wheels/ ".[plot]"
Licensing
Gate-level compilation needs a licence token from
Qutility @ Faulhorn Labs. A token is valid
only on the machine it was issued for. Set QUASAR_LICENSE_TOKEN, or write it
to ~/.quasar/token (%USERPROFILE%\.quasar\token on Windows).
A failed check raises quasar.exceptions.LicenseError, whose message says why.
Key Features
Gate-Level Compilation
QUASAR synthesizes circuits for star-topology devices with its compiled backend, quasarcpp:
synthesis for central-spin / star-topology connectivity
four synthesis strategies — Adaptive and Tree Search, each also in an error-aware version — and the Qiskit transpiler path as a baseline
a search over the logical-to-physical qubit mapping
state preparation, Pauli readout targets and resets, compiled into what the device can do
support for both shallow and deep circuits
reduced two-qubit gate usage compared with general-purpose compilers
Error-Aware Compilation
On noisy hardware, a numerically exact circuit is not always the best one: past some depth, the extra gates’ own error outweighs the compilation error they remove. The error-aware strategies return the circuit whose compilation error and gate errors are smallest together. The gate errors come from the gate set, which carries the device’s measured values.
Pulse-Level Compilation
For hardware execution, QUASAR lowers a native circuit to pulse-level representations optimized for star-topology platforms:
pulse sequence generation for NV-center-based devices
simulator-backed and hardware backends behind one backend interface
hardware-aware compilation beyond abstract gate decomposition
Target Architectures
QUASAR is intended for star-topology quantum hardware, especially central-spin systems such as:
NV centers in diamond
related architectures with one central qubit coupled to multiple peripheral qubits
These systems differ substantially from all-to-all or nearest-neighbor architectures, and QUASAR is specifically designed to account for:
nonuniform interaction structure
asymmetric native gate costs
hardware-aware pulse scheduling requirements
Typical Workflow
A typical QUASAR workflow consists of:
defining or importing a quantum circuit
choosing the gate set that describes the target hardware’s native gates and star topology (for example
CROTGateSetfor NV centers)selecting a compilation strategy through its config object — numerically exact synthesis (
AdaptiveConfig,TreeSearchConfig), error-aware synthesis (ErrorAwareTreeSearchConfig,ErrorAwareAdaptiveConfig), or the Qiskit transpiler path (QiskitConfig)compiling the logical circuit into a native circuit with
GateCompileroptionally lowering that native circuit to a pulse sequence with a
PulseCompilerbound to a pulse backendexporting the native circuit or the pulse sequence for simulation or execution
See the tutorial notebooks for concrete usage patterns, and the documentation for the full API reference.
Roadmap
The following are planned, not yet part of the package:
partitioning-based scalability, extending compilation to circuits up to 32 qubits by splitting them into star-topology blocks
pulse-level scheduling that reduces the total execution time of a compiled pulse sequence
refined noise models, for even more accurate gate-level compilation
a pulse optimizer module
Contact
For questions, support, or collaboration inquiries, please contact:
Qutility @ Faulhorn Labs — info@qutility.io
Legal Notices
This software depends on the following third-party components. Full license texts and
copyright notices are in THIRD-PARTY-LICENSES.md.
This software contains code from SQUANDER, licensed under the Apache License 2.0.
This software depends on NumPy, licensed under the BSD 3-Clause License.
This software depends on Qiskit, licensed under the Apache License 2.0.
This software depends on SciPy, licensed under the BSD 3-Clause License.
This software depends on Intel® oneAPI Threading Building Blocks (oneTBB); the binary distribution used here is licensed under the Intel Simplified Software License, oneTBB’s own source under the Apache License 2.0.