Piquasso documentation


Piquasso is an open source Python package, which allows you to simulate a photonic quantum computer.


Installation

Instructions on the installation of the Piquasso package

Installation
Tutorials

Basic tutorials for using Piquasso

Tutorials
Simulators

The built-in simulators in Piquasso

Simulators
API reference

API reference for Piquasso

API reference

Code example

import numpy as np
import piquasso as pq

# Program definition
with pq.Program() as program:
   # Prepare a Gaussian vacuum state
   pq.Q() | pq.Vacuum()

   # Displace the state on mode 0
   pq.Q(0) | pq.Displacement(r=np.sqrt(2), phi=np.pi / 4)

   # Use a beamsplitter gate on modes 0, 1
   pq.Q(0, 1) | pq.Beamsplitter(theta=np.pi / 3, phi=np.pi / 2)

   # Measurement on mode 0
   pq.Q(0) | pq.HomodyneMeasurement(phi=0)

# Creating the Gaussian simulator
simulator = pq.GaussianSimulator(d=3)

# Apply the program with 10 shots
result = simulator.execute(program, shots=10)

How to cite us

If you are doing research using Piquasso, please cite us as follows:

@misc{piquasso2024,
title         = {Piquasso: A Photonic Quantum Computer Simulation Software Platform},
author        = {Z. Kolarovszki and
                  T. Rybotycki and
                  P. Rakyta and
                  Á. Kaposi and
                  B. Poór and
                  Sz. Jóczik and
                  D. T. R. Nagy and
                  H. Varga and
                  K. H. El-Safty and
                  G. Morse and
                  M. Oszmaniec and
                  T. Kozsik and
                  Z. Zimborás
                  },
year          = {2024},
eprint        = {2403.04006},
archiveprefix = {arXiv},
primaryclass  = {quant-ph}
}