Piquasso logo

Piquasso is an open-source Python package for simulating photonic quantum computers.

Build photonic programs from preparations, gates, measurements, and channels, then execute them with task-specific high-performance simulators. Piquasso supports Gaussian, Fock-space, and Boson Sampling-based workflows, from small examples to adaptive and differentiable simulations.

Get started

Installation

Install Piquasso and verify your local setup.

Installation
Tutorials

Learn the basic program structure through guided examples.

Tutorials
Simulators

Choose the simulator that matches your circuit and representation.

Simulators
API reference

Browse the public classes, functions, and configuration options.

API reference

Explore Piquasso

Instructions

Use preparations, gates, measurements, channels, and adaptive execution.

Instructions
States

Inspect the state representations returned by the simulators.

States
Connectors

Use alternative numerical backends, including JAX-based workflows.

Connectors
Advanced topics

Learn about decompositions and specialized simulation workflows.

Decompositions

Code example

The example below prepares a Gaussian state, applies a displacement and a beamsplitter, then performs a homodyne measurement.

import numpy as np
import piquasso as pq

with pq.Program() as program:
   pq.Q() | pq.Vacuum()
   pq.Q(0) | pq.Displacement(r=np.sqrt(2), phi=np.pi / 4)
   pq.Q(0, 1) | pq.Beamsplitter(theta=np.pi / 3, phi=np.pi / 2)
   pq.Q(0) | pq.HomodyneMeasurement(phi=0)

simulator = pq.GaussianSimulator(d=3)
result = simulator.execute(program, shots=10)

print(result.samples)

How to cite us

If you use Piquasso in your research, please cite:

Piquasso: A Photonic Quantum Computer Simulation Software Platform,
Quantum 9, 1708 (2025).
BibTeX entry
@article{Kolarovszki_2025,
   title={Piquasso: A Photonic Quantum Computer Simulation Software Platform},
   volume={9},
   ISSN={2521-327X},
   url={http://dx.doi.org/10.22331/q-2025-04-15-1708},
   DOI={10.22331/q-2025-04-15-1708},
   journal={Quantum},
   publisher={Verein zur Forderung des Open Access Publizierens in den Quantenwissenschaften},
   author={
      Kolarovszki, Zoltán
      and Rybotycki, Tomasz
      and Rakyta, Péter
      and Kaposi, Ágoston
      and Poór, Boldizsár
      and Jóczik, Szabolcs
      and Nagy, Dániel T. R.
      and Varga, Henrik
      and El-Safty, Kareem H.
      and Morse, Gregory
      and Oszmaniec, Michał
      and Kozsik, Tamás
      and Zimborás, Zoltán
   },
   year={2025},
   month=apr,
   pages={1708}
}

Notable features

Piquasso is designed for concise examples, adaptive photonic programs, and research workflows that need performance, differentiability, or realistic imperfections.

Task-specific simulators

Choose Gaussian, Fock-space, or Boson Sampling simulators depending on the circuit and the representation you need.

Simulators
Adaptive execution

Use mid-circuit measurements, postselection, and conditional instructions to build adaptive photonic programs.

Instructions
Runtime-resolved parameters

Let instruction parameters depend on previous measurement outcomes using Python callables or expression strings.

Instructions
Losses and imperfections

Model non-unitary effects such as photon loss and other realistic imperfections through channel instructions.

Channels
Differentiable workflows

Build optimization workflows for trainable photonic circuits and quantum neural-network-style simulations.

CVQNN Module
JAX, GPU, and performance

Use connector-based workflows and optimized backends for demanding simulations and accelerator-ready execution.

Connectors