{ "cells": [ { "cell_type": "markdown", "id": "275dc7b20c7a685e", "metadata": {}, "source": [ "# Optical Circuits" ] }, { "cell_type": "markdown", "id": "9939669dd5f675f", "metadata": {}, "source": [ "This tutorial covers Perceval Circuit build, display and usage.\n", "\n", "In Perceval, a *circuit* represents a setup of linear optics (LO) components, used\n", "to guide and act on photons. Simple examples of circuits are common optical devices such as beam\n", "splitters or phase shifters.\n", "\n", "A circuit has a fixed number of *spatial modes* (sometimes also called\n", "*paths*) $m$, which is the same for input as for output\n", "spatial modes.\n", "\n", "In particular, note that:\n", "\n", "* *single photon sources* aren't circuits, since they do not have input spatial\n", " modes (they don't guide or act on incoming photons, but *produce*\n", " photons that are sent into a circuit),\n", "* *photon detectors* aren't circuits either, for similar reasons" ] }, { "cell_type": "markdown", "id": "344937564c8718a0", "metadata": {}, "source": [ "## I. LO-components\n", "\n", "The linear optics components are the elementary blocks which act on Perceval quantum states.\n", "\n", "It's important to know how to handle the most basic components and understand their effects.\n", "\n", "At first, let's see what's possible with a `PERM` instance (permutation), a `BS` (beam splitter) and a `PS` (phase shifter).\n", "\n", "
All circuits and components can be displayed with `pcvl.pdisplay`
\n", "A *LO circuit* (just called \"circuit\" here) isn't the same as a\n", "*quantum circuit*. Quantum circuits act on *qubits*, i.e. abstract systems in a 2-dimensional\n", "Hilbert space (or \"computational space\"); while optical circuits act on *photons*\n", "distributed in spatial modes (in the \"Fock space\"). It is possible to simply encode\n", "qubits with photons in an optical circuit; some encodings are\n", "presented in a later tutorial.
 | \n", " | \n", "
\n", "Even if it is a good example to show how to decompose an arbitrary unitary matrix to a generic interferometer using Perceval, it is also possible to compute results without doing so. As the decomposition step is quite time-consuming, it's often better to skip this step when you're not sure if you require it.