Skip to content

Photonics

blackbird

Maintained by XanaduAI

image:: https://img.shields.io/github/workflow/status/XanaduAI/blackbird/Tests/master?logo=github&style=flat-square :alt: GitHub Workflow Status (branch) :target: https://github.com/XanaduAI/blackbird/actions?query=workflow%3ATests

C++Apache-2.0
blackbird illustration

Resource snapshot

Category

Photonics

Stars

77

Last pushed

Oct 18, 2022Updated 3y ago

Open issues

5

What it is

blackbird is maintained by XanaduAI and sits in the Photonics lane of the open-source quantum map.

image:: https://img.shields.io/github/workflow/status/XanaduAI/blackbird/Tests/master?logo=github&style=flat-square :alt: GitHub Workflow Status (branch) :target: https://github.com/XanaduAI/blackbird/actions?query=workflow%3ATests

Last verified by Qtangl generator on May 27, 2026

Who it's for

People exploring optical and photonic models of quantum computing, especially outside the usual gate-model framing.

What you can build or learn

  • Understand how photonic circuits, modes, and optical programs are represented.
  • Compare photonic workflows with more familiar circuit-model SDKs.
  • Learn which parts of the photonics ecosystem are most approachable.

License

Apache-2.0

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~334 words · about 2 min readOpen on GitHub

Blackbird Quantum Assembly Language ###################################

:alt: GitHub Workflow Status (branch)
:target: https://github.com/XanaduAI/blackbird/actions?query=workflow%3ATests

:alt: Codecov coverage
:target: https://codecov.io/gh/XanaduAI/blackbird

:alt: Read the Docs
:target: https://quantum-blackbird.readthedocs.io

Blackbird is a quantum assembly language for continuous-variable quantum computation, that can be used to program Xanadu's quantum photonics hardware and Strawberry Fields simulator.

Features

The Blackbird repository contains three separate packages:

  • src: The Blackbird grammar specification in enhanced Brackus-Naur form

  • blackbird_python: to develop Blackbird parsers for integration with Python programs

  • blackbird_cpp: libraries and header files needed to develop Blackbird parsers for integration with C++ programs

All of these packages are independent, and can be installed separately without depending on one-another. However, if the grammar is ever modified, there is a command for updating the autogenerated parts of the Python and C++ parsers.

In addition, this repository contains:

  • example: Example Blackbird scripts

  • apps: Example Python/C++ applications using the above parsers

Getting started

Blackbird is a development library, designed to easily integrate Blackbird code into applications and interfaces.

To get the Blackbird grammar installed and running on your system, begin at the grammar installation guide <https://quantum-blackbird.readthedocs.io/en/latest/installing.html>. Then, familiarize yourself with the Blackbird's syntax and grammar <https://quantum-blackbird.readthedocs.io/en/latest/syntax.html> for specifying photonic quantum circuits. You can even generate Blackbird parsers for any target language supported by ANTLR, including Java, C#, JavaScript, Go, and Swift.

If you only want to develop an application that makes use of the Python parser <https://quantum-blackbird.readthedocs.io/en/latest/blackbird_python/init.html>_ or the C++ parser <https://quantum-blackbird.readthedocs.io/en/latest/blackbird_cpp/overview.html>_, you can go directly to those sections and their corresponding installation guides.

How to cite

If you are doing research using Blackbird, please cite

Nathan Killoran, Josh Izaac, Nicolás Quesada, Ville Bergholm, Matthew Amy, and Christian Weedbrook.
*Strawberry Fields: A Software Platform for Photonic Quantum Computing* 2018. `arXiv:1804.03159 <https://arxiv.org/abs/1804.03159>`_

Support

If you are having issues, please let us know by posting the issue on our Github issue tracker.

License

Blackbird is free and open source, released under the Apache License, Version 2.0.

Read on GitHub

Activity

Latest release

—

Watchers

10

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

quantumlib

Cirq

Python framework for creating, editing, and running Noisy Intermediate-Scale Quantum (NISQ) circuits.

PythonApache-2.0Flagship

4,971 stars · Updated 3mo ago

open-quantum-safe

liboqs

C library for prototyping and experimenting with quantum-resistant cryptography

CMITFlagship

2,946 stars · Updated 3mo ago

XanaduAI

pennylane

PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry.

PythonApache-2.0FlagshipQtangl relevant

3,229 stars · Updated 3mo ago

QISKit

qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0FlagshipQtangl relevant

7,412 stars · Updated 3mo ago

Microsoft

QuantumKatas

Tutorials and programming exercises for learning Q# and quantum computing

Jupyter NotebookMITFlagshipArchive

4,862 stars · Updated 2y ago

xanaduai

strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.

PythonApache-2.0FlagshipArchive

850 stars · Updated 7mo ago