# Analog Programmable-Photonic Computation

Andrés Macho-Ortiz1,$\ast$, Daniel Pérez-López1,2, José Azaña3 and José
Capmany1,2,$\ast$

1ITEAM Research Institute, Universitat Politècnica de València, Valencia
46022, Spain
2iPronics, Programmable Photonics, S.L, Camino de Vera s/n, Valencia 46022,
Spain
3Institut National de la Recherche Scientifique – Énergie, Matériaux, et
Télécommunications (INRS-EMT), Montréal, QC, Canada

$\ast$corresponding author<EMAIL_ADDRESS><EMAIL_ADDRESS>
### Abstract

Digital electronics is a technological cornerstone in our modern society which
has covered the increasing demand in computing power during the last decades
thanks to a periodic doubling of transistor density and power efficiency in
integrated circuits. Currently, such scaling laws are reaching their
fundamental limits, leading to the emergence of a large gamut of applications
that cannot be supported by digital electronics, specifically, those that
involve real-time _analog_ multi-data processing, e.g., medical diagnostic
imaging, robotic control and remote sensing, among others. In this scenario,
an analog computing approach implemented in a reconfigurable non-electronic
hardware such as programmable integrated photonics (PIP) can be more efficient
than digital electronics to perform these emerging applications. However,
actual analog computing models such as quantum and neuromorphic computation
were not conceived to extract the benefits of PIP technology (and integrated
photonics in general). In this work, we present the foundations of a new
computation theory, termed _Analog Programmable-Photonic Computation_ (APC),
explicitly designed to unleash the full potential of PIP. Interestingly, APC
enables overcoming some of the basic theoretical and technological limitations
of existing computational models, can be implemented in other technologies
(e.g. in electronics, acoustics or using metamaterials) and, consequently,
exhibits the potential to spark a ground-breaking impact on our information
society.

### Introduction

Over the last decades, digital electronic technology has supported the
increasing demand in signal processing and computing power thanks to an
exponential performance scaling in microelectronics. In particular, this
progress is embodied in Moore’s and Dennard’s laws by which the density of
transistors, power efficiency and clock frequency in microprocessors has
approximately doubled every 18-24 months [1, 2]. Nevertheless, as seen in Fig.
1a, these scaling laws are reaching their fundamental limits. As a result,
there is currently a wide range of emerging real-time signal processing and
computing applications (including medical diagnostic imaging, robotic control,
remote sensing, smart homes, and autonomous driving, among others) which may
not be efficiently dealt with using the dominant digital electronic paradigm
[1, 2, 3, 4, 5, 6].

Despite the fact that the electronic industry has proposed to circumvent the
end of Moore’s and Dennard’s laws by introducing multi-core technology, there
is a limit in the number of cores that can simultaneously be powered on with a
fixed power budget and a constant heat extraction rate (Amdahl’s law) [2, 3].
Moreover, as the bandwidth limitations of silicon electronics and printed
metallic tracks are reached, the time and power consumed in data transport in
an electrical circuit cannot be further reduced [2, 4]. These physical
bottlenecks $-$ in combination with the fact that conventional computational
models are conceived as serialized and centralized processing architectures
(von Neumann machines) implementing the nonlinear Boolean algebra $-$ severely
limit the performance of digital electronic computers [1, 2, 7, 8, 9]. In
general, such schemes are inefficient to perform multi-linear analog
operations and computational architectures that are distributed, parallel and
adaptive (Fig. 1b); for instance, those used to perform real-time matrix
operations, requiring low latency, high bandwidth, low energy consumption and
high reconfigurability (such as the applications mentioned above) [5, 6].

Although from the Church-Turing thesis can be inferred that any class of
computational problem (or computable function) can be solved by a digital
electronic computer [2, 10], this does not imply that digital computation (DC)
[9] and electronic technology always lead to the most suitable marriage
between a mathematical computing theory and a hardware platform. Other non-
digital computing approaches implemented in alternative system-on-chip
technologies can be mathematically more efficient than DC to solve the
aforementioned computational scenarios and may provide hardware advantages
over electronics in basic performance parameters (latency, bandwidth,
parallelism, power consumption, or reconfigurability) [1, 5, 6, 10, 11].
Specifically, technologies that are inherently capable of performing analog
operations offering complementary hardware requirements to those of
electronics and being CMOS-compatible are a priority [4, 12, 13].

In this context, programmable integrated photonics (PIP) is the ideal
technology to explore an analog computation paradigm since it is a hardware
platform with complementary features to electronics (providing lower latency,
higher bandwidth, massive parallelism via wavelength-division multiplexing
(WDM), lower power consumption and higher reconfigurability) and which may be
integrated into existing microelectronic processors by exploiting its CMOS
compatibility via silicon photonic platforms (Fig. 1c) [12, 13, 14].
Furthermore, PIP benefits from the scalable fabrication methods of integrated
circuits and its manufacturing could achieve economies of scale comparable
with microelectronic industry in the next decades [12].

So far, in the same vein as other optical computing platforms [4, 5, 6, 7, 11,
15, 16, 17, 18, 19], PIP has essentially been explored as a hardware
acceleration solution for existing computational models such as DC [9],
quantum computation (QC) [10] and neuromorphic computation (NC) [20]
implemented in electronic circuits. Here, PIP only carries out analog signal
processing tasks (i.e. wave transformations) which involve a high degree of
complexity in electronics (in particular, multi-dimensional wave
transformations via vector-by-matrix multiplications [12, 13, 14]), but does
not perform true computational tasks (i.e. operations among units of
information, e.g., among digital bits). In fact, at present, there is no
specific computation theory available explicitly designed for PIP (and
integrated photonics in general) that allows us to exploit this technology to
implement true optical computing, in the same way as DC sparked a paradigm
shift in commercial electronics. Moreover, DC, QC and NC were not conceived to
extract the benefits of PIP since these models were originally built without
considering the complexity of their implementation in integrated optics [4, 6,
11, 16, 21, 22].

Being PIP a hardware technology that naturally performs analog matrix
transformations on optical signals, and whose building block may be designed
by using a mathematical framework similar to QC [23], one could ask whether a
classical version of QC might be proposed within the realm of classical wave-
optics. Different works have been reported revolving around this idea in order
to [24, 25, 26, 27, 28, 29, 30]: (_i_) simulate a quantum computer with a
classical computer and (_ii_) dig into the fundamental differences between
quantum and classical systems. However, to our knowledge, the QC formalism has
never been extrapolated to a classical scenario to construct an analog
computing landscape, based on deterministic physical laws, which allows us to
overcome some of the main theoretical and technological limitations of QC [10,
25, 31, 32] (e.g., the need to operate with extreme low temperatures, the
practical difficulties to scale the capabilities of a quantum computer to a
large number of quantum bits (qubits), the wave function collapse in data
measurement, and the impossibility of performing cloning, summation, feedback
and non-unitary operations) and being explicitly designed to harness the full
potential of PIP technology.

To this end, here we present the foundations of an entire new class of
computation theory, termed as Analog Programmable-Photonic Computation (APC).
To achieve this overall aim, we will follow the steps sketched in Fig. 1d.
Firstly, we will propose a unit of information named as analog bit (or anbit)
and defined as a two-dimensional (2D) analog function (similar to the qubit,
but with essential differences, as detailed below). Secondly, we will
introduce the basic operations (i.e. gates) among anbits formalising the
underlying algebra. Thirdly, we will design the circuit implementations of
these gates using PIP technology and, fourthly, we will specify a roadmap to
further develop the APC in future works. Finally, a qualitative comparison
among the main properties of APC, DC, QC and NC is discussed, assessing the
unique potential and versatility offered by this computing paradigm.

### Results

#### _Unit of information: the analog bit_

APC emerges around the concept of performing analog operations on a new unit
of information, the anbit, which must be easily implementable using PIP
technology. In this vein, considering that the building block of PIP is
usually an optical circuit carrying out $2\times 2$ matrix transformations
[12, 13, 14, 23], we define an anbit as a 2D vector function
$\boldsymbol{\uppsi}\left(t\right)=\psi_{0}\left(t\right)\hat{\mathbf{e}}_{0}+\psi_{1}\left(t\right)\hat{\mathbf{e}}_{1}$,
where $\psi_{0,1}$ are scalar complex functions referred to as the anbit
amplitudes and $\hat{\mathbf{e}}_{0,1}$ are constant orthonormal vectors. The
user information is encoded in the moduli and phases of $\psi_{0,1}$, which
may be directly implementable in PIP using two classical optical wave packets
propagated in the fundamental modes of two parallel uncoupled waveguides, a
technique termed as space-encoding modulation (see Fig. 2a and Methods). In
this work, for the sake of simplicity, the temporal shape of the wave packets
are assumed rectangular (quasi-rectangular in practice, e.g., using super-
Gaussian pulses). In this fashion, the anbit amplitudes can be regarded as
time-invariant functions (complex numbers) within the time intervals where
$\psi_{0,1}$ are defined. Thus, in contrast to the discrete 1D nature of the
bit used in DC (whose value may be 0 or 1), $\psi_{0,1}$ can actually take on
a continuous range of complex values. Alternative physical implementations of
an anbit can be proposed by generating diverse shapes of the wave packets in
the space, mode, polarisation, frequency and time domains, giving rise to
different anbit modulation formats (Supplementary Note 1). Moreover, the
following noteworthy features of an anbit should be highlighted:

  * •

_Hilbert space_. The single-anbit vector space
$\mathscr{E}_{1}=\mathrm{span}\\{\hat{\mathbf{e}}_{0},\hat{\mathbf{e}}_{1}\\}$
in combination with the standard complex inner product
$\bigl{\langle}\cdot|\cdot\bigr{\rangle}$ lead to a Hilbert space with a
finite norm ($0\leq\left\|\boldsymbol{\uppsi}\right\|<\infty$) whose square
provides information about the optical power ($\mathcal{P}$) propagated by the
waveguides depicted in Fig. 2a:
$\mathcal{P}\equiv\left\|\boldsymbol{\uppsi}\right\|^{2}=\bigl{\langle}\boldsymbol{\uppsi}|\boldsymbol{\uppsi}\bigr{\rangle}=\left|\psi_{0}\right|^{2}+\left|\psi_{1}\right|^{2}$
(see Methods).

  * •

_Dimension_. Although, in general, we will work in a Hilbert space with
dimension $d=2$, we have the possibility of defining the unit of information
in a Hilbert space with $d\geq 1$, leading to different versions of APC termed
as $d$-APC (the usual case with $d=2$ will be referred to as APC for short).
In Supplementary Note 4, we discuss how to construct the theory with $d\neq
2$.

  * •

_Anbit period_. $\boldsymbol{\uppsi}$ is defined in a time interval
$T_{\mathrm{ANBIT}}$, termed as the anbit period, encompassing from the
beginning of $\psi_{0}$ or $\psi_{1}$ to the end of $\psi_{0}$ and $\psi_{1}$
(Fig. 2a). The anbit amplitudes are defined in different time intervals
$T_{0}$ and $T_{1}$ (with the possibility of setting $T_{0}=T_{1}$ or
$T_{0}\neq T_{1}$), and the time delay $\Delta T$ between
$\psi_{0}=\left|\psi_{0}\right|e^{i\angle_{0}}$ and
$\psi_{1}=\left|\psi_{1}\right|e^{i\angle_{1}}$ establishes a differential
phase $\angle_{1}-\angle_{0}=\omega_{\mathrm{c}}\Delta T$, where
$\omega_{\mathrm{c}}$ is the angular frequency of the optical carrier.

  * •

_Measurement and degrees of freedom_. The recovering of the user information
at the receiver will be referred to as the anbit measurement and can be
carried out via two different ways: (_i_) a coherent measurement,
implementable using coherent detection, or (_ii_) a differential measurement,
associated to a direct detection scheme (Fig. 2b). The former retrieves the
moduli and phases of $\psi_{0,1}$ (4 real degrees of freedom) and the latter
only provides information about $\left|\psi_{0,1}\right|^{2}$ and
$\angle_{1}-\angle_{0}$ (3 real degrees of freedom, in this case the global
phase of $\psi_{0,1}$ cannot be recovered, see Supplementary Note 1). Hence,
the number of effective degrees of freedom (EDFs) where the user information
can be encoded depends solely on the kind of anbit measurement employed at the
receiver. Although a differential measurement provides the lowest number of
EDFs, it is the most economical anbit measurement strategy in PIP.

  * •

_Geometric representations_. An anbit with 4 EDFs (coherent measurement) can
be geometrically represented by using a polar diagram illustrating the moduli
and phases of $\psi_{0,1}$ (Fig. 2c). An anbit with 3 EDFs (differential
measurement) may be represented in the generalised Bloch sphere (GBS), with a
radius different from 1 (Fig. 2d).

  * •

_Multiple anbits_. A multi-anbit gate will require to operate in a Hilbert
space ‘higher’ than $\mathscr{E}_{1}$. The construction of such a Hilbert
space can be carried out in APC by using the tensor product [33] or the
Cartesian product [34]. The former will allow us to extrapolate multi-anbit
gates from QC (e.g. controlled gates). The latter will be of great benefit to
construct multi-anbit linear operations which otherwise would exhibit a
nonlinear nature using the tensor product (e.g. the fan-in and fan-out gates,
see below). In Supplementary Note 1, we detail the main properties of the
tensor and Cartesian products within the framework of APC.

Despite the fact that the anbit is similar to the qubit (and to its classical
counterpart, the cebit [24]), the following fundamental differences should be
highlighted: (_i_) the anbit norm may be different from 1 and can be modified
using a non-unitary operation, (_ii_) the vector superposition of
$\hat{\mathbf{e}}_{0}$ and $\hat{\mathbf{e}}_{1}$ is preserved after an anbit
measurement (Fig. 2b), (_iii_) an anbit has 1 or 2 more EDFs than the qubit,
(_iv_) multiple anbits can be composed by using not only the tensor product
but also the Cartesian product, (_v_) an anbit may be defined in a one-
dimensional Hilbert space (the qubit cannot be restricted to one dimension
given that a global phase is not observable [10]). However, in contrast to QC,
in APC we will not be able to perform instantaneous non-local operations among
different anbits (i.e., the entanglement of multiple units of information)
because the underlying physical laws are deterministic [35].

Furthermore, taking into account the vector formalism required to describe an
anbit and its mathematical similitude with a qubit (but with the essential
differences discussed above), let us introduce at this point the use of
Dirac’s notation in order to: (_i_) simplify the mathematical calculations
when designing complex APC computing architectures and (_ii_) extrapolate
diverse analysis and design strategies from QC, preserving the same notation
between both computation theories. Therefore, from now on, let us express the
anbit as
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$,
with $\boldsymbol{\uppsi}\equiv\bigl{|}\psi\bigr{\rangle}$,
$\hat{\mathbf{e}}_{0}\equiv\bigl{|}0\bigr{\rangle}$ and
$\hat{\mathbf{e}}_{1}\equiv\bigl{|}1\bigr{\rangle}$.

#### _Fundamentals of combinational design: basic anbit gates_

The second natural step to construct the computation theory is to introduce
the basic anbit operations (or gates), see Fig. 3. The simplest operation that
can be built in APC is a gate of a single anbit: a non-feedback (or
combinational) system carrying out a transformation between two different
anbits, the input anbit
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$
and the output anbit
$\bigl{|}\varphi\bigr{\rangle}=\varphi_{0}\bigl{|}0\bigr{\rangle}+\varphi_{1}\bigl{|}1\bigr{\rangle}$
(Fig. 3a). Mathematically, the gate is described via an arbitrary mapping (or
operator) $\widehat{\mathrm{F}}:\mathscr{E}_{1}\rightarrow\mathscr{E}_{1}$,
which will be assumed to be a holomorphic function for convenience. In this
way, such a mapping can be written as a power series
$\widehat{\mathrm{F}}=\widehat{\mathrm{F}}^{\left(1\right)}+\widehat{\mathrm{F}}^{\left(2\right)}+\widehat{\mathrm{F}}^{\left(3\right)}+\ldots$,
with $\widehat{\mathrm{F}}^{\left(k\right)}$ accounting for the linear ($k=1$)
and nonlinear ($k>1$) responses of the gate. Considering that the PIP circuits
are typically linear systems [12, 13, 14], we will focus our attention on the
case $\widehat{\mathrm{F}}\equiv\widehat{\mathrm{F}}^{\left(1\right)}$, that
is, in linear gates. Nonetheless, it is worth mentioning that APC may also be
constructed by using nonlinear gates (see Methods).

Specifically, a single-anbit linear gate is described by a linear operator (or
endomorphism) $\widehat{\mathrm{F}}$ exhibiting the following general
properties:

  * •

_Uniqueness_. The input and output anbits are always related by a unique
endomorphism $\widehat{\mathrm{F}}$. This property directly follows from the
uniqueness of a linear transformation between vector spaces [36].

  * •

_Matrix representation_. Given an orthonormal vector basis
$\mathcal{B}_{1}=\left\\{\left|0\right\rangle,\left|1\right\rangle\right\\}$,
the matrix representation of $\widehat{\mathrm{F}}$ is unique and is given by
the expression (Supplementary Note 2):

$F=\left(\begin{array}[]{cc}\bigl{\langle}0|\widehat{\mathrm{F}}|0\bigr{\rangle}&\bigl{\langle}0|\widehat{\mathrm{F}}|1\bigr{\rangle}\\\
\bigl{\langle}1|\widehat{\mathrm{F}}|0\bigr{\rangle}&\bigl{\langle}1|\widehat{\mathrm{F}}|1\bigr{\rangle}\end{array}\right).$

Hence, the gate can equivalently be described by the matrix $F$ and the input-
output relation
$\bigl{|}\varphi\bigr{\rangle}=\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}$
can be expressed as
$\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=F\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}$,
where
$\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=\bigl{(}\begin{array}[]{cc}\varphi_{0}&\varphi_{1}\end{array}\bigr{)}^{T}$
and
$\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=\bigl{(}\begin{array}[]{cc}\psi_{0}&\psi_{1}\end{array}\bigr{)}^{T}$
($T$ denotes the transpose matrix).

  * •

_Reversibility_. By definition, a gate is reversible when
$\widehat{\mathrm{F}}$ is a bijective mapping (automorphism). In such
circumstances, $\det\left(F\right)\neq 0$ and the input anbit can be recovered
from the output anbit by applying the inverse mapping
$\widehat{\mathrm{F}}^{-1}$, whose matrix representation is $F^{-1}$.
Contrariwise, a gate is irreversible when $\det\left(F\right)=0$ and the input
anbit cannot be retrieved from the output anbit given that
$\cancel{\exists}\widehat{\mathrm{F}}^{-1}$.

  * •

_Non-locality_. The input-output relation
$\bigl{|}\varphi\bigr{\rangle}=\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}$
is non-local and causal. The input and output anbits are respectively encoded
by two different electric fields
$\boldsymbol{\mathcal{E}}\left(\mathbf{r}_{1},t_{1}\right)$ and
$\boldsymbol{\mathcal{E}}\left(\mathbf{r}_{2},t_{2}\right)$ with
$\mathbf{r}_{1}\neq\mathbf{r}_{2}$ and $t_{1}<t_{2}$ (see Methods).

  * •

_Classes of linear gates_. Since a linear gate can be described by a matrix,
we will use a terminology based on matrix theory [37] to define different
classes of operations: unitary gates (U-gates), general linear gates (G-gates)
and general matrix gates (M-gates). Concretely, the U-gates will account for
the linear reversible mappings that preserve the norm of the input anbit
(conservative operations) via a unitary matrix transformation. Contrariwise,
the G- and M-gates will describe non-conservative linear operations. While, by
definition, a G-gate is always reversible, an M-gate may be reversible or
irreversible, encompassing both possibilities. Hence, a G-gate will be
described by a general linear (i.e. non-singular) matrix, whereas an M-gate
will be associated to a general complex matrix (singular or non-singular).

  * •

_Geometric representation_. Using differential measurement (that will be the
case in most scenarios of APC), a single-anbit gate may be geometrically
interpreted as a trajectory between two different points in the GBS (Fig. 3a).
Specifically, the kind of trajectory depends on the class of the gate, see
Supplementary Note 2 for more details.

  * •

_Algebraic structure and universal matrices_. The U- and G-gates belong to the
$\mathrm{U}\left(2\right)$ and $\mathrm{GL}\left(2,\mathbb{C}\right)$ Lie
groups, respectively, while an M-gate belongs to the
$\mathfrak{gl}\left(2,\mathbb{C}\right)$ Lie algebra [37]. Using the
fundamentals of these algebraic structures [10, 23, 37, 38], it is
straightforward to find a universal (or arbitrary) matrix in each class of
gate, which must be able to describe all the possible $2\times 2$ matrix
transformations associated to the class when varying the value of its entries,
encoded by parameters. In particular, a universal matrix of a U-gate reads as
follows [10, 23]:

$U=e^{i\delta}R_{\hat{\mathbf{n}}}\left(\alpha\right)=e^{i\delta}\left(\begin{array}[]{cc}\cos\frac{\alpha}{2}-in_{z}\sin\frac{\alpha}{2}&-\left(n_{y}+in_{x}\right)\sin\frac{\alpha}{2}\\\
\left(n_{y}-in_{x}\right)\sin\frac{\alpha}{2}&\cos\frac{\alpha}{2}+in_{z}\sin\frac{\alpha}{2}\end{array}\right),$

where $\delta\in\left[0,2\pi\right)$ is a global phase shifting and
$R_{\hat{\mathbf{n}}}\left(\alpha\right)$ is a rotation matrix accounting for
a rotation of an angle $\alpha\in\left[0,2\pi\right]$ around an arbitrary unit
vector
$\hat{\mathbf{n}}=n_{x}\hat{\mathbf{x}}+n_{y}\hat{\mathbf{y}}+n_{z}\hat{\mathbf{z}}$
($n_{x,y,z}\in\left[-1,1\right]$) in the GBS (Fig. 3b). In addition, a
possible universal matrix of a G- or M-gate is a parametric matrix (denoted as
$G$ or $M$, respectively) with the four entries described by four independent
complex numbers [37, 38]. Nevertheless, in the former case (G-gate), the
condition $\det\left(G\right)\neq 0$ must be fulfilled.

  * •

_PIP implementation_. The optical implementation (or circuit architecture) of
a U-, G- or M-gate must be able to perform the $2\times 2$ matrix
transformation described by its universal matrix by utilising basic PIP
devices: phase shifters (PSs), resonators, attenuators, amplifiers, and beam
splitters (combiners) such as directional couplers (DICs) and multi-mode
interferometers (MMIs). Since a universal matrix may be implementable by
different equivalent circuit architectures, we should introduce here the
concept of _minimal circuit architecture_ (MCA), defined as the PIP
implementation encompassing the minimum number of basic devices. Furthermore,
since any PIP circuit is fully characterized by analysing the Lorentz
reciprocity and the forward-backward (FB) symmetry [13], we include an
extended discussion about these properties within the context of APC in
Supplementary Note 2.

Uncovering the MCA of the U-, G-, and M-gates requires to explore diverse
matrix factorization techniques that allow us to implement the universal
matrix of each class of operation by utilising PIP technology. After a
thorough examination of the matrix theory literature [10, 34, 36, 37, 38, 39,
40, 41, 42], two different factorization techniques should be taken into
consideration in our discussions: Euler’s rotation theorem and the singular
value decomposition (SVD).

As reported in ref. [23], a $2\times 2$ universal unitary matrix of the form
given by Eq. (2) cannot be directly implemented by using mainstream PIP
devices because of the arbitrary nature of $\hat{\mathbf{n}}$. Here, we can
take advantage of Euler’s rotation theorem to factorize the $U$ matrix as a
concatenation of three rotations around two Cartesian axes of the GBS, which
are implementable via PSs, MMIs and DICs. In addition, taking into account
that a U-gate can be regarded as a $2\times 2$ universal unitary signal
processor, then the MCA of a U-gate (Fig. 3b) must be the same as the MCA of a
$2\times 2$ universal unitary signal PIP processor, shown in Fig. 4a of ref.
[23] and based on the Euler factorization
$U=e^{i\delta}R_{\hat{\mathbf{n}}}\left(\alpha\right)\equiv
e^{i\delta}R_{\hat{\mathbf{z}}}\left(\alpha_{3}\right)R_{\hat{\mathbf{x}}}\left(\alpha_{2}\right)R_{\hat{\mathbf{z}}}\left(\alpha_{1}\right)$.
The matrices $R_{\hat{\mathbf{z}}}\bigl{(}\alpha_{1,3}\bigr{)}$ can be
implemented by PSs integrated in parallel uncoupled waveguides and the matrix
$R_{\hat{\mathbf{x}}}\left(\alpha_{2}\right)$ may be generated by a
synchronous DIC with tunable mode-coupling coefficient
$\kappa=\alpha_{2}/\left(2L\right)$, where $L$ is the length of its arms. This
MCA preserves the Lorentz reciprocity but breaks the FB symmetry (provided
that $\alpha_{1}\neq\alpha_{3}$). Equivalent circuit architectures of a U-gate
may be explored by selecting different rotation vectors when using Euler’s
rotation theorem. As an example, in Supplementary Note 2 it is shown a scheme
built from fixed couplers, based on the factorization
$U=e^{i\delta}R_{\hat{\mathbf{z}}}\left(\alpha_{3}\right)R_{\hat{\mathbf{y}}}\left(\alpha_{2}\right)R_{\hat{\mathbf{z}}}\left(\alpha_{1}\right)$.

While a U-gate is a conservative transformation (given that it preserves the
norm of the input anbit or, equivalently, the power of the 2D wave that
encodes the anbit), both G- and M-gates are non-conservative transformations.
This implies that their MCAs will require to include attenuators and
amplifiers. Remarkably, a common MCA for both kind of gates is found from the
SVD [34, 36, 39], which factorizes the universal matrices of these gates as a
function of two U-gates along with a $2\times 2$ diagonal matrix with positive
real entries, implementable by using tunable optical attenuators and
amplifiers (Fig. 3c). The reciprocal (non-reciprocal) nature of such devices
preserves (breaks) the Lorentz reciprocity in the MCA. Likewise, note that the
FB symmetry is broken in the MCA when using the circuit of Fig. 3b to
implement the U-gates.

Although equivalent circuit architectures of the U-, G- and M-gates can be
proposed by using matrix factorizations different from Euler’s rotation
theorem and the SVD, all of them lead to optical schemes integrating a higher
number of basic PIP devices than the structures depicted in Fig. 3 (see
Supplementary Note 2).

So far, we have presented the basic operations of a single anbit. Nonetheless,
bearing in mind that PIP is a reconfigurable hardware [12, 13, 14], the design
of complex combinational architectures requires to introduce an additional
fundamental piece: a _controlled gate_. In APC, such a kind of gate may be
defined in the same way as in QC [10]. By convention, a controlled anbit gate
performs a transformation $\widehat{\mathrm{F}}$ on the target anbits when the
control anbits are equal to $\bigl{|}1\bigr{\rangle}$. Otherwise, the target
anbits remain invariant at the output. Figure 4a illustrates the functionality
of a controlled gate with a single target anbit $\bigl{|}t\bigr{\rangle}$ and
a single control anbit $\bigl{|}c\bigr{\rangle}$. Using the tensor product,
the mathematical formalisation and properties of a controlled gate in APC can
be directly extrapolated from QC (Supplementary Note 2), with the essential
difference that a controlled gate may be constructed from a non-unitary
$\widehat{\mathrm{F}}$ mapping in APC.

An additional crucial difference between a controlled gate in APC and QC
emerges when analysing its implementation using PIP technology. Since the
reconfigurability of a PIP circuit is realised by utilising classical
electrical control signals [12, 13, 14], the implementation of a controlled
anbit gate does not require the intricate design strategies and architectures
employed in optical QC [10, 21, 43, 44] (however, these schemes could be
extrapolated to APC, if desired). As seen in Fig. 4b, the simplest
implementation of a controlled anbit gate arises from an electro-optic design,
where the control anbit is encoded by the electrical control signals of the
PIP platform and the target anbit is encoded by a 2D optical wave
(alternatively, both control and target anbits can be encoded by optical
waves, giving rise to an all-optical architecture requiring a higher footprint
than that of the electro-optic design, see Fig. 4c). In this fashion, the same
MCAs as those of the U-, G-, and M-gates (Fig. 3) may be employed to perform
controlled operations of each kind of gate. Therefore, the electro-optic
architecture only entails the definition of a mapping between the control
anbit and the electrical control signals of the PIP circuit (e.g. via software
[45]).

As an illustrative example, the electro-optic implementation of the
controlled-NOT (CNOT) gate is sketched in Fig. 4d. Any suitable mapping
between the control anbit and the electrical control signals must guarantee
that the $2\times 2$ unitary matrix transformations
$F=iR_{\hat{\mathbf{x}}}\left(\pi\right)$ (the Pauli matrix $\sigma_{x}$) and
$F=I$ (the identity matrix) are induced on the amplitudes of
$\bigl{|}t\bigr{\rangle}$ when
$\bigl{|}c\bigr{\rangle}=\bigl{|}1\bigr{\rangle}$ and
$\bigl{|}c\bigr{\rangle}=\bigl{|}0\bigr{\rangle}$, respectively. It is worthy
to note that, in contrast to the seminal optical implementation of the quantum
CNOT gate reported in ref. [43], in APC the implementation of this gate
integrates a lower number of basic devices and does not require to use extra
(ancilla or garbage) units of information.

Interestingly, the concept of controlled gates can be easily extended to the
case of multiple control anbits without requiring extra devices in the optical
circuits. Accordingly, multi-controlled operations such as the Toffoli gate
(an indispensable tool to implement Boolean functions) can be carried out in
APC using the same circuit as that of Fig. 4d by encoding an additional
control anbit in the electrical control signals, see Supplementary Note 2.

#### _Fundamentals of sequential design: taming prohibited operations in QC_

In a combinational system such as the U-, G-, and M-gates, the outputs depend
solely on the inputs. Nevertheless, in a sequential system, the outputs can be
connected with the inputs allowing feedback operations. Since sequential
architectures are of paramount importance in DC (e.g. to construct digital
memories [8, 9]), we wonder about the possibility of exploiting such a kind of
systems within the context of APC.

Remarkably, in contrast to QC, feedback schemes will be allowed in APC thanks
to the feasibility of performing summation (fan-in) and cloning (fan-out) of
anbits using PIP circuits. These are prohibited operations within the realm of
QC that will however play a fundamental role to construct any sequential
architecture in APC. Concretely, both fan-in and fan-out anbit gates can be
implemented via the PIP circuit depicted in Fig. 5a, which preserves the
Lorentz reciprocity and the FB symmetry (provided that the amplifiers have a
reciprocal and FB symmetric behaviour). This scheme transforms the input
anbits $\bigl{|}\psi\bigr{\rangle}$ and $\bigl{|}\varphi\bigr{\rangle}$ into
the output anbits
$\bigl{|}\psi+\varphi\bigr{\rangle}=\bigl{(}\psi_{0}+\varphi_{0}\bigr{)}\bigl{|}0\bigr{\rangle}+\bigl{(}\psi_{1}+\varphi_{1}\bigr{)}\bigl{|}1\bigr{\rangle}$
and
$\bigl{|}\psi-\varphi\bigr{\rangle}=\bigl{(}\psi_{0}-\varphi_{0}\bigr{)}\bigl{|}0\bigr{\rangle}+\bigl{(}\psi_{1}-\varphi_{1}\bigr{)}\bigl{|}1\bigr{\rangle}$.
Thus, setting
$\bigl{|}\varphi\bigr{\rangle}=\bigl{|}\mathbf{0}\bigr{\rangle}=0\bigl{|}0\bigr{\rangle}+0\bigl{|}1\bigr{\rangle}$
(the null vector of $\mathscr{E}_{1}$) we will carry out a fan-out operation
of the anbit $\bigl{|}\psi\bigr{\rangle}$ (a perfect cloning) and taking
$\bigl{|}\varphi\bigr{\rangle}\neq\bigl{|}\mathbf{0}\bigr{\rangle}$ we will
perform a fan-in operation of the anbits $\bigl{|}\psi\bigr{\rangle}$ and
$\bigl{|}\varphi\bigr{\rangle}$. Moreover, in order to guarantee a linear
behaviour, both fan-in and fan-out gates should be defined by using the
Cartesian product, which allows us to independently transform the anbit
amplitudes $\psi_{0}$, $\psi_{1}$, $\varphi_{0}$ and $\varphi_{1}$
(conversely, the tensor product leads to multi-anbit nonlinear operations, see
Supplementary Note 3, including a more in-depth discussion about the
mathematical properties and optical implementation of these gates).

Figure 5b shows the simplest sequential architecture that can be built in APC,
integrated by both fan-in and fan-out gates along with two M-gates
($\widehat{\mathrm{M}}_{1}$ and $\widehat{\mathrm{M}}_{2}$) to complete the
feedback loop. The analysis of the input-output relation
$\bigl{|}\varphi\bigr{\rangle}=\widehat{\mathrm{M}}_{\mathrm{eq}}\bigl{|}\psi\bigr{\rangle}$
indicates that this sequential scheme is equivalent to a combinational M-gate
described by the matrix representation
$M_{\mathrm{eq}}=\bigl{(}I-M_{1}M_{2}\bigr{)}^{-1}M_{1}$. Hence, the existence
of $M_{\mathrm{eq}}$ is closely linked to the condition
$\det\bigl{(}I-M_{1}M_{2}\bigr{)}\neq 0$. Contrariwise, the loop cannot be
built because the matrix $I-M_{1}M_{2}$ is singular. In Supplementary Note 3,
we provide further information about the analysis and properties of this
structure.

Although the same single-anbit operation $\widehat{\mathrm{M}}_{\mathrm{eq}}$
can be implemented via the MCA of an M-gate (Fig. 3c), the potential of this
basic sequential scheme relies on the fact that it establishes the fundamental
strategies to analyse and design more complex sequential architectures in APC.
For instance, the intricate multi-anbit combinational scheme shown in Fig. 5c
can elegantly be simplified with the equivalent sequential architecture
depicted in Fig. 5d, composed by a lower number of gates. Surprisingly, both
systems have the same input-output relation (see Supplementary Note 3).

### Discussion

These results lay the theoretical foundations of APC, a new computing paradigm
conceived to exploit the full potential of PIP technology and, consequently,
leading to the emergence of an entire field of research within computational
science and photonics. In addition, APC can be regarded as a new optical
design toolbox which blazes a trail for manufacturing advanced photonic
computing architectures that can team-up with digital electronic processors to
unlock in the near- and middle-term the serious limitations imposed by the
demise of Moore’s and Dennard’s laws.

Bearing in mind that this work is completely devoted to establishing the
fundamentals of APC, a roadmap must be specified to further develop this
computation theory in forthcoming works (Fig. 1d). Firstly, the fundamentals
of combinational design should be extended to the case of multiple anbits for
both U- , G-, and M-gates. We may expect that the MCA of these multi-anbit
gates can also be employed to implement controlled gates with multiple target
anbits (encoding the control anbits in the electrical control signals of the
PIP platform). Secondly, the fundamentals of sequential design should be
further developed to the case of multiple anbits, embracing the research of
fan-in, fan-out and feedback operations. Given that a digital memory is built
from a multi-bit sequential architecture in DC [9], the study of multi-anbit
feedback schemes could be of paramount importance to revisit the concept of
memory within the scope of APC. Outstandingly, the capacity to scale both
combinational and sequential architectures to multiple anbits is inherently
related to the feasibility to scale the PIP circuits integrating multiple
waveguides [12, 13, 14] in combination with the exploitation of WDM technique
[19] to perform massive parallel computing of anbits. Thirdly, APC must be
completed by conceiving a specific gamut of analog search algorithms to speed
up the solution of a representative set of deterministic polynomial time (P)
and non-deterministic polynomial time (NP) computational problems (here, it is
not possible to rigorously specify such a set of problems because it
previously requires to completely develop the multi-anbit operations. In any
case, as an example, two possible P and NP problems that could be evaluated
are the maximum cardinality matching [46] and the integer factorization
problem [47], respectively). The time, resources and energy required in APC to
solve these computational problems must be compared with the time, resources
and energy required in DC, QC and NC using the general methodologies of
computational science [10, 48].

Compared with these existing computational models, APC relaxes some of their
theoretical and technological limitations, see Table 1. While in APC we have
the possibility of defining both linear and nonlinear gates, DC and QC can
only be constructed from nonlinear and linear gates, respectively [9, 10].
Moreover, NC embraces both linear and nonlinear operations, but the global
transformation induced on the units of information in a neural network is
nonlinear [49]. In contrast, in APC there exists the possibility of
exclusively performing linear or nonlinear operations (or a combination of
both). A similar remark applies to the reversible and irreversible nature of
the operations. Both design possibilities can be found in APC via the U-, G-
and M-gates, a feature that is not shared by the other computation theories
(in DC reversible operations are not efficient since ancilla and garbage bits
are required [50], in QC all operations are reversible, and in NC the multi-
dimensional transformation of a neural network is irreversible, inherited from
its nonlinear nature).

On the other hand, an essential difference between DC and APC relies on the
fact that a combinational APC architecture can take advantage of both forward
and backward propagations of light to compute the double of units of
information (the same (a different) multi-anbit transformation will be induced
in each propagation direction when the circuit preserves (breaks) the FB
symmetry). This property also applies to QC and NC when implementing the
corresponding computational architectures via PIP technology [6, 44].

The additional properties shown in Table 1 highlight common differences of
APC, DC and NC with QC. Although QC provides the outstanding feature of
performing instantaneous non-local operations (via the entanglement of qubits,
a characteristic that is not shared by the other computation theories), APC
can be readily implemented by current PIP technology operating at room
temperature. Along this line, it is worth mentioning that APC can also be
implemented in any technological platform enabling analog signal processing
based on matrix transformations (e.g. optical metamaterials [17, 18],
electronics [27, 51, 52] and acoustics [53]).

Likewise, being APC a computation theory using classical waves, we may expect
that this new computing paradigm has more tolerance to external noise than QC.
This subsequently implies that we will require a lower number of extra units
of information than in QC to detect and correct the data errors, simplifying
the scalability of APC architectures to a large number of anbits.

An additional intriguing feature of APC arises from the general nature of its
mathematical framework, inherited from the versatile properties of the anbit
and the basic gates, allowing to implement (at least partially) other
computing paradigms using APC architectures (see Supplementary Note 5).

Given that any computation theory has associated an information theory, APC
also leads to an additional field of research: the _Analog Programmable-
Photonic Information_ (API). Concretely, API will be focus on the study of
anbit modulation formats (Supplementary Note 1), analysis of noise, error
detection and correction strategies, entropy analysis, data compression, and
cryptography techniques. Both APC and API have the potential to spark a
crucial impact on fundamental and applied research, as well as on our
information society.

### Methods

#### _Space-encoding modulation_

The description of this modulation format (similar to the path-encoding
strategy employed in optical QC [54]) can be done by specifying the electric
field strength encoding the anbit of Fig. 2a. According to the usual features
of the optical waveguides employed in PIP [13], we may assume that the
parallel waveguides of Fig. 2a have a negligible inter-waveguide mode-coupling
and operate in the paraxial and single-mode regimes. Hence, a space-encoded
anbit is characterized by an electric field of the form:

$\displaystyle\boldsymbol{\mathcal{E}}\left(\mathbf{r},t\right)$
$\displaystyle\simeq\sum_{k=0}^{1}\textrm{Re}\left\\{\psi_{k}\left(t-\beta_{k}^{\left(1\right)}r_{\parallel}\right)\hat{\mathbf{e}}_{k}\left(r_{\perp,1},r_{\perp,2},\omega_{\mathrm{c}}\right)e^{i\omega_{\mathrm{c}}t}e^{-i\beta_{k}^{\left(0\right)}r_{\parallel}}\right\\}$
$\displaystyle=\sum_{k=0}^{1}\left|\psi_{k}\left(t-\beta_{k}^{\left(1\right)}r_{\parallel}\right)\right|\hat{\mathbf{e}}_{k}\left(r_{\perp,1},r_{\perp,2},\omega_{\mathrm{c}}\right)\cos\left(\omega_{\mathrm{c}}t-\beta_{k}^{\left(0\right)}r_{\parallel}+\angle_{k}\right),$
(3)

where the anbit amplitudes $\psi_{0}=\left|\psi_{0}\right|e^{i\angle_{0}}$ and
$\psi_{1}=\left|\psi_{1}\right|e^{i\angle_{1}}$ play the role of the optical
wave packets (or complex envelopes), $\omega_{\mathrm{c}}$ is the angular
frequency of the optical carrier,
$\mathbf{r}=r_{\perp,1}\hat{\mathbf{r}}_{\perp,1}+r_{\perp,2}\hat{\mathbf{r}}_{\perp,2}+r_{\parallel}\hat{\mathbf{r}}_{\parallel}$
is the vector position written as a function of its transverse ($r_{\perp,1}$,
$r_{\perp,2}$) and longitudinal ($r_{\parallel}$) components, and
$\hat{\mathbf{e}}_{k}$ and
$\beta_{k}\left(\omega\right)\simeq\beta_{k}^{\left(0\right)}+\left(\omega-\omega_{\mathrm{c}}\right)\beta_{k}^{\left(1\right)}$
are respectively the normalised mode profile and the propagation constant of
the fundamental mode in waveguide $k$ (being
$\beta_{k}^{\left(0\right)}=\beta_{k}\left(\omega=\omega_{\mathrm{c}}\right)$,
$\beta_{k}^{\left(1\right)}=\mathrm{d}\beta_{k}\left(\omega=\omega_{\mathrm{c}}\right)/\mathrm{d}\omega$
and omitting the dispersive terms $\beta_{k}^{\left(n\geq 2\right)}$ in the
Taylor series expansion of $\beta_{k}\left(\omega\right)$). In particular,
$\hat{\mathbf{e}}_{k}$ must satisfy the condition [55]:

$\iint_{-\infty}^{\infty}\hat{\mathbf{e}}_{k}\times\hat{\mathbf{h}}_{k}^{\ast}\cdot\hat{\mathbf{r}}_{\parallel}\mathrm{d}r_{\perp,1}\mathrm{d}r_{\perp,2}=2,$

being $\hat{\mathbf{h}}_{k}$ the normalised mode profile of the magnetic field
strength. Equation (4) guarantees that the optical power propagated by the
fundamental modes of both waveguides can be calculated as
$\mathcal{P}=\left|\psi_{0}\right|^{2}+\left|\psi_{1}\right|^{2}$.

Using Eq. (3), it is straightforward to describe the electric field strength
at the input $\boldsymbol{\mathcal{E}}\left(\mathbf{r}_{1},t_{1}\right)$ and
at the output $\boldsymbol{\mathcal{E}}\left(\mathbf{r}_{2},t_{2}\right)$ of
the single-anbit gate depicted in Fig. 3a, which must be particularised at two
different vector positions $\mathbf{r}_{1}\neq\mathbf{r}_{2}$ and time
instants $t_{1}\neq t_{2}$. Taking into account the causal response of the
materials employed in PIP [13], then it follows that $t_{1}<t_{2}$. Hence, the
input-output relation of the gate is non-local and causal.

#### _Nonlinear anbit gates_

Single-anbit nonlinear gates can be implemented in PIP, e.g., by means of the
Pockels and Kerr effects, which allow to carry out second- and third-order
nonlinear anbit transformations, respectively. For instance, stimulating the
self-phase modulation effect in two parallel uncoupled waveguides (similar to
those of depicted in Fig. 2a), a nonlinear anbit operation of the form
$\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}=\psi_{0}\exp\bigl{(}-i\gamma\bigl{|}\psi_{0}\bigr{|}^{2}L_{\mathrm{eff}}\bigr{)}\bigl{|}0\bigr{\rangle}+\psi_{1}\exp\bigl{(}-i\gamma\bigl{|}\psi_{1}\bigr{|}^{2}L_{\mathrm{eff}}\bigr{)}\bigl{|}1\bigr{\rangle}$
may be obtained ($\gamma$ and $L_{\mathrm{eff}}$ are nonlinear parameters of
the waveguides [56]). In the same vein, optical devices such as nonlinear
directional couplers [57] and ring resonators [58] can also be employed to
exploit third-order nonlinearities in silicon platforms.

The most general definition of a single-anbit gate (including both linear and
nonlinear contributions) is given by the expression
$\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}:=f_{0}\bigl{(}\psi_{0},\psi_{1}\bigr{)}\bigl{|}0\bigr{\rangle}+f_{1}\bigl{(}\psi_{0},\psi_{1}\bigr{)}\bigl{|}1\bigr{\rangle}$,
with $f_{0}$ and $f_{1}$ belonging to
$\mathcal{F}\left(\mathbb{C}^{2},\mathbb{C}\right)$. Thus,
$\widehat{\mathrm{F}}$ will induce a nonlinear transformation on the input
anbit when the functions $f_{0,1}$ have a nonlinear behaviour. Therefore,
using holomorphic $f_{0,1}$ functions in a neighbourhood of a reference point
$\bigl{(}\psi_{0,\mathrm{ref}},\psi_{1,\mathrm{ref}}\bigr{)}\in\mathbb{C}^{2}$,
we will be able to build a nonlinear response of the desired order.

The main drawback of operating with nonlinear anbit gates relies on the fact
that we cannot deal with a matrix formalism. Nevertheless, the mathematical
description of the above nonlinear anbit operation can be simplified by
performing a Taylor series expansion of $f_{0,1}$. To this end, let us
introduce the vectors
$\mathbf{z}:=\psi_{0}\hat{\mathbf{z}}_{0}+\psi_{1}\hat{\mathbf{z}}_{1}$ and
$\mathbf{z}_{\mathrm{ref}}:=\psi_{0,\mathrm{ref}}\hat{\mathbf{z}}_{0}+\psi_{1,\mathrm{ref}}\hat{\mathbf{z}}_{1}$
belonging to the vector space
$\mathcal{Z}=\mathrm{span}\left\\{\hat{\mathbf{z}}_{0},\hat{\mathbf{z}}_{1}\right\\}$
(isomorphic to $\mathbb{C}^{2}$) and being $\hat{\mathbf{z}}_{0,1}$ complex
orthonormal vectors. In this way, we can write
$\widehat{\mathrm{F}}=\sum_{n=1}^{\infty}\widehat{\mathrm{F}}^{\left(n\right)}$
where:

$\widehat{\mathrm{F}}^{\left(n\right)}\bigl{|}\psi\bigr{\rangle}=\frac{1}{n!}\mathrm{d}^{n}\left.f_{0}\right\rfloor_{\mathbf{z}_{\mathrm{ref}}}\left(\mathbf{z}\right)\bigl{|}0\bigr{\rangle}+\frac{1}{n!}\mathrm{d}^{n}\left.f_{1}\right\rfloor_{\mathbf{z}_{\mathrm{ref}}}\left(\mathbf{z}\right)\bigl{|}1\bigr{\rangle},$

is the $n$-th order nonlinear response of the gate with:

$\left.\mathrm{d}^{n}f_{0}\right\rfloor_{\mathbf{z}_{\mathrm{ref}}}\left(\mathbf{z}\right)=\sum_{i_{1},\ldots,i_{n}\in\left\\{0,1\right\\}}\psi_{i_{1}}\cdots\psi_{i_{n}}\frac{\partial^{n}f_{0}\bigl{(}\mathbf{z}_{\mathrm{ref}}\bigr{)}}{\partial\hat{\mathbf{z}}_{i_{1}}\cdots\partial\hat{\mathbf{z}}_{i_{n}}},$

and similar for
$\left.\mathrm{d}^{n}f_{1}\right\rfloor_{\mathbf{z}_{\mathrm{ref}}}\left(\mathbf{z}\right)$.
Obviously, this nonlinear mathematical framework should be further extended in
forthcoming contributions by defining diverse classes of nonlinear anbit
gates, encompassing both combinational and sequential computational
architectures.

### Author contributions

A. Macho Ortiz originally conceived the idea of APC and API. A. Macho Ortiz
and J. Capmany developed the theory. D. Pérez López, J. Azaña and J. Capmany
supervised the work. All authors contributed to write the manuscript.

## References

  * [1] Cavin, R. K., Lugli, P. & Zhirnov, V. V. Science and engineering beyond Moore’s law. _Proceedings of the IEEE, Special Centennial Issue_ 100, 1720 (2012).
  * [2] Markov, I. L. Limits on fundamental limits to computation. _Nature_ 512, 147 (2014).
  * [3] Shalf, J. The future of computing beyond Moore’s Law. _Phil. Trans. R. Soc. A_ 378, 20190061 (2020).
  * [4] Ferreira de Lima, T., Shastri, B. J., Tait, A. N., Nahmias, M. A. & Prucnal, P. R. Progress in neuromorphic photonics. _Nanophotonics_ 6, 577 (2017).
  * [5] Wetzstein, G. _et al_. Inference in artificial intelligence with deep optics and photonics. _Nature_ 588, 39 (2020).
  * [6] Shastri, B. J. _et al_. Photonics for artificial intelligence and neuromorphic computing. _Nature Photonics_ 15, 102 (2021).
  * [7] Shastri, B. J., Tait, A. N., Ferreira de Lima, T., Nahmias, M. A., Peng, H. T. & Prucnal, P. R. Principles of Neuromorphic Photonics. In _Encyclopedia of Complexity and Systems Science_ (ed. Meyers, R.) (Springer, Berlin, 2018).
  * [8] Bartee, T. C. _Digital Computer Fundamentals_. (McGraw-Hill, New York, 1985).
  * [9] Wakerly, J. F. _Digital Design: Principles and Practices_. (Pearson, New Jersey, 2006).
  * [10] Nielsen, M. A. & Chuang, I. L. _Quantum Computation and Quantum Information_. (Cambridge University Press, Cambridge, 2016).
  * [11] Solli, D. R. & Jalali, B. Analog optical computing. _Nature Photonics_ 9, 704 (2015).
  * [12] Bogaerts, W. _et al_. Programmable photonic circuits. _Nature_ 586, 207 (2020).
  * [13] Capmany J. & Pérez, D. _Programmable Integrated Photonics_. (Oxford University Press, Oxford, 2020).
  * [14] Pérez, D., Gasulla, I., DasMahapatra, P. & Capmany, J. Principles, fundamentals and applications of programmable integrated photonics. _Advances in Optics and Photonics_ 12, 709 (2020).
  * [15] Shamir, J., Caulfield, H. J., Micelli, W. & Seymour, R. J. Optical computing and the Fredkin gates. _Applied Optics_ 25, 1604 (1986).
  * [16] Miller, D. A. B. Are optical transistors the logical next step?. _Nature Photonics_ 4, 3 (2010).
  * [17] Camacho, M., Edwards, B. & Engheta, N. A single inverse-designed photonic structure that performs parallel computing. Nature Communications 12, 1466 (2021).
  * [18] Zangeneh-Nejad, F., Sounas, D. L., Alù, A. & Fleury, R. Analogue computing with metamaterials. _Nature Reviews Materials_ 6, 207 (2021).
  * [19] Feldmann, J. _et al_. Parallel convolutional processing using an integrated photonic tensor core. _Nature_ 589, 52 (2021).
  * [20] Mohamed, K. S. _Neuromorphic Computing and Beyond_. (Springer, Cham, 2020).
  * [21] O’Brien, J. L. Optical quantum computing. _Science_ 318, 1567 (2007).
  * [22] De Leon, N. P. _et al_. Materials challenges and opportunities for quantum computing hardware. _Science_ 372, 6539 (2021).
  * [23] Macho, A., Pérez, D. & Capmany, J. Optical implementation of $2\times 2$ universal unitary matrix transformations. _Laser & Photonics Reviews_ 15, 2000473 (2021).
  * [24] Spreeuw, R. J. C. Classical wave-optics analogy of quantum-information processing. _Physical Review A_ 63, 062302 (1998).
  * [25] Kish, L. B. Quantum computing with analog circuits: Hilbert space computing. _Proc. of SPIE 5055, Smart Structures and Materials 2003: Smart Electronics, MEMS, BioMEMS, and Nanotechnology_ , 0277-786X (2003).
  * [26] Van den Nest, M. Classical simulation of quantum computation, the Gottesman-Knill theorem, and slightly beyond. Preprint at https://arxiv.org/abs/0811.0898 (2010).
  * [27] La Cour, B. R. & Ott, G. E. Signal-based classical emulation of a universal quantum computer. _New Journal of Physics_ 17, 053017 (2015).
  * [28] Wetterich, C. Quantum computing with classical bits. _Nuclear Physics B_ 948, 114776 (2019).
  * [29] Zhang, S., Li, P., Wang, B., Zeng, Q. & Zhang, X. Implementation of quantum permutation algorithm with classical light. _Journal of Physics Communications_ 3, 015008 (2019).
  * [30] Zhang, S., Zhang, Y., Sun, Y., Sun, H. & Zhang, X. Quantum-inspired microwave signal processing for implementing unitary transforms. _Optics Express_ 27, 436 (2019).
  * [31] Cirac, J. I. Quantum computing and simulation. _Nanophotonics_ 10, 453 (2021).
  * [32] Yang, C. H. _et al_. Operation of a silicon quantum processor unit cell above one kelvin. _Nature_ 580, 350 (2020).
  * [33] Cohen-Tannoudji, C., Diu, B. & Laloë, F. _Quantum Mechanics, Volume I: Basic Concepts, Tools, and Applications, Ch. 2_. (Wiley, Weinheim, 2020).
  * [34] Landi, G. & Zampini, A. _Linear Algebra and Analytic Geometry for Physical Sciences_. (Springer, Cham, 2018).
  * [35] Popescu, S. Nonlocality beyond quantum mechanics. _Nature Physics_ 10, 264 (2014).
  * [36] Roman, S. _Advanced Linear Algebra_. (Springer, New York, 2005).
  * [37] Hall, B. C. _Lie Groups, Lie Algebras, and Representations_. (Springer, New York, 2003).
  * [38] Kirillov, A. _An Introduction to Lie Groups and Lie Algebras_. (Cambridge University Press, Cambridge, 2008).
  * [39] Golub, G. H. & Van Loan, C. F. _Matrix Computations_. (The Johns Hopkins University Press, Baltimore, 2013).
  * [40] Hamada, M. The minimum number of rotations about two axes for constructing an arbitrarily fixed rotation. _Royal Society Open Science_ 1, 140145 (2014).
  * [41] De Vos, A. & De Baerdemacker, S. Block-ZXZ synthesis of an arbitrary quantum circuit. _Physical Review A_ 94, 052317 (2016).
  * [42] Führ, H. & Rzeszotnik, Z. A note on factoring unitary matrices. _Linear Algebra and its Applications_ 547, 32 (2018).
  * [43] Ralph, T. C., Langford, N. K., Bell, T. B. & White, A. G. Linear optical controlled-NOT gate in the coincidence basis. _Physical Review A_ 65, 062324 (2002).
  * [44] Wang, J., Sciarrino, F., Laing, A. & Thompson, M. G. Integrated photonic quantum technologies. _Nature Photonics_ 14, 273 (2020).
  * [45] Pérez, D., López, A., Dasmahapatra, P. & Capmany, J. Multipurpose self-configuration of programmable photonic circuits. _Nature Communications_ 11, 6359 (2020).
  * [46] West, D. B. _Introduction to Graph Theory_. (Pearson, New Jersey, 2018).
  * [47] Lenstra, H. W. & Pomerance, C. A rigorous time bound for factoring integers. _Journal of the American Mathematical Society_ 5, 483 (1992).
  * [48] Goldreich, O. _Computational Complexity: A Conceptual Perspective_. (Cambridge University Press, Cambridge, 2008).
  * [49] Cartlidge, E. Optical neural networks. _Optics & Photonics News_ 6, 34 (2020).
  * [50] Desurvire, E. _Classical and Quantum Information Theory: An Introduction for the Telecom Scientist_. (Cambridge University Press, Cambridge, 2009).
  * [51] Hubbard, W. _et al_. Electronic neural networks. _AIP Conference Proceedings_ 151, 227 (1986).
  * [52] Van Schaik, A. Building blocks for electronic spiking neural networks. _Neural Networks_ 14, 617 (2001).
  * [53] Andersson, G. _et al_. Squeezing and multimode entanglement of surface acoustic wave phonons. _PRX Quantum_ 3, 010312 (2022).
  * [54] Flamini, F., Spagnolo, N. & Sciarrino, F. Photonic quantum information processing: a review. _Reports on Progress in Physics_ 82, 016001 (2019).
  * [55] Jalas, D. _et al_. What is - and what is not - an optical isolator. _Nature Photonics_ 7, 579 (2013).
  * [56] Agrawal, G. P. _Nonlinear Fiber Optics_. (Elsevier, Oxford, 2013).
  * [57] Fraile-Peláez, F. J. & Assanto, G. Coupled-mode equations for nonlinear directional couplers. _Applied Optics_ 29, 2216 (1990).
  * [58] Li, A. & Bogaerts, W. Reconfigurable nonlinear nonreciprocal transmission in a silicon photonic integrated circuit. _Optica_ 7, 7 (2020).

Fig. 1 Limitations of digital electronics and new computation theory proposed
in this work. a Historical evolution and perspective of the main performance
parameters of digital electronics [3]. b Distributed, parallel and adaptive
network performing multi-linear analog operations via real-time matrix
transformations of the input signals, a scenario where digital electronic
paradigm shows significant mathematical and technological limitations [5, 6].
c Programmable integrated photonic (PIP) circuit integrated into a silicon
photonic platform. This system-on-chip technology carries out parallel
reconfigurable matrix transformations on the analog input signals using
optical interference as a fundamental physical principle. d Flowchart of the
steps required to construct the new computation theory, termed Analog
Programmable-Photonic Computation (APC) and implementable with PIP technology.
APC revolves around the idea of performing analog operations on a new unit of
information, the analog bit (anbit), evolving the concept of optical signal
processing shown in (c) into true optical computing.

Fig. 2 The analog bit. a Physical implementation of an anbit
$\boldsymbol{\uppsi}\left(t\right)=\psi_{0}\left(t\right)\hat{\mathbf{e}}_{0}+\psi_{1}\left(t\right)\hat{\mathbf{e}}_{1}$
using PIP technology and a space-encoding modulation (see Methods). The anbit
amplitudes $\psi_{0,1}=\left|\psi_{0,1}\right|e^{i\angle_{0,1}}$ are encoded
by the optical wave packets propagated in the fundamental modes
$\hat{\mathbf{e}}_{0,1}$ of two uncoupled waveguides. b Different classes of
anbit measurement using coherent or direct detection at the optical receiver.
In the former case, an anbit of the form
$\mathcal{R}\psi_{0}\hat{\mathbf{e}}_{0}+\mathcal{R}\psi_{1}\hat{\mathbf{e}}_{1}$
is measured, where $\mathcal{R}$ is the responsivity of the photodiodes. In
the latter case, an anbit of the form
$\mathcal{R}\left|\psi_{0}\right|^{2}\hat{\mathbf{e}}_{0}+\mathcal{R}\left|\psi_{1}\right|^{2}e^{i\left(\angle_{1}-\angle_{0}\right)}\hat{\mathbf{e}}_{1}$
is retrieved (Supplementary Note 1). c Geometric representation of an anbit
with 4 effective degrees of freedom (EDFs) using a polar diagram in the
complex plane. d Geometric representation of an anbit with 3 EDFs in the
generalised Bloch sphere (GBS). In such a situation, the anbit
$\boldsymbol{\uppsi}$ can be rewritten as
$\boldsymbol{\uppsi}=\sqrt{\mathcal{P}}\bigl{[}\cos\bigl{(}\theta/2\bigr{)}\hat{\mathbf{e}}_{0}+e^{i\varphi}\sin\bigl{(}\theta/2\bigr{)}\hat{\mathbf{e}}_{1}\bigr{]}$,
see Supplementary Note 1.

Fig. 3 Basic combinational anbit gates. a A combinational single-anbit gate is
a non-feedback system performing a transformation between two different 2D
vector functions: the input anbit
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\left(t\right)\bigl{|}0\bigr{\rangle}+\psi_{1}\left(t\right)\bigl{|}1\bigr{\rangle}$
and the output anbit
$\bigl{|}\varphi\bigr{\rangle}=\varphi_{0}\left(t\right)\bigl{|}0\bigr{\rangle}+\varphi_{1}\left(t\right)\bigl{|}1\bigr{\rangle}$.
Using differential anbit measurement, the gate can be geometrically
represented as a trajectory between two different points in the GBS. b Minimal
circuit architecture (MCA) of a U-gate, implementing the universal unitary
matrix of Eq. (2) via the Euler factorization
$U=e^{i\delta}R_{\hat{\mathbf{n}}}\left(\alpha\right)\equiv
e^{i\delta}R_{\hat{\mathbf{z}}}\left(\alpha_{3}\right)R_{\hat{\mathbf{x}}}\left(\alpha_{2}\right)R_{\hat{\mathbf{z}}}\left(\alpha_{1}\right)$.
The U-gate generates a rotation around an arbitrary unit vector
$\hat{\mathbf{n}}$ of the GBS, preserving the norm of the input anbit. c MCA
of a G- and M-gate, based on the singular value decomposition. While a G-gate
is a reversible operation (two different input anbits
$\bigl{|}\psi_{a}\bigr{\rangle}$ and $\bigl{|}\psi_{b}\bigr{\rangle}$ are
always transformed into two different output anbits
$\bigl{|}\varphi_{a}\bigr{\rangle}$ and $\bigl{|}\varphi_{b}\bigr{\rangle}$),
an M-gate may be an irreversible operation (two different input anbits
$\bigl{|}\psi_{a}\bigr{\rangle}$ and $\bigl{|}\psi_{b}\bigr{\rangle}$ may
generate the same output anbit $\bigl{|}\varphi_{a}\bigr{\rangle}$).

Fig. 4 Controlled anbit gates. a Functional scheme of a controlled gate with a
single control anbit
$\bigl{|}c\bigr{\rangle}\in\left\\{\bigl{|}0\bigr{\rangle},\bigl{|}1\bigr{\rangle}\right\\}$
and a single target anbit $\bigl{|}t\bigr{\rangle}$. Inspired in a controlled
quantum gate [10], the operation $\widehat{\mathrm{F}}$ (a U-, G-, or M-gate)
is applied to $\bigl{|}t\bigr{\rangle}$ when
$\bigl{|}c\bigr{\rangle}=\bigl{|}1\bigr{\rangle}$ or, otherwise,
$\bigl{|}t\bigr{\rangle}$ remains invariant at the output. b Electro-optic
design of a controlled gate. The PIP circuit must implement the MCA of the
$\widehat{\mathrm{F}}$-gate (here we depict the MCA of an M-gate to cover the
general case), whose basic devices are controlled by electrical signals (blue
lines) mapped with the electrical amplitudes of
$\bigl{|}c\bigr{\rangle}=c_{0}\bigl{|}0\bigr{\rangle}+c_{1}\bigl{|}1\bigr{\rangle}$,
e.g., via software [45]. The optical inputs encode the amplitudes of
$\bigl{|}t\bigr{\rangle}=t_{0}\bigl{|}0\bigr{\rangle}+t_{1}\bigl{|}1\bigr{\rangle}$
(black lines). c All-optical design of a controlled gate. The optical inputs
encode the amplitudes of
$\bigl{|}c\bigr{\rangle}\otimes\bigl{|}t\bigr{\rangle}$, where $\otimes$ is
the tensor product. d Electro-optic implementation of the controlled-NOT anbit
gate. The PIP circuit is the MCA of a U-gate since $F=\sigma_{x}$ is a unitary
matrix.

Fig. 5 Sequential anbit architectures. a Optical implementation using PIP
technology of both fan-in (FI) and fan-out (FO) anbit gates. The FI operation
maps the input $\bigl{|}\psi\bigr{\rangle}\times\bigl{|}\varphi\bigr{\rangle}$
into the output
$\bigl{|}\psi+\varphi\bigr{\rangle}\times\bigl{|}\psi-\varphi\bigr{\rangle}$,
where $\times$ is the Cartesian product. The FO operation performs a perfect
cloning of $\bigl{|}\psi\bigr{\rangle}$ when $\varphi_{0}=\varphi_{1}=0$,
i.e., taking $\bigl{|}\varphi\bigr{\rangle}=\bigl{|}\mathbf{0}\bigr{\rangle}$,
where
$\bigl{|}\mathbf{0}\bigr{\rangle}=0\bigl{|}0\bigr{\rangle}+0\bigl{|}1\bigr{\rangle}$
is the null anbit. b Sequential computational architecture of a single anbit,
composed by both FI and FO gates along with 2 single-anbit M-gates
($\widehat{\mathrm{M}}_{1}$ and $\widehat{\mathrm{M}}_{2}$). c Multi-anbit
combinational architecture composed by 4 single-anbit M-gates, 2 FI gates and
2 FO gates. d Equivalent multi-anbit sequential architecture, integrating 2
single-anbit M-gates, 2 FI gates and 2 FO gates.

Properties | DC | QC | NC | APC
---|---|---|---|---
Linear computation | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$
Nonlinear computation | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Reversible operations | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$
Irreversible operations | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Forward-backward propagation | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Parallel computing | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Summation, cloning and feedback | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Instantaneous non-locality | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\times}$
Implementation with current technology | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Operation at room temperature | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$
Tolerance to external perturbations | $\boldsymbol{\checkmark}$ | $\boldsymbol{\times}$ | $\boldsymbol{\checkmark}$ | $\boldsymbol{\checkmark}$

Table 1. Qualitative comparison of APC _vs_ digital computation (DC), quantum
computation (QC) and neuromorphic computation (NC).

Supplementary Information

###### Contents

  1. Supplementary Note 1: the analog bit
    1. 1.1 Anbit modulation formats
    2. 1.2 Anbit measurement
    3. 1.3 Geometric representation: the generalised Bloch Sphere (GBS)
    4. 1.4 Anbit amplitudes: component isomorphism
    5. 1.5 Multiple anbits: tensor product _vs_ Cartesian product
  2. Supplementary Note 2: combinational design
    1. 2.1 General properties of single-anbit linear gates
    2. 2.2 Equivalent circuit architectures of single-anbit linear gates
    3. 2.3 Controlled gates
      1. 2.3.1 Single control anbit
      2. 2.3.2 Multiple control anbits
  3. Supplementary Note 3: sequential design
    1. 3.1 Fan-in and fan-out gates
      1. 3.1.1 Fan-in: anbit addition
      2. 3.1.2 Fan-out: anbit cloning
      3. 3.1.3 PIP implementation: a common architecture
    2. 3.2 First sequential system of the paper
    3. 3.3 Second sequential system of the paper
  4. Supplementary Note 4: different versions of APC
    1. 4.1 One-dimensional APC (1-APC)
      1. 4.1.1 Unit of information: the analog dit
      2. 4.1.2 Single-andit linear gates
      3. 4.1.3 Dual-andit linear gates
      4. 4.1.4 Controlled gates
      5. 4.1.5 Sequential design
      6. 4.1.6 Nonlinear andit gates
    2. 4.2 Multi-dimensional APC (_d_ -APC)
  5. Supplementary Note 5: implementing other computing theories
    1. 5.1 Digital computation
    2. 5.2 Neuromorphic computation
    3. 5.3 Quantum computation

## Supplementary Note 1: the analog bit

In this section, we provide further information about the analog bit (or anbit
for short) including supplementary notes about: the anbit modulation formats,
the anbit measurement, the generalised Bloch sphere (GBS), the anbit
amplitudes, and the mathematical properties of the tensor and Cartesian
products within the context of Analog Programmable-Photonic Computation (APC).

### 1.1 Anbit modulation formats

The optical implementation of an anbit
$\boldsymbol{\uppsi}\left(t\right)=\psi_{0}\left(t\right)\hat{\mathbf{e}}_{0}+\psi_{1}\left(t\right)\hat{\mathbf{e}}_{1}$
can be carried out by exploiting the different degrees of freedom of light
(space, mode, polarisation, frequency and time), unveiling a gamut of _anbit
modulation formats_.

##### Space-encoding modulation (SEM).

This modulation technique (described in Fig. 2a and Methods of the main text)
is the simplest strategy to implement an anbit in programmable integrated
photonics (PIP) using current technology.

##### Mode-encoding modulation (MEM).

Instead of implementing $\boldsymbol{\uppsi}\left(t\right)$ by encoding
$\hat{\mathbf{e}}_{0}$ and $\hat{\mathbf{e}}_{1}$ in the fundamental modes of
two different single-mode waveguides, we can associate $\hat{\mathbf{e}}_{0}$
and $\hat{\mathbf{e}}_{1}$ to two different guided modes of a single waveguide
operating in the multi-mode regime (Supplementary Figure 1a). Therefore, a
mode-encoded anbit is characterized by an electric field strength of the form
(paraxial regime is assumed):

$\boldsymbol{\mathcal{E}}\left(\mathbf{r},t\right)\simeq\sum_{k=0}^{1}\textrm{Re}\left\\{\psi_{k}\left(t-\beta_{k}^{\left(1\right)}r_{\parallel}\right)\hat{\mathbf{e}}_{k}\left(r_{\perp,1},r_{\perp,2},\omega_{\mathrm{c}}\right)e^{i\omega_{\mathrm{c}}t}e^{-i\beta_{k}^{\left(0\right)}r_{\parallel}}\right\\},$
(1)

where the anbit amplitudes $\psi_{0}$ and $\psi_{1}$ are encoded by the
optical wave packets (or complex envelopes) propagated by the guided modes,
$\omega_{\mathrm{c}}$ is the angular frequency of the optical carrier,
$\mathbf{r}=r_{\perp,1}\hat{\mathbf{r}}_{\perp,1}+r_{\perp,2}\hat{\mathbf{r}}_{\perp,2}+r_{\parallel}\hat{\mathbf{r}}_{\parallel}$
is the vector position written as a function of its transverse ($r_{\perp,1}$,
$r_{\perp,2}$) and longitudinal ($r_{\parallel}$) components, and
$\hat{\mathbf{e}}_{k}$ and
$\beta_{k}\left(\omega\right)\simeq\beta_{k}^{\left(0\right)}+\left(\omega-\omega_{\mathrm{c}}\right)\beta_{k}^{\left(1\right)}$
are respectively the normalised mode profile and the propagation constant of
the $k$-th guided mode (being
$\beta_{k}^{\left(0\right)}=\beta_{k}\left(\omega=\omega_{\mathrm{c}}\right)$,
$\beta_{k}^{\left(1\right)}=\mathrm{d}\beta_{k}\left(\omega=\omega_{\mathrm{c}}\right)/\mathrm{d}\omega$
and omitting the dispersive terms $\beta_{k}^{\left(n\geq 2\right)}$ in the
Taylor series expansion of $\beta_{k}\left(\omega\right)$). This modulation
format requires to use mode-division multiplexing devices and circuits to
generate, transform and measure the anbits.

##### Polarisation-encoding modulation (PEM).

While the above modulation formats only make use of a single transverse
component of the electric field (in the $\hat{\mathbf{r}}_{\perp,1}$
direction), a polarisation-encoded anbit exploits the two transverse
components $\hat{\mathbf{e}}_{0}$ and $\hat{\mathbf{e}}_{1}$ of the
fundamental mode propagated by a single-mode waveguide (Supplementary Figure
1b). In this vein, the electric field strength propagating a polarisation-
encoded anbit is found to be (paraxial conditions):

$\boldsymbol{\mathcal{E}}\left(\mathbf{r},t\right)\simeq\sum_{k=0}^{1}\textrm{Re}\left\\{\psi_{k}\left(t-\beta^{\left(1\right)}r_{\parallel}\right)\hat{\mathbf{e}}_{k}\left(r_{\perp,1},r_{\perp,2},\omega_{\mathrm{c}}\right)e^{i\omega_{\mathrm{c}}t}e^{-i\beta^{\left(0\right)}r_{\parallel}}\right\\},$
(2)

with the same propagation constant
$\beta\left(\omega\right)\simeq\beta^{\left(0\right)}+\left(\omega-\omega_{\mathrm{c}}\right)\beta^{\left(1\right)}$
for both transverse components of the fundamental mode considering a lowly-
birefringent waveguide [1]. This modulation format entails the utilisation of
polarisation devices and systems to generate, transform and measure the
anbits.

##### Frequency-encoding modulation (FEM).

The frequency domain can also be employed to implement
$\boldsymbol{\uppsi}\left(t\right)$ by encoding $\hat{\mathbf{e}}_{0}$ and
$\hat{\mathbf{e}}_{1}$ in the same fundamental mode of a given single-mode
waveguide, but stimulated at two different angular frequencies $\omega_{0}$
and $\omega_{1}$. The spectral separation between both optical carriers must
avoid the frequency overlapping between the Fourier transforms of
$\psi_{0}\left(t\right)$ and $\psi_{1}\left(t\right)$, namely
$\widetilde{\psi}_{0}\left(\omega\right)$ and
$\widetilde{\psi}_{1}\left(\omega\right)$ (Supplementary Figure 1c).
Specifically, the electric field strength associated to a frequency-encoded
anbit is (paraxial regime):

$\boldsymbol{\mathcal{E}}\left(\mathbf{r},t\right)\simeq\sum_{k=0}^{1}\textrm{Re}\left\\{\psi_{k}\left(t-\beta_{k}^{\left(1\right)}r_{\parallel}\right)\hat{\mathbf{e}}\left(r_{\perp,1},r_{\perp,2},\omega_{k}\right)e^{i\omega_{k}t}e^{-i\beta_{k}^{\left(0\right)}r_{\parallel}}\right\\},$
(3)

with $\beta_{k}^{\left(0\right)}=\beta\left(\omega=\omega_{k}\right)$ and
$\beta_{k}^{\left(1\right)}=\mathrm{d}\beta\left(\omega=\omega_{k}\right)/\mathrm{d}\omega$,
being $\beta\left(\omega\right)$ the propagation constant of the fundamental
mode. Note that the vector basis
$\mathcal{B}_{1}=\left\\{\hat{\mathbf{e}}_{0},\hat{\mathbf{e}}_{1}\right\\}$
of the anbit is implemented with the normalised profile $\hat{\mathbf{e}}$ of
the fundamental mode stimulated at the angular frequencies $\omega_{0}$ and
$\omega_{1}$, respectively. The Fourier transform of
$\boldsymbol{\mathcal{E}}$ takes the form:

$\widetilde{\boldsymbol{\mathcal{E}}}\left(\mathbf{r},\omega\right)\simeq\sum_{k=0}^{1}\textrm{Re}\left\\{\widetilde{\psi}_{k}\left(\omega-\omega_{k}\right)\hat{\mathbf{e}}\left(r_{\perp,1},r_{\perp,2},\omega_{k}\right)e^{-i\beta_{k}^{\left(0\right)}r_{\parallel}}e^{-i\left(\omega-\omega_{k}\right)\beta_{k}^{\left(1\right)}r_{\parallel}}\right\\}.$
(4)

Here, wavelength-division multiplexing devices and circuits will be required
to generate, transform and measure the anbits.

##### Time-encoding modulation (TEM).

The time domain is an additional degree of freedom of light that can also be
explored to implement an anbit in optics. The basic idea is to generate a
complex envelope of the form
$\mathcal{A}\left(t\right)=\psi_{0}\left(t-t_{0}\right)+\psi_{1}\left(t-t_{1}\right)$
that will be propagated by the fundamental mode of a single-mode waveguide. In
particular, the time delay $\Delta\tau=\left|t_{1}-t_{0}\right|$ must avoid
the temporal overlapping between $\psi_{0}$ and $\psi_{1}$ (Supplementary
Figure 1d). Here, the vector basis
$\mathcal{B}_{1}=\left\\{\hat{\mathbf{e}}_{0},\hat{\mathbf{e}}_{1}\right\\}$
of the anbit is implemented with the normalised profile $\hat{\mathbf{e}}$ of
the fundamental mode stimulated at $t=t_{0}$ and $t=t_{1}$, respectively. For
sufficient short propagation distances where the chromatic dispersion of the
waveguide can be neglected, the electric field strength of a time-encoded
anbit can be approximated as (paraxial regime):

$\displaystyle\boldsymbol{\mathcal{E}}\left(\mathbf{r},t\right)$
$\displaystyle\simeq\textrm{Re}\left\\{\mathcal{A}\left(t-\beta^{\left(1\right)}r_{\parallel}\right)\hat{\mathbf{e}}\left(r_{\perp,1},r_{\perp,2},\omega_{\mathrm{c}}\right)e^{i\omega_{\mathrm{c}}t}e^{-i\beta^{\left(0\right)}r_{\parallel}}\right\\}$
$\displaystyle=\sum_{k=0}^{1}\textrm{Re}\left\\{\psi_{k}\left(t-t_{k}-\beta^{\left(1\right)}r_{\parallel}\right)\hat{\mathbf{e}}\left(r_{\perp,1},r_{\perp,2},\omega_{\mathrm{c}}\right)e^{i\omega_{\mathrm{c}}t}e^{-i\beta^{\left(0\right)}r_{\parallel}}\right\\}.$
(5)

However, for sufficient propagation distances, the chromatic dispersion will
generate fluctuations in $\Delta\tau$ that could give rise to an undesirable
temporal overlapping between $\psi_{0}$ and $\psi_{1}$. Consequently, this
propagation impairment is the main drawback of this modulation format, which
would require an external synchronization system to control the fluctuations
of $\Delta\tau$ within the whole computational system.

Supplementary Figure 1. Anbit modulation formats. a Mode-encoding modulation.
b Polarisation-encoding modulation. c Frequency-encoding modulation. d Time-
encoding modulation. Each modulation format exploits a different degree of
freedom of light to encode an anbit.

##### Pulse shape.

In a similar way to digital information theory [2, 3], we can engineer the
temporal shape of the complex envelopes (encoding $\psi_{0}\left(t\right)$ and
$\psi_{1}\left(t\right)$) to improve the tolerance of the above anbit
modulation formats to the different propagation impairments within a PIP
circuit (optical filtering, optical crosstalk, chromatic dispersion,
polarisation-mode dispersion, and nonlinear Kerr effects, among others [4]).
In particular, using rectangular or quasi-rectangular shapes in
$\psi_{0}\left(t\right)$ and $\psi_{1}\left(t\right)$ (e.g., via super-
Gaussian pulses), we may explore the introduction of a duty cycle (the ratio
of pulse width of $\left|\psi_{0}\left(t\right)\right|$ and
$\left|\psi_{1}\left(t\right)\right|$ over the total time intervals $T_{0}$
and $T_{1}$ where $\psi_{0}\left(t\right)$ and $\psi_{1}\left(t\right)$ are
respectively defined) to study the pulse-to-pulse interaction between
different anbits. In such a scenario, we should compare non-return-to-zero
(NRZ) versus return-to-zero (RZ) pulse shapes (Supplementary Figure 2). This
will lead to different versions of each modulation format (e.g., NRZ-SEM,
33%RZ-SEM, 50%RZ-SEM…). Likewise, arbitrary shapes of $\psi_{0}\left(t\right)$
and $\psi_{1}\left(t\right)$ (such as prolate spheroidal wave functions [5])
can also be investigated in each modulation format to improve the tolerance of
the anbit to the aforementioned propagation impairments, although it is out of
the scope of this work.

##### Other modulation formats.

The implementation of APC in other technologies different from PIP (e.g., in
electronics or acoustics) will require to develop new modulation formats that
allow us to physically generate the anbit in the corresponding hardware
platforms.

Supplementary Figure 2. Different temporal shapes of rectangular (or quasi-
rectangular) anbit amplitudes. a Non-return-to-zero (NRZ), where the pulse
width covers the whole duration of $\left|\psi_{0}\left(t\right)\right|$ and
$\left|\psi_{1}\left(t\right)\right|$. b Return-to-zero (RZ), where the pulse
width encompasses only a percentage (50% in this figure) of the time intervals
$T_{0}$ and $T_{1}$ over which $\left|\psi_{0}\left(t\right)\right|$ and
$\left|\psi_{1}\left(t\right)\right|$ are respectively defined.

### 1.2 Anbit measurement

Each modulation format requires a different optical architecture to perform a
coherent or a differential anbit measurement. Here, we only discuss the
architectures associated to both classes of anbit measurement within the
context of a SEM, the simplest modulation format to implement APC using
current PIP technology.

In general, any anbit measurement can be mathematically described as an anbit
mapping $\boldsymbol{\uppsi}\rightarrow\boldsymbol{\upvarphi}$, which
transforms the input (optical) anbit:

$\boldsymbol{\uppsi}=\psi_{0}\hat{\mathbf{e}}_{0}+\psi_{1}\hat{\mathbf{e}}_{1}=\left|\psi_{0}\right|e^{i\angle_{0}}\hat{\mathbf{e}}_{0}+\left|\psi_{1}\right|e^{i\angle_{1}}\hat{\mathbf{e}}_{1},$
(6)

into an output (electrical) anbit
$\boldsymbol{\upvarphi}=\varphi_{0}\hat{\mathbf{e}}_{0}+\varphi_{1}\hat{\mathbf{e}}_{1}$.
The main difference between a coherent and a differential measurement is that
each kind of measurement establishes a different mapping between
$\boldsymbol{\uppsi}$ and $\boldsymbol{\upvarphi}$, as detailed below. In this
context, for the sake of simplicity, we will assume that any (coherent or
differential) anbit measurement will be carried out at the receiver by using
the same orthonormal vector basis
$\mathcal{B}_{1}=\left\\{\hat{\mathbf{e}}_{0},\hat{\mathbf{e}}_{1}\right\\}$
as that of the transmitter.

##### Coherent anbit measurement.

Here, the 4 real degrees of freedom of $\boldsymbol{\uppsi}$ (the moduli and
phases of $\psi_{0,1}$) can be completely recovered, leading to 4 _effective
degrees of freedom_ (EDFs) where the user information can be encoded and
retrieved. Using a coherent optical receiver, e.g., combining two quadrature
homodyne receivers (Supplementary Figure 3), the phase and quadrature
photocurrents obtained are (see pp. 66-68 of ref. [6]):

$\displaystyle I_{\mathrm{I},k}$
$\displaystyle=\mathcal{R}\left|\psi_{k}\right|\cos\angle_{k},$ (7)
$\displaystyle I_{\mathrm{Q},k}$
$\displaystyle=\mathcal{R}\left|\psi_{k}\right|\sin\angle_{k},$ (8)

where $k\in\left\\{0,1\right\\}$ and $\mathcal{R}$ is the responsivity of the
photodiodes. Next, applying a simple signal processing routine to the above
photocurrents using the expressions:

$\displaystyle\left|\psi_{k}\right|$
$\displaystyle=\frac{1}{\mathcal{R}}\sqrt{I_{\mathrm{I},k}^{2}+I_{\mathrm{Q},k}^{2}},\
\ \ \ \angle_{k}=\arctan\frac{I_{\mathrm{Q},k}}{I_{\mathrm{I},k}},$ (9)

we will be able to retrieve the moduli and phases of $\psi_{0,1}$.
Consequently, we can safely assume that the output (electrical) anbit is of
the form
$\boldsymbol{\upvarphi}=\mathcal{R}\left|\psi_{0}\right|e^{i\angle_{0}}\hat{\mathbf{e}}_{0}+\mathcal{R}\left|\psi_{1}\right|e^{i\angle_{1}}\hat{\mathbf{e}}_{1}\equiv\mathcal{R}\boldsymbol{\uppsi}$.

Supplementary Figure 3. Structure of the optical receiver proposed to perform
a coherent anbit measurement. The system is composed by two quadrature
homodyne receivers (PBS: polarisation beam splitter) [6].

##### Differential anbit measurement.

Using two different photodiodes with the same responsivity $\mathcal{R}$ to
measure $\psi_{0}$ and $\psi_{1}$ via direct detection (see Fig. 2b), we will
obtain two independent photocurrents:
$I_{0}=\mathcal{R}\left|\psi_{0}\right|^{2}$ and
$I_{1}=\mathcal{R}\left|\psi_{1}\right|^{2}$. The time delay between both
photocurrents will be the same as the time delay $\Delta T$ between
$\psi_{0}\left(t\right)$ and $\psi_{1}\left(t\right)$ depicted in Fig. 2a. As
mentioned in the main text, $\Delta T$ provides information about the
differential phase between $\psi_{0}$ and $\psi_{1}$ via the relation
$\angle_{1}-\angle_{0}=\omega_{\mathrm{c}}\Delta T$, where
$\omega_{\mathrm{c}}$ is the angular frequency of the optical carrier.
Consequently, the output anbit is found to be
$\boldsymbol{\upvarphi}=\mathcal{R}\left|\psi_{0}\right|^{2}\hat{\mathbf{e}}_{0}+\mathcal{R}\left|\psi_{1}\right|^{2}e^{i\left(\angle_{1}-\angle_{0}\right)}\hat{\mathbf{e}}_{1}$.

As seen, this anbit measurement technique only provides 3 EDFs where the user
information can be encoded and retrieved: $\left|\psi_{0}\right|$,
$\left|\psi_{1}\right|$ and $\angle_{1}-\angle_{0}$. Here, the phase
$\angle_{0}$ cannot be recovered. Consequently, this (global) phase term can
be omitted to describe $\boldsymbol{\uppsi}$, which may be restated as:

$\boldsymbol{\uppsi}=\left|\psi_{0}\right|\hat{\mathbf{e}}_{0}+\left|\psi_{1}\right|e^{i\left(\angle_{1}-\angle_{0}\right)}\hat{\mathbf{e}}_{1}.$
(10)

Note that Supplementary Equations 6 and 10 generate the same output anbit
$\boldsymbol{\upvarphi}$ in a differential measurement. For this reason, both
expressions are considered to be equivalent to describe the input anbit.
Alternatively, the above equation can be rewritten as:

$\boldsymbol{\uppsi}=\sqrt{\mathcal{P}}\left(\cos\frac{\theta}{2}\hat{\mathbf{e}}_{0}+e^{i\varphi}\sin\frac{\theta}{2}\hat{\mathbf{e}}_{1}\right),$
(11)

by identifying
$\sqrt{\mathcal{P}}\cos\left(\theta/2\right)\equiv\left|\psi_{0}\right|$,
$\sqrt{\mathcal{P}}\sin\left(\theta/2\right)\equiv\left|\psi_{1}\right|$,
$\varphi\equiv\angle_{1}-\angle_{0}$ and
$\mathcal{P}\equiv\left|\psi_{0}\right|^{2}+\left|\psi_{1}\right|^{2}$. In
particular, Supplementary Equation 11 will allow us to geometrically represent
an anbit with 3 EDFs in the generalised Bloch sphere (see below).

On the other hand, a particular scenario associated to a differential
measurement should be mentioned. The case where the differential phase
$\angle_{1}-\angle_{0}$ is not encoded by a time delay $\Delta T$ between
$\psi_{0}$ and $\psi_{1}$ at the transmitter. This can be done, for instance,
modulating $\psi_{0}$ and $\psi_{1}$ with two different optical carriers
having the same angular frequency $\omega_{\mathrm{c}}$ but exhibiting a
different phase $\angle_{0}\neq\angle_{1}$ at $t=0$. In such a situation, the
differential phase $\angle_{1}-\angle_{0}$ cannot be recovered with a
differential anbit measurement because the time delay between the
photocurrents is found to be null. Here, a differential measurement will only
recover the information encoded by $\left|\psi_{0}\right|$ and
$\left|\psi_{1}\right|$ (2 EDFs). This remark highlights the importance of the
parameter $\Delta T$ depicted in Fig. 2a of the paper.

### 1.3 Geometric representation: the generalised Bloch Sphere (GBS)

The construction of the GBS is actually more complex than a mere analogy of
Supplementary Equation 11 with the spherical coordinates
$\bigl{(}\sqrt{\mathcal{P}},\theta,\varphi\bigr{)}$ in the vector space
$\mathbb{R}^{3}$. Specifically, the construction of the GBS can be regarded as
a geometrical transformation of the hypersphere
$S^{2}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{R}^{3}$ into the
hypersphere $S^{3}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{C}^{2}$ [7,
8]. Supplementary Figure 4 illustrates such a transformation, summarised in
the following steps:

  1. 1.

Let us start from an anbit with 3 EDFs described by Supplementary Equation 10.
Here, we can identify the 3-tuple
$\bigl{(}\left|\psi_{1}\right|\cos\left(\angle_{1}-\angle_{0}\right),\left|\psi_{1}\right|\sin\left(\angle_{1}-\angle_{0}\right),\left|\psi_{0}\right|\bigr{)}$
with the Cartesian coordinates $\left(x,y,z\right)$ of the hypersphere
$S^{2}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{R}^{3}$ with $z>0$ and
radius:

$\sqrt{x^{2}+y^{2}+z^{2}}=\sqrt{\left|\psi_{0}\right|^{2}+\left|\psi_{1}\right|^{2}}=\sqrt{\mathcal{P}},$
(12)

see Supplementary Figure 4a. Hence, Supplementary Equation 10 can be rewritten
as:

$\boldsymbol{\uppsi}=z\hat{\mathbf{e}}_{0}+\left(x+iy\right)\hat{\mathbf{e}}_{1}.$
(13)

Here, note that $\hat{\mathbf{e}}_{0}\equiv\hat{\mathbf{z}}$ and
$\hat{\mathbf{e}}_{1}\equiv\hat{\mathbf{x}}$. Moving from Cartesian to
spherical coordinates $\bigl{(}\sqrt{\mathcal{P}},\theta,\varphi\bigr{)}$ via
the transformations:

$\displaystyle x$ $\displaystyle=\sqrt{\mathcal{P}}\sin\theta\cos\varphi,$
(14) $\displaystyle y$
$\displaystyle=\sqrt{\mathcal{P}}\sin\theta\sin\varphi,$ (15) $\displaystyle
z$ $\displaystyle=\sqrt{\mathcal{P}}\cos\theta,$ (16)

the anbit can equivalently be expressed as:

$\boldsymbol{\uppsi}=\sqrt{\mathcal{P}}\left(\cos\theta\hat{\mathbf{e}}_{0}+e^{i\varphi}\sin\theta\hat{\mathbf{e}}_{1}\right),$
(17)

with $\theta\in\left[0,\pi/2\right]$ and $\varphi\in\left[0,2\pi\right)$.

  2. 2.

In order to extend the geometrical representation of $\boldsymbol{\uppsi}$ to
the whole sphere (i.e. including the points with $z<0$), we should perform the
coordinate transformation $\theta^{\prime}:=2\theta$, which maps the Cartesian
coordinates $\left(x,y,z\right)$ into the coordinates
$\left(x^{\prime},y^{\prime},z^{\prime}\right)$ depicted in Supplementary
Figure 4b. Hence, Supplementary Equation 17 becomes:

$\boldsymbol{\uppsi}=\sqrt{\mathcal{P}}\left(\cos\frac{\theta}{2}^{\prime}\hat{\mathbf{e}}_{0}+e^{i\varphi}\sin\frac{\theta}{2}^{\prime}\hat{\mathbf{e}}_{1}\right),$
(18)

with $\theta^{\prime}\in\left[0,\pi\right]$ and
$\varphi\in\left[0,2\pi\right)$. However, note that a coordinate
transformation cannot perform a geometrical transformation on its own.

  3. 3.

In order to transform
$S^{2}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{R}^{3}$ into
$S^{3}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{C}^{2}$, we must carry
out the relabelling $\theta^{\prime}\rightarrow\theta$, which is equivalent to
reinterpret the coordinates $\left(x^{\prime},y^{\prime},z^{\prime}\right)$ as
the original Cartesian coordinates $\left(x,y,z\right)$. As a result,
$\hat{\mathbf{e}}_{1}$ now appears located at the south pole of the new
sphere: the GBS (Supplementary Figure 4c). Finally, applying this relabelling
to Supplementary Equation 18, we obtain the sought Supplementary Equation 11.

Supplementary Figure 4. Geometrical construction of the generalised Bloch
sphere (GBS) to represent an anbit with 3 effective degrees of freedom
(Supplementary Equation 11). a,b Transformation of the hypersphere
$S^{2}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{R}^{3}$ into c the
hypersphere $S^{3}\bigl{(}\sqrt{\mathcal{P}}\bigr{)}\subset\mathbb{C}^{2}$,
the GBS.

##### Final remark: Dirac’s notation.

As seen from the GBS, it is clear the mathematical similitude between an anbit
and a quantum bit (qubit), but with the basic differences discussed in the
paper. In this sense and to be coherent with the main text at the end of
subsection “ _Unit of information: the analog bit_ ”, let us introduce at this
point the use of Dirac’s notation from now on. Therefore, let us recast the
anbit as
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$
by performing the identifications
$\boldsymbol{\uppsi}\equiv\bigl{|}\psi\bigr{\rangle}$,
$\hat{\mathbf{e}}_{0}\equiv\bigl{|}0\bigr{\rangle}$ and
$\hat{\mathbf{e}}_{1}\equiv\bigl{|}1\bigr{\rangle}$. As we will see through
the next sections, Dirac’s notation will allow us to simplify the mathematical
framework of APC.

### 1.4 Anbit amplitudes: component isomorphism

Consider the single-anbit vector space
$\mathscr{E}_{1}=\mathrm{span}(\mathcal{B}_{1})$, where
$\mathcal{B}_{1}=\left\\{\bigl{|}u\bigr{\rangle},\bigl{|}w\bigr{\rangle}\right\\}$
is a vector basis (that may be the canonical orthonormal basis
$\left\\{\bigl{|}0\bigr{\rangle},\bigl{|}1\bigr{\rangle}\right\\}$ or a
different basis). For any anbit
$\bigl{|}\psi\bigr{\rangle}\in\mathscr{E}_{1}$,
$\exists\bigl{(}\psi_{u},\psi_{w}\bigr{)}\in\mathbb{C}^{2}$ (referred to as
the anbit amplitudes) satisfying that
$\bigl{|}\psi\bigr{\rangle}=\psi_{u}\bigl{|}u\bigr{\rangle}+\psi_{w}\bigl{|}w\bigr{\rangle}$.
Using an algebraic terminology, $\psi_{u}$ and $\psi_{w}$ are specifically the
components of the vector $\bigl{|}\psi\bigr{\rangle}$ associated to the basis
$\mathcal{B}_{1}$, which can be calculated using the inner product of
$\mathscr{E}_{1}$ as follows [9]:

$\displaystyle\psi_{u}=\mathrm{proj}_{\mathrm{span}\left\\{\bigl{|}u\bigr{\rangle}\right\\}}\left(\bigl{|}\psi\bigr{\rangle}\right)=\frac{\bigl{\langle}u|\psi\bigr{\rangle}}{\bigl{\langle}u|u\bigr{\rangle}},$
$\displaystyle\ \ \ \ \
\psi_{w}=\mathrm{proj}_{\mathrm{span}\left\\{\bigl{|}w\bigr{\rangle}\right\\}}\left(\bigl{|}\psi\bigr{\rangle}\right)=\frac{\bigl{\langle}w|\psi\bigr{\rangle}}{\bigl{\langle}w|w\bigr{\rangle}}.$
(19)

In this context, a useful analytical tool that allows us to provide a matrix
nature to the concept of component is the _component isomorphism_ , defined as
the mapping $\left[\cdot\right]_{\mathcal{B}_{1}}:\mathscr{E}_{1}\rightarrow
M_{2\times 1}\left(\mathbb{C}\right)$:

$\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}:=\left(\begin{array}[]{c}\psi_{u}\\\
\psi_{w}\end{array}\right).$ (20)

In particular, this mapping is employed in APC to describe the input-output
relation of the anbit gates using matrices instead of linear operators (see
the description of equation 1 in the main text and Supplementary Note 2 on p.
Matrix representation.).

### 1.5 Multiple anbits: tensor product _vs_ Cartesian product

In order to operate with multiple anbits, we must construct a vector space
“higher” than the single-anbit vector space $\mathscr{E}_{1}$. This can be
done by using the tensor product or the Cartesian product. In this subsection,
we detail the main properties of both operations within the context of APC.

##### Tensor product.

The definition and mathematical properties of the tensor product can be found
rigorously detailed in Ch. 2 of ref. [10]. Here, we will only highlight the
following remarks:

  * •

The notation employed in APC will be the same as the notation used in quantum
computing (QC) to describe a system with multiple qubits. The $n$-anbit vector
space $\mathscr{E}_{n}$, constructed from $\mathscr{E}_{1}$ using the tensor
product, is denoted as:

$\mathscr{E}_{n}=\underset{n-1\textrm{
times}}{\underbrace{\mathscr{E}_{1}\otimes\mathscr{E}_{1}\otimes\ldots\otimes\mathscr{E}_{1}}}\equiv\mathscr{E}_{1}^{\otimes\left(n-1\right)}.$
(21)

  * •

A vector belonging to $\mathscr{E}_{n}$ ($\mathscr{E}_{1}$) will usually be
denoted by using an uppercase (lowercase) Greek letter, e.g.,
$\bigl{|}\Psi\bigr{\rangle}=\bigl{|}\psi_{1}\bigr{\rangle}\otimes\bigl{|}\psi_{2}\bigr{\rangle}\otimes\ldots\otimes\bigl{|}\psi_{n}\bigr{\rangle}$,
with $\bigl{|}\Psi\bigr{\rangle}\in\mathscr{E}_{n}$ and
$\bigl{|}\psi_{k}\bigr{\rangle}\in\mathscr{E}_{1}$, $\forall
k\in\left\\{1,\ldots,n\right\\}$. Here, we can use a more economical notation
by describing the above expression of the form
$\bigl{|}\Psi\bigr{\rangle}=\bigl{|}\psi_{1},\psi_{2},\ldots,\psi_{n}\bigr{\rangle}$.

  * •

The dimension of such a vector space is
$\dim\bigl{(}\mathscr{E}_{n}\bigr{)}=\dim\bigl{(}\mathscr{E}_{1}\bigr{)}^{n}$.

  * •

The scalar-vector product is ($\lambda\in\mathbb{C}$,
$\bigl{|}\Psi\bigr{\rangle}\in\mathscr{E}_{n}$):

$\displaystyle\lambda\bigl{|}\Psi\bigr{\rangle}$
$\displaystyle=\lambda\bigl{|}\psi_{1}\bigr{\rangle}\otimes\bigl{|}\psi_{2}\bigr{\rangle}\otimes\ldots\otimes\bigl{|}\psi_{n}\bigr{\rangle}$
$\displaystyle=\bigl{|}\psi_{1}\bigr{\rangle}\otimes\lambda\bigl{|}\psi_{2}\bigr{\rangle}\otimes\ldots\otimes\bigl{|}\psi_{n}\bigr{\rangle}$
$\displaystyle=\bigl{|}\psi_{1}\bigr{\rangle}\otimes\bigl{|}\psi_{2}\bigr{\rangle}\otimes\ldots\otimes\lambda\bigl{|}\psi_{n}\bigr{\rangle}.$
(22)

  * •

The null vector of $\mathscr{E}_{n}$ is constructed by applying $n-1$ times
the tensor product to the null vector
$\bigl{|}\mathbf{0}\bigr{\rangle}:=0\bigl{|}0\bigr{\rangle}+0\bigl{|}1\bigr{\rangle}$
of $\mathscr{E}_{1}$:
$\bigl{|}\mathbf{0}\bigr{\rangle}^{\otimes\left(n-1\right)}$. For the sake of
simplicity, we will also denote the null vector of $\mathscr{E}_{n}$ as
$\bigl{|}\mathbf{0}\bigr{\rangle}$ and the context should avoid the confusion.

  * •

The dual space of $\mathscr{E}_{1}$ is
$\mathscr{L}\bigl{(}\mathscr{E}_{1},\mathbb{C}\bigr{)}$: the set of
homomorphisms $\bigl{\langle}\varphi\bigr{|}$ (described by a “bra”) that
transform an anbit (described by a “ket”)
$\bigl{|}\psi\bigr{\rangle}\in\mathscr{E}_{1}$ into the complex number
$\bigl{\langle}\varphi|\psi\bigr{\rangle}$ by using the standard complex inner
product of $\mathscr{E}_{1}$. Along this line, note that the dual space of
$\mathscr{E}_{n}=\mathscr{E}_{1}^{\otimes\left(n-1\right)}$ is
$\mathscr{L}\bigl{(}\mathscr{E}_{1}^{\otimes\left(n-1\right)},\mathbb{C}\bigr{)}=\mathscr{L}\bigl{(}\mathscr{E}_{1},\mathbb{C}\bigr{)}^{\otimes\left(n-1\right)}$,
that is, the set of homomorphisms $\bigl{\langle}\Phi\bigr{|}$ constructed
from the tensor product of $n$ different homomorphisms
$\bigl{\langle}\varphi_{1}\bigr{|},\bigl{\langle}\varphi_{2}\bigr{|},\ldots,\bigl{\langle}\varphi_{n}\bigr{|}$
belonging to $\mathscr{L}\bigl{(}\mathscr{E}_{1},\mathbb{C}\bigr{)}$:
$\bigl{\langle}\Phi\bigr{|}=\bigl{\langle}\varphi_{1}\bigr{|}\otimes\bigl{\langle}\varphi_{2}\bigr{|}\otimes\ldots\otimes\bigl{\langle}\varphi_{n}\bigr{|}$.
Here, we can use a more economical notation rewriting the above expression as
$\bigl{\langle}\Phi\bigr{|}=\bigl{\langle}\varphi_{1},\varphi_{2},\ldots,\varphi_{n}\bigr{|}$.

  * •

The inner product of $\mathscr{E}_{n}$ is defined by combining the inner
product of $\mathscr{E}_{1}$ along with the multiplication operation of
$\mathbb{C}$. As an example, the inner product of
$\bigl{|}\Psi\bigr{\rangle}=\bigl{|}\psi_{1}\bigr{\rangle}\otimes\bigl{|}\psi_{2}\bigr{\rangle}$
and
$\bigl{|}\Phi\bigr{\rangle}=\bigl{|}\varphi_{1}\bigr{\rangle}\otimes\bigl{|}\varphi_{2}\bigr{\rangle}$
belonging to $\mathscr{E}_{2}$ is defined as:

$\bigl{\langle}\Psi|\Phi\bigr{\rangle}:=\bigl{\langle}\psi_{1}|\varphi_{1}\bigr{\rangle}\cdot\bigl{\langle}\psi_{2}|\varphi_{2}\bigr{\rangle}.$
(23)

  * •

The vector space $\mathscr{E}_{n}$ is a Hilbert space.

  * •

The canonical vector basis of $\mathscr{E}_{n}$ is built by applying the
tensor product to the canonical vector basis of $\mathscr{E}_{1}$. As an
example, the canonical vector basis of $\mathscr{E}_{2}$ is:

$\mathcal{B}_{2}=\left\\{\bigl{|}k\bigr{\rangle}\otimes\bigl{|}l\bigr{\rangle}\right\\}_{k,l\in\left\\{0,1\right\\}}=\left\\{\bigl{|}0,0\bigr{\rangle},\bigl{|}0,1\bigr{\rangle},\bigl{|}1,0\bigr{\rangle},\bigl{|}1,1\bigr{\rangle}\right\\}.$
(24)

Using the inner product given by Supplementary Equation 23, it follows that
$\mathcal{B}_{2}$ is orthonormal.

  * •

The components of a given ket
$\bigl{|}\psi_{1},\psi_{2},\ldots,\psi_{n}\bigr{\rangle}$ belonging to
$\mathscr{E}_{n}$ with vector basis $\mathcal{B}_{n}$ can be calculated from
the components (or anbit amplitudes) of the individuals kets
$\bigl{|}\psi_{1,\ldots,n}\bigr{\rangle}$ belonging to $\mathscr{E}_{1}$ with
vector basis $\mathcal{B}_{1}$ by using the Kronecker product
$\otimes_{\mathrm{K}}$:

$\left[\bigl{|}\psi_{1},\psi_{2},\ldots,\psi_{n}\bigr{\rangle}\right]_{\mathcal{B}_{n}}=\left[\bigl{|}\psi_{1}\bigr{\rangle}\right]_{\mathcal{B}_{1}}\otimes_{\mathrm{K}}\left[\bigl{|}\psi_{2}\bigr{\rangle}\right]_{\mathcal{B}_{1}}\otimes_{\mathrm{K}}\ldots\otimes_{\mathrm{K}}\left[\bigl{|}\psi_{n}\bigr{\rangle}\right]_{\mathcal{B}_{1}},$
(25)

where $\left[\cdot\right]_{\mathcal{B}_{n}}$ and
$\left[\cdot\right]_{\mathcal{B}_{1}}$are the component isomorphisms
associated to the bases $\mathcal{B}_{n}$ and $\mathcal{B}_{1}$, respectively
(see p. 1.4 Anbit amplitudes: component isomorphism). Supplementary Equation
25 applies to any basis $\mathcal{B}_{n}$ and $\mathcal{B}_{1}$ (not
necessarily being the canonical bases). For instance, consider two different
anbits
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$
and
$\bigl{|}\varphi\bigr{\rangle}=\varphi_{0}\bigl{|}0\bigr{\rangle}+\varphi_{1}\bigl{|}1\bigr{\rangle}$.
The tensor product is:

$\displaystyle\bigl{|}\psi\bigr{\rangle}\otimes\bigl{|}\varphi\bigr{\rangle}$
$\displaystyle=\left(\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}\right)\otimes\left(\varphi_{0}\bigl{|}0\bigr{\rangle}+\varphi_{1}\bigl{|}1\bigr{\rangle}\right)$
$\displaystyle=\psi_{0}\varphi_{0}\bigl{|}0,0\bigr{\rangle}+\psi_{0}\varphi_{1}\bigl{|}0,1\bigr{\rangle}+\psi_{1}\varphi_{0}\bigl{|}1,0\bigr{\rangle}+\psi_{1}\varphi_{1}\bigl{|}1,1\bigr{\rangle}.$
(26)

Therefore, the components of
$\bigl{|}\psi\bigr{\rangle}\otimes\bigl{|}\varphi\bigr{\rangle}\in\mathscr{E}_{2}$
with vector basis $\mathcal{B}_{2}$ given by Supplementary Equation 24 can be
calculated as:

$\left[\bigl{|}\psi\bigr{\rangle}\otimes\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{2}}=\left(\begin{array}[]{c}\psi_{0}\varphi_{0}\\\
\psi_{0}\varphi_{1}\\\ \psi_{1}\varphi_{0}\\\
\psi_{1}\varphi_{1}\end{array}\right)=\left(\begin{array}[]{c}\psi_{0}\\\
\psi_{1}\end{array}\right)\otimes_{\mathrm{K}}\left(\begin{array}[]{c}\varphi_{0}\\\
\varphi_{1}\end{array}\right)\equiv\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}\otimes_{\mathrm{K}}\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}.$
(27)

Supplementary Equation 27 can be applied, e.g., to obtain the anbit amplitudes
associated to the optical inputs depicted in Fig. 4c of the paper.

  * •

The tensor product is non-commutative. The 1:1 correspondence between
$\otimes$ and $\otimes_{\mathrm{K}}$ (emerged from the component isomorphism)
allows us to infer that $\otimes$ inherits the non-commutative property from
$\otimes_{\mathrm{K}}$. Using the above example, it is straightforward to
verify that
$\bigl{|}\psi\bigr{\rangle}\otimes\bigl{|}\varphi\bigr{\rangle}\neq\bigl{|}\varphi\bigr{\rangle}\otimes\bigl{|}\psi\bigr{\rangle}$
(when $\bigl{|}\psi\bigr{\rangle}\neq\bigl{|}\varphi\bigr{\rangle}$):

$\displaystyle\bigl{|}\psi\bigr{\rangle}\otimes\bigl{|}\varphi\bigr{\rangle}\overset{1:1}{\longleftrightarrow}\left[\bigl{|}\psi\bigr{\rangle}\otimes\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{2}}$
$\displaystyle=\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}\otimes_{\mathrm{K}}\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}$
$\displaystyle\neq\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}\otimes_{\mathrm{K}}\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=\left[\bigl{|}\varphi\bigr{\rangle}\otimes\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{2}}\overset{1:1}{\longleftrightarrow}\bigl{|}\varphi\bigr{\rangle}\otimes\bigl{|}\psi\bigr{\rangle}.$
(28)

##### Cartesian product.

The definition and mathematical properties of the Cartesian product
(equivalent to the direct sum when is applied to a finite number of vector
spaces) are rigorously detailed in refs. [9, 11]. Here, we will only highlight
the following remarks:

  * •

The $n$-anbit vector space $\mathscr{E}_{n}$, constructed from
$\mathscr{E}_{1}$ using the Cartesian product, is denoted as:

$\mathscr{E}_{n}=\underset{n-1\textrm{
times}}{\underbrace{\mathscr{E}_{1}\times\mathscr{E}_{1}\times\ldots\times\mathscr{E}_{1}}}\equiv\mathscr{E}_{1}^{\times\left(n-1\right)}.$
(29)

  * •

A vector belonging to $\mathscr{E}_{n}$ ($\mathscr{E}_{1}$) will usually be
denoted by using an uppercase (lowercase) Greek letter, e.g.,
$\bigl{|}\Psi\bigr{\rangle}=\bigl{|}\psi_{1}\bigr{\rangle}\times\bigl{|}\psi_{2}\bigr{\rangle}\times\ldots\times\bigl{|}\psi_{n}\bigr{\rangle}$,
with $\bigl{|}\Psi\bigr{\rangle}\in\mathscr{E}_{n}$ and
$\bigl{|}\psi_{k}\bigr{\rangle}\in\mathscr{E}_{1}$, $\forall
k\in\left\\{1,\ldots,n\right\\}$. Here, we can also use a classical notation
by describing the above expression via an $n$-tuple
$\bigl{|}\Psi\bigr{\rangle}=\bigl{(}\bigl{|}\psi_{1}\bigr{\rangle},\bigl{|}\psi_{2}\bigr{\rangle},\ldots,\bigl{|}\psi_{n}\bigr{\rangle}\bigr{)}$.

  * •

The dimension of such a vector space is
$\dim\bigl{(}\mathscr{E}_{n}\bigr{)}=n\dim\bigl{(}\mathscr{E}_{1}\bigr{)}$.

  * •

The scalar-vector product is ($\lambda\in\mathbb{C}$,
$\bigl{|}\Psi\bigr{\rangle}\in\mathscr{E}_{n}$):

$\displaystyle\lambda\bigl{|}\Psi\bigr{\rangle}$
$\displaystyle=\lambda\bigl{|}\psi_{1}\bigr{\rangle}\times\lambda\bigl{|}\psi_{2}\bigr{\rangle}\times\ldots\times\lambda\bigl{|}\psi_{n}\bigr{\rangle}\equiv\bigl{(}\lambda\bigl{|}\psi_{1}\bigr{\rangle},\lambda\bigl{|}\psi_{2}\bigr{\rangle},\ldots,\lambda\bigl{|}\psi_{n}\bigr{\rangle}\bigr{)}.$
(30)

  * •

The null vector of $\mathscr{E}_{n}$ is constructed by applying $n-1$ times
the Cartesian product to the null vector $\bigl{|}\mathbf{0}\bigr{\rangle}$ of
$\mathscr{E}_{1}$:
$\bigl{|}\mathbf{0}\bigr{\rangle}^{\times\left(n-1\right)}$. For the sake of
simplicity, we will also denote the null vector of $\mathscr{E}_{n}$ with the
ket $\bigl{|}\mathbf{0}\bigr{\rangle}$ and the context should avoid the
confusion.

  * •

The dual space of $\mathscr{E}_{n}=\mathscr{E}_{1}^{\times\left(n-1\right)}$
is
$\mathscr{L}\bigl{(}\mathscr{E}_{1}^{\times\left(n-1\right)},\mathbb{C}\bigr{)}=\mathscr{L}\bigl{(}\mathscr{E}_{1},\mathbb{C}\bigr{)}^{\times\left(n-1\right)}$,
that is, the set of homomorphisms $\bigl{\langle}\Phi\bigr{|}$ constructed
from the Cartesian product of $n$ different homomorphisms
$\bigl{\langle}\varphi_{1}\bigr{|},\bigl{\langle}\varphi_{2}\bigr{|},\ldots,\bigl{\langle}\varphi_{n}\bigr{|}$
belonging to $\mathscr{L}\bigl{(}\mathscr{E}_{1},\mathbb{C}\bigr{)}$:
$\bigl{\langle}\Phi\bigr{|}=\bigl{\langle}\varphi_{1}\bigr{|}\times\bigl{\langle}\varphi_{2}\bigr{|}\times\ldots\times\bigl{\langle}\varphi_{n}\bigr{|}\equiv\bigl{(}\bigl{\langle}\varphi_{1}\bigr{|},\bigl{\langle}\varphi_{2}\bigr{|},\ldots,\bigl{\langle}\varphi_{n}\bigr{|}\bigr{)}$.

  * •

The inner product of $\mathscr{E}_{n}$ is defined by combining the inner
product of $\mathscr{E}_{1}$ along with the addition operation of
$\mathbb{C}$. As an example, the inner product of
$\bigl{|}\Psi\bigr{\rangle}=\bigl{|}\psi_{1}\bigr{\rangle}\times\bigl{|}\psi_{2}\bigr{\rangle}$
and
$\bigl{|}\Phi\bigr{\rangle}=\bigl{|}\varphi_{1}\bigr{\rangle}\times\bigl{|}\varphi_{2}\bigr{\rangle}$
belonging to $\mathscr{E}_{2}$ is defined as:

$\bigl{\langle}\Psi|\Phi\bigr{\rangle}:=\bigl{\langle}\psi_{1}|\varphi_{1}\bigr{\rangle}+\bigl{\langle}\psi_{2}|\varphi_{2}\bigr{\rangle}.$
(31)

  * •

The vector space $\mathscr{E}_{n}$ is a Hilbert space.

  * •

The canonical vector basis of $\mathscr{E}_{n}$ is built by combining the
canonical vector basis of $\mathscr{E}_{1}$ along with the null anbit of
$\mathscr{E}_{1}$. As an illustrative example, the canonical vector basis of
$\mathscr{E}_{2}$ is found to be:

$\mathcal{B}_{2}=\left\\{\left(\bigl{|}0\bigr{\rangle},\bigl{|}\mathbf{0}\bigr{\rangle}\right),\left(\bigl{|}1\bigr{\rangle},\bigl{|}\mathbf{0}\bigr{\rangle}\right),\left(\bigl{|}\mathbf{0}\bigr{\rangle},\bigl{|}0\bigr{\rangle}\right),\left(\bigl{|}\mathbf{0}\bigr{\rangle},\bigl{|}1\bigr{\rangle}\right)\right\\}.$
(32)

Using the inner product given by Supplementary Equation 31, it follows that
$\mathcal{B}_{2}$ is orthonormal.

  * •

The components of a given ket
$\bigl{|}\psi_{1}\bigr{\rangle}\times\bigl{|}\psi_{2}\bigr{\rangle}\times\ldots\times\bigl{|}\psi_{n}\bigr{\rangle}$
belonging to $\mathscr{E}_{n}$ with vector basis $\mathcal{B}_{n}$ can be
calculated from the components (or anbit amplitudes) of the individuals kets
$\bigl{|}\psi_{1,\ldots,n}\bigr{\rangle}$ belonging to $\mathscr{E}_{1}$ with
vector basis $\mathcal{B}_{1}$ as follows:

$\left[\bigl{|}\psi_{1}\bigr{\rangle}\times\bigl{|}\psi_{2}\bigr{\rangle}\times\ldots\times\bigl{|}\psi_{n}\bigr{\rangle}\right]_{\mathcal{B}_{n}}=\left(\begin{array}[]{c}\left[\bigl{|}\psi_{1}\bigr{\rangle}\right]_{\mathcal{B}_{1}}\\\
\left[\bigl{|}\psi_{2}\bigr{\rangle}\right]_{\mathcal{B}_{1}}\\\ \cdots\\\
\left[\bigl{|}\psi_{n}\bigr{\rangle}\right]_{\mathcal{B}_{1}}\end{array}\right),$
(33)

where $\left[\cdot\right]_{\mathcal{B}_{n}}$ and
$\left[\cdot\right]_{\mathcal{B}_{1}}$are the component isomorphisms
associated to the bases $\mathcal{B}_{n}$ and $\mathcal{B}_{1}$, respectively.
Supplementary Equation 33 applies to any basis $\mathcal{B}_{n}$ and
$\mathcal{B}_{1}$ (not necessarily being the canonical bases). For instance,
consider two different anbits
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$
and
$\bigl{|}\varphi\bigr{\rangle}=\varphi_{0}\bigl{|}0\bigr{\rangle}+\varphi_{1}\bigl{|}1\bigr{\rangle}$.
The Cartesian product is:

$\displaystyle\bigl{|}\psi\bigr{\rangle}\times\bigl{|}\varphi\bigr{\rangle}\equiv\bigl{(}\bigl{|}\psi\bigr{\rangle},\bigl{|}\varphi\bigr{\rangle}\bigr{)}$
$\displaystyle=\bigl{(}\sum_{k=0}^{1}\psi_{k}\bigl{|}k\bigr{\rangle},\sum_{l=0}^{1}\varphi_{l}\bigl{|}l\bigr{\rangle}\bigr{)}$
$\displaystyle=\sum_{k=0}^{1}\psi_{k}\bigl{(}\bigl{|}k\bigr{\rangle},\bigl{|}\mathbf{0}\bigr{\rangle}\bigr{)}+\sum_{l=0}^{1}\varphi_{l}\bigl{(}\bigl{|}\mathbf{0}\bigr{\rangle},\bigl{|}l\bigr{\rangle}\bigr{)}.$
(34)

Therefore, the components of
$\bigl{|}\psi\bigr{\rangle}\times\bigl{|}\varphi\bigr{\rangle}\in\mathscr{E}_{2}$
with vector basis $\mathcal{B}_{2}$ given by Supplementary Equation 32 can be
calculated as:

$\left[\bigl{|}\psi\bigr{\rangle}\times\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{2}}=\left(\begin{array}[]{c}\psi_{0}\\\
\psi_{1}\\\ \varphi_{0}\\\
\varphi_{1}\end{array}\right)\equiv\left(\begin{array}[]{c}\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}\\\
\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}\end{array}\right).$
(35)

Supplementary Equation 35 can be applied, e.g., to obtain the anbit amplitudes
associated to the optical inputs shown in Fig. 5a of the paper.

  * •

The Cartesian product is non-commutative:
$\bigl{|}\psi\bigr{\rangle}\times\bigl{|}\varphi\bigr{\rangle}\neq\bigl{|}\varphi\bigr{\rangle}\times\bigl{|}\psi\bigr{\rangle}$
(when $\bigl{|}\psi\bigr{\rangle}\neq\bigl{|}\varphi\bigr{\rangle}$).

##### Final remarks.

Consider two different anbits
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$
and
$\bigl{|}\varphi\bigr{\rangle}=\varphi_{0}\bigl{|}0\bigr{\rangle}+\varphi_{1}\bigl{|}1\bigr{\rangle}$.
It is worthy to note that the tensor product mixes the information encoded by
the anbit amplitudes (see Supplementary Equation 27). In contrast, the
Cartesian product preserves this information (see Supplementary Equation 35)
allowing us to independently transform the anbit amplitudes $\psi_{0}$,
$\psi_{1}$, $\varphi_{0}$ and $\varphi_{1}$ in a multi-anbit gate (e.g. the
fan-in gate, see Fig. 5a of the paper).

On the other hand, as commented in the main text, there are some specific
multi-anbit gates (such as the fan-in and fan-out gates) that exhibit a linear
(nonlinear) nature when using the Cartesian (tensor) product to construct
them, see Supplementary Note 3 on p. Definition and formalism. for more
details.

## Supplementary Note 2: combinational design

In this section, we include additional information about the fundamental
pieces of combinational APC architectures: single-anbit linear gates and
controlled gates.

### 2.1 General properties of single-anbit linear gates

A single-anbit linear gate is described by a linear operator (or endomorphism)
$\widehat{\mathrm{F}}:\mathscr{E}_{1}\rightarrow\mathscr{E}_{1}$ carrying out
a transformation between two different anbits: the input anbit
$\bigl{|}\psi\bigr{\rangle}=\psi_{0}\bigl{|}0\bigr{\rangle}+\psi_{1}\bigl{|}1\bigr{\rangle}$
and the output anbit
$\bigl{|}\varphi\bigr{\rangle}=\varphi_{0}\bigl{|}0\bigr{\rangle}+\varphi_{1}\bigl{|}1\bigr{\rangle}$.
In the next lines, we include supplementary notes about the general properties
of $\widehat{\mathrm{F}}$ reported in the main text.

##### Matrix representation.

Consider the canonical (orthonormal) vector basis
$\mathcal{B}_{1}=\left\\{\left|0\right\rangle,\left|1\right\rangle\right\\}$
of $\mathscr{E}_{1}$. Using the fundamentals of linear algebra [12], it is
well-known that any _linear_ mapping of $\mathscr{E}_{1}$ has associated the
following (and unique) matrix representation:

$F=M_{\mathcal{B}_{1}}^{\mathcal{B}_{1}}\bigl{(}\widehat{\mathrm{F}}\bigr{)}=\left(\begin{array}[]{cc}\bigl{[}\widehat{\mathrm{F}}\bigl{|}0\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}&\bigl{[}\widehat{\mathrm{F}}\bigl{|}1\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}\end{array}\right),$
(36)

where $\left[\cdot\right]_{\mathcal{B}_{1}}$ is the component isomorphism
detailed on p. 1.4 Anbit amplitudes: component isomorphism. Using
Supplementary Equation 19 to calculate the components of
$\widehat{\mathrm{F}}\left|0\right\rangle$ and
$\widehat{\mathrm{F}}\left|1\right\rangle$ associated to the basis
$\mathcal{B}_{1}$, we find that:

$\displaystyle\bigl{[}\widehat{\mathrm{F}}\bigl{|}0\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}=\left(\begin{array}[]{c}\bigl{\langle}0|\widehat{\mathrm{F}}|0\bigr{\rangle}\\\
\bigl{\langle}1|\widehat{\mathrm{F}}|0\bigr{\rangle}\end{array}\right)$
$\displaystyle,\ \ \ \ \
\bigl{[}\widehat{\mathrm{F}}\bigl{|}1\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}=\left(\begin{array}[]{c}\bigl{\langle}0|\widehat{\mathrm{F}}|1\bigr{\rangle}\\\
\bigl{\langle}1|\widehat{\mathrm{F}}|1\bigr{\rangle}\end{array}\right).$ (41)

Combining Supplementary Equations 36 and 41, we obtain equation 1 of the
paper, reproduced here for clarity:

$F=\left(\begin{array}[]{cc}\bigl{\langle}0|\widehat{\mathrm{F}}|0\bigr{\rangle}&\bigl{\langle}0|\widehat{\mathrm{F}}|1\bigr{\rangle}\\\
\bigl{\langle}1|\widehat{\mathrm{F}}|0\bigr{\rangle}&\bigl{\langle}1|\widehat{\mathrm{F}}|1\bigr{\rangle}\end{array}\right).$
(42)

Moreover, applying the isomorphism $\left[\cdot\right]_{\mathcal{B}_{1}}$ to
the input-output relation
$\bigl{|}\varphi\bigr{\rangle}=\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}$,
we find that
$\bigl{[}\bigl{|}\varphi\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}=\bigl{[}\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}$where:

$\bigl{[}\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}\bigr{]}_{\mathcal{B}_{1}}=\left(\begin{array}[]{c}\bigl{\langle}0|\widehat{\mathrm{F}}|\psi\bigr{\rangle}\\\
\bigl{\langle}1|\widehat{\mathrm{F}}|\psi\bigr{\rangle}\end{array}\right)=\left(\begin{array}[]{c}\psi_{0}\bigl{\langle}0|\widehat{\mathrm{F}}|0\bigr{\rangle}+\psi_{1}\bigl{\langle}0|\widehat{\mathrm{F}}|1\bigr{\rangle}\\\
\psi_{0}\bigl{\langle}1|\widehat{\mathrm{F}}|0\bigr{\rangle}+\psi_{1}\bigl{\langle}1|\widehat{\mathrm{F}}|1\bigr{\rangle}\end{array}\right)=F\left(\begin{array}[]{c}\psi_{0}\\\
\psi_{1}\end{array}\right).$ (43)

Hence,
$\bigl{|}\varphi\bigr{\rangle}=\widehat{\mathrm{F}}\bigl{|}\psi\bigr{\rangle}$
can equivalently be expressed via the matrix relation
$\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=F\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}$,
with
$\left[\bigl{|}\varphi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=\bigl{(}\begin{array}[]{cc}\varphi_{0}&\varphi_{1}\end{array}\bigr{)}^{T}$
and
$\left[\bigl{|}\psi\bigr{\rangle}\right]_{\mathcal{B}_{1}}=\bigl{(}\begin{array}[]{cc}\psi_{0}&\psi_{1}\end{array}\bigr{)}^{T}$
($T$ denotes the transpose matrix). As commented above on p. 1.4 Anbit
amplitudes: component isomorphism, the component isomorphism allows us to
describe the input-output relation of the anbit gates using matrices instead
of linear operators.

##### Ket-bra representation.

Keeping in mind that $M_{\mathcal{B}_{1}}^{\mathcal{B}_{1}}\left(\cdot\right)$
is an isomorphism [12], it should be noted that we can always recover the
input from the output in Supplementary Equation 36. In this vein, the linear
operator $\widehat{\mathrm{F}}$ can be calculated from the matrix $F$ as
follows:

$\widehat{\mathrm{F}}=\sum_{n,m}F_{nm}\bigl{|}n\bigr{\rangle}\bigl{\langle}m\bigr{|},$
(44)

where $n,m\in\left\\{0,1\right\\}$ and $F_{nm}$ is the entry of $F$ located at
the $\left(n+1\right)$-th row and $\left(m+1\right)$-th column. Supplementary
Equation 44 will be referred to as the _ket-bra representation_ of the gate.
This equation may be derived from Supplementary Equation 42, which can be
recast of the form
$F_{nm}=\bigl{\langle}n|\widehat{\mathrm{F}}|m\bigr{\rangle}$. Using this
expression, we infer that
$F_{nm}\bigl{|}n\bigr{\rangle}\bigl{\langle}m\bigr{|}=\bigl{|}n\bigr{\rangle}\bigl{\langle}n|\widehat{\mathrm{F}}|m\bigr{\rangle}\bigl{\langle}m\bigr{|}$.
Applying the double summation $\sum_{n,m}$ at both sides and taking into
account that the vector basis $\mathcal{B}_{1}$ satisfies the closure relation
$\sum_{n}\bigl{|}n\bigr{\rangle}\bigl{\langle}n|=\widehat{1}$ (where
$\widehat{1}$ is the identity operator) [10], then it directly follows
Supplementary Equation 44.

##### Geometric representation.

Using differential measurement, the input anbit $\bigl{|}\psi\bigr{\rangle}$
and the output anbit $\bigl{|}\varphi\bigr{\rangle}$ can be geometrically
represented in the GBS as two different points (Fig. 3a). If the anbit
transformation $\widehat{\mathrm{F}}$ is a U-gate, both points are connected
by a trajectory describing a rotation of an angle $\alpha$ around an arbitrary
unit vector $\hat{\mathbf{n}}$ (Fig. 3b). Such a trajectory preserves the
radius in the GBS. However, if $\widehat{\mathrm{F}}$ is a G- or M-gate, there
is no specific _kind_ of trajectory connecting both points. This can be
inferred from the singular value decomposition (SVD), which factorizes $F$ as
a function of two U-gates ($U_{1}$ and $U_{2}$) along with a $2\times 2$
diagonal matrix $D$ with non-negative real entries [9, 12, 13]:
$F=U_{2}DU_{1}$. The matrices $U_{1}$ and $U_{2}$ can be respectively
described by two different rotations of angles $\alpha_{1}$ and $\alpha_{2}$
around two arbitrary unit vectors $\hat{\mathbf{n}}_{1}$ and
$\hat{\mathbf{n}}_{2}$:
$U_{1}=e^{i\delta_{1}}R_{\hat{\mathbf{n}}_{1}}\left(\alpha_{1}\right)$ and
$U_{2}=e^{i\delta_{2}}R_{\hat{\mathbf{n}}_{1}}\left(\alpha_{2}\right)$ (the
global phases $\delta_{1}$ and $\delta_{2}$ are not observable in the GBS).
The diagonal matrix:

$D=\left(\begin{array}[]{cc}d_{1}&0\\\ 0&d_{2}\end{array}\right),$ (45)

with $d_{1}\geq d_{2}\geq 0$, modifies $\left|\psi_{0}\right|$ and
$\left|\psi_{1}\right|$ but, unfortunately, this parametric matrix cannot be
associated to a specific class of trajectory. As an example, taking $d_{2}=0$,
$D$ projects $\left|\psi\right\rangle$ onto the positive $z$-axis of the GBS
annihilating the anbit amplitude $\psi_{1}$. However, if $d_{1}=d_{2}=1$, then
$D$ preserves the location of $\left|\psi\right\rangle$. Consequently, a G- or
M-gate cannot be represented by a universal kind of trajectory. Each numerical
case leads to a different trajectory in the GBS.

##### Lorentz reciprocity and forward-backward (FB) symmetry.

By definition, an optical circuit is said to be reciprocal if and only if the
Lorentz reciprocity theorem is satisfied in such a system [4, 14, 15]. By
definition, an optical circuit is said to be symmetric (or, equivalently, it
is said that preserves the FB symmetry) if and only if the system has the same
transfer matrices associated to the forward and backward light propagation
directions [4]. Specifically, the reciprocity and FB symmetry of an optical
circuit may be theoretically analysed via the scattering and transfer matrices
[4, 16].

In the following, let us discuss some remarks and logical implications between
the $F$ matrix of a single-anbit linear gate and the scattering and transfer
matrices associated with an optical implementation of such a gate (for the
sake of clarity, the reader should know the definition and basic properties of
the scattering matrix ($S$), the forward and backward transfer matrices
($T_{\mathrm{f}}$, $T_{\mathrm{b}}$), and the reduced forward and backward
transfer matrices ($\widetilde{T}_{\mathrm{f}}$, $\widetilde{T}_{\mathrm{b}}$)
of an optical circuit, see Ch. 2 of ref. [4] for more details):

  1. 1.

The Lorentz reciprocity and the FB symmetry are not properties of a gate.
These are optical properties exclusively associated with a specific PIP
implementation of a gate. Therefore, a gate could be implemented by different
PIP circuits performing the same $F$ matrix transformation, but exhibiting
opposite optical properties.

  2. 2.

An optical circuit preserving (breaking) the FB symmetry will induce the same
(a different) anbit transformation in each propagation direction.

  3. 3.

If an optical circuit of a gate preserves the FB symmetry
($T_{\mathrm{f}}=T_{\mathrm{b}}$), then the circuit is reciprocal ($S=S^{T}$).
The converse is not true [4, 15].

  4. 4.

The scattering matrix of a $2\times 2$ _non-reflective_ optical system is
found to be [4]:

$S=\left(\begin{array}[]{c|c}0&\widetilde{T}_{\mathrm{b}}\\\
\hline\cr\widetilde{T}_{\mathrm{f}}&0\end{array}\right)\in
M_{4}\left(\mathbb{C}\right),$ (46)

with $\widetilde{T}_{\mathrm{f}},\widetilde{T}_{\mathrm{b}}\in
M_{2}\left(\mathbb{C}\right)$. Assuming that light reflection can usually be
neglected in a PIP circuit [4, 17], we will consider that the _ideal_ optical
implementation of a gate is non-reflective. Hence, the scattering matrix of
any optical implementation of a gate can ideally be assumed of the form:

$S=\left(\begin{array}[]{c|c}0&\widetilde{T}_{\mathrm{b}}\\\ \hline\cr
F&0\end{array}\right),$ (47)

with $\widetilde{T}_{\mathrm{f}}\equiv F$. The form of the matrix
$\widetilde{T}_{\mathrm{b}}$ directly depends on the specific optical
architecture of the gate.

  5. 5.

If the circuit of a gate is reciprocal, we know that $S=S^{T}$ [4].
Accordingly, $\widetilde{T}_{\mathrm{b}}\equiv F^{T}$ and the scattering
matrix becomes:

$S=\left(\begin{array}[]{c|c}0&F^{T}\\\ \hline\cr F&0\end{array}\right).$ (48)

  6. 6.

If the circuit of a gate is reciprocal and the gate satisfies the condition
$F=F^{T}$, then the circuit preserves the FB symmetry
($\widetilde{T}_{\mathrm{f}}=\widetilde{T}_{\mathrm{b}}\equiv F$) and the
scattering matrix is reduced to:

$S=\left(\begin{array}[]{c|c}0&F\\\ \hline\cr F&0\end{array}\right).$ (49)

Using the contrapositive statement, if the circuit of a gate breaks the FB
symmetry ($\widetilde{T}_{\mathrm{f}}\neq\widetilde{T}_{\mathrm{b}}$), then it
follows that the Lorentz reciprocity is broken _or_ the gate is described by
an asymmetric matrix ($F\neq F^{T}$). Both situations can take place
simultaneously.

  7. 7.

There is no logical implication between the concepts of circuital reciprocity
and gate reversibility. As commented above, the reciprocity is a functional
property of an optical implementation of a gate, while the reversibility is a
mathematical property of the endomorphism defining the gate (discussed in the
main text). In the same vein, there is no logical implication between the
concepts of FB symmetry and gate reversibility.

### 2.2 Equivalent circuit architectures of single-anbit linear gates

##### U-gates.

Equivalent optical implementations of a single-anbit U-gate can be proposed by
selecting different rotation vectors in Euler’s rotation theorem to factorize
the $2\times 2$ universal unitary matrix given by equation 2 of the paper
[18]. For instance, instead of performing the factorization
$U=e^{i\delta}R_{\hat{\mathbf{z}}}\left(\alpha_{3}\right)R_{\hat{\mathbf{x}}}\left(\alpha_{2}\right)R_{\hat{\mathbf{z}}}\left(\alpha_{1}\right)$,
whose optical implementation is shown in Fig. 3b, we can select the unit
vector $\hat{\mathbf{y}}$ in the second rotation:

$U=e^{i\delta}R_{\hat{\mathbf{z}}}\left(\alpha_{3}\right)R_{\hat{\mathbf{y}}}\left(\alpha_{2}\right)R_{\hat{\mathbf{z}}}\left(\alpha_{1}\right)=e^{i\delta}\left(\begin{array}[]{cc}\cos\frac{\alpha_{2}}{2}e^{-i\left(\frac{\alpha_{3}+\alpha_{1}}{2}\right)}&-\sin\frac{\alpha_{2}}{2}e^{-i\left(\frac{\alpha_{3}-\alpha_{1}}{2}\right)}\\\
\sin\frac{\alpha_{2}}{2}e^{i\left(\frac{\alpha_{3}-\alpha_{1}}{2}\right)}&\cos\frac{\alpha_{2}}{2}e^{i\left(\frac{\alpha_{3}+\alpha_{1}}{2}\right)}\end{array}\right).$
(50)

Supplementary Figure 5 shows the $2\times 2$ optical system whose (reduced)
forward transfer matrix $\widetilde{T}_{\mathrm{f}}$ is given by the above
equation. In contrast to the architecture depicted in Fig. 3b, which requires
a tunable symmetric directional coupler (DIC), this scheme is based on fixed
couplers (50:50 beam splitters implemented via multi-mode interferometers
(MMIs) or fixed symmetric DICs). Although the fabrication of a fixed coupler
is simpler than that of a tunable coupler, the main drawback of this
implementation of a U-gate is that it will approximately require the double
footprint than that of the circuit of Fig. 3b because of a twice number of
couplers must be integrated in this architecture.

Supplementary Figure 5. Optical circuit of a U-gate implementing the universal
unitary matrix of equation 2 of the paper via Euler’s factorization given by
Supplementary Equation 50.

On the other hand, it is natural to wonder about the possibility of building a
more compact architecture of a U-gate (a $2\times 2$ universal unitary system)
than the scheme proposed in Fig. 3b by using a different factorization from
Euler’s rotation theorem. Remarkably, this question has been recently studied
in ref. [18] within the context of unitary signal PIP processors. As reported
in this reference, alternative $2\times 2$ unitary factorization techniques
can be found in the mathematical literature (e.g. the cosine-sine
decomposition), but all of them lead to optical schemes of a $2\times 2$
universal unitary system integrating a higher number of basic devices than in
our proposal.

##### G-gates.

An optical implementation of a single-anbit G-gate (different from but
equivalent to the architecture depicted in Fig. 3c of the paper, based on the
SVD) can be found by using _Mostow’s decomposition_ [19, 20]. This theorem
establishes that a non-singular matrix $G$ can be factorized as a function of
a unitary matrix $U$, a real anti-symmetric matrix $A$ ($A=-A^{T}$) and a real
symmetric matrix $B$ ($B=B^{T}$) following the expression:

$G=Ue^{iA}e^{B}.$ (51)

The main handicap of Mostow’s decomposition is that the exponential matrices
cannot be directly implemented by employing mainstream PIP devices. In order
to unveil the optical architecture of Supplementary Equation 51, it should be
noted that $E_{1}=e^{iA}$ and $E_{2}=e^{B}$ are Hermitian (but non-unitary)
matrices:

$\displaystyle E_{1}^{\dagger}$
$\displaystyle=\left(e^{iA}\right)^{\dagger}=e^{-iA^{\dagger}}=e^{-iA^{T}}=e^{iA}=E_{1},$
(52) $\displaystyle E_{2}^{\dagger}$
$\displaystyle=\left(e^{B}\right)^{\dagger}=e^{B^{\dagger}}=e^{B^{T}}=e^{B}=E_{2},$
(53)

with $E_{1}^{\dagger}E_{1}=E_{1}^{2}=e^{i2A}\neq I$ and
$E_{2}^{\dagger}E_{2}=E_{2}^{2}=e^{2B}\neq I$ ($\dagger$ denotes the conjugate
transpose matrix). Therefore, $E_{1}$ and $E_{2}$ can be factorized by using
the spectral decomposition as $E_{1}=U_{1}\Lambda_{1}U_{1}^{-1}$ and
$E_{2}=U_{2}\Lambda_{2}U_{2}^{-1}$, where $U_{1,2}$ are matrices built from
linearly independent eigenvectors of $E_{1,2}$ and $\Lambda_{1,2}$ are
diagonal matrices whose entries are the corresponding (real) eigenvalues [9,
12]. Moreover, since
$\mathcal{B}_{1}=\left\\{\left|0\right\rangle,\left|1\right\rangle\right\\}$
is an orthonormal basis, then it follows that $U_{1,2}$ are unitary matrices
($U_{1,2}^{-1}=U_{1,2}^{\dagger}$). Hence, Supplementary Equation 51 can be
recast as:

$G=\bigl{(}UU_{1}\bigr{)}\Lambda_{1}\bigl{(}U_{1}^{\dagger}U_{2}\bigr{)}\Lambda_{2}U_{2}^{\dagger}.$
(54)

As seen, we have factorized $G$ as a function of _three_ unitary matrices
$UU_{1}$, $U_{1}^{\dagger}U_{2}$, $U_{2}^{\dagger}$ and _two_ diagonal
matrices $\Lambda_{1}$, $\Lambda_{2}$. Interestingly, this factorization is
implementable using basic PIP devices, see Supplementary Figure 6.

Supplementary Figure 6. Optical circuit of a G-gate based on Mostow’s
factorization.

An additional remark about this architecture should be discussed. While the
first diagonal matrix of the circuit ($\Lambda_{2}$) may have positive and
negative real entries (the negative sign is implemented by phase shifters
(PSs) of $\pi$ rad that can alternatively be implemented by the PSs of the
final $R_{\hat{\mathbf{z}}}$ rotation in the first U-gate), the second
diagonal matrix ($\Lambda_{1}$) has non-negative real entries.

For completeness, let us demonstrate the non-negative nature of the entries of
$\Lambda_{1}$. Since $A$ is real anti-symmetric, then it follows that $A$ must
be of the form:

$A=\left(\begin{array}[]{cc}0&a\\\ -a&0\end{array}\right),$ (55)

with $a\in\mathbb{R}$. The (non-degenerate) eigenvalues of $A$ are found to be
$\mu_{1,2}=\pm ia$. Here, since the geometric and algebraic multiplicity are
the same, $A$ is diagonalizable. This implies that $A$ can be factorized by
using the spectral decomposition. Hence, $A=U_{1}D_{1}U_{1}^{-1}$ with
$D_{1}=\textrm{diag}\left(\mu_{1},\mu_{2}\right)$ and:

$e^{iA}=e^{iU_{1}D_{1}U_{1}^{-1}}=U_{1}e^{iD_{1}}U_{1}^{-1}\equiv
U_{1}\Lambda_{1}U_{1}^{-1},$ (56)

where the eigenvalues of $e^{iA}$, which are the entries of
$\Lambda_{1}=e^{iD_{1}}$, are found to be:

$\lambda_{1,2}=e^{i\mu_{1,2}}=e^{\mp a}>0.$ (57)

##### M-gates.

A single-anbit M-gate is described by a complex matrix belonging to
$M_{2}\left(\mathbb{C}\right)$:

$M=\left(\begin{array}[]{cc}m_{11}&m_{12}\\\ m_{21}&m_{22}\end{array}\right).$
(58)

Remarkably, $M_{2}\left(\mathbb{C}\right)$ is the complex Lie algebra
$\mathfrak{gl}\left(2,\mathbb{C}\right)$ [7, 21], with vector basis composed
by the Pauli matrices $\left\\{\sigma_{k}\right\\}_{k=0}^{3}$:

$\sigma_{k}:=\left(\begin{array}[]{cc}\delta_{k0}+\delta_{k3}&\delta_{k1}-i\delta_{k2}\\\
\delta_{k1}+i\delta_{k2}&\delta_{k0}-\delta_{k3}\end{array}\right),$ (59)

where $\delta_{kl}$ is the Kronecker delta ($\delta_{kl}=1$ with $k=l$ and
$\delta_{kl}=0$ with $k\neq l$). This implies that any M-gate can be described
as a linear combination of the Pauli matrices (see p. 427 of ref. [10]):

$M=\sum_{k=0}^{3}\alpha_{k}\sigma_{k},$ (60)

where $\alpha_{0}=(m_{11}+m_{22})/2$, $\alpha_{1}=(m_{12}+m_{21})/2$,
$\alpha_{2}=i(m_{12}-m_{21})/2$ and $\alpha_{3}=(m_{11}-m_{22})/2$.
Consequently, an optical circuit implementing Supplementary Equation 60 will
give rise to an equivalent scheme to the architecture of an M-gate depicted in
Fig. 3c of the paper, based on the SVD.

To this end, let us express the Pauli matrices as a function of the rotation
matrices of the Bloch sphere (which can be implemented via PIP technology
because are unitary matrices [18]):

$\displaystyle\sigma_{0}=I,\ \ \
\sigma_{1}=iR_{\hat{\mathbf{x}}}\left(\pi\right),$ $\displaystyle\ \ \
\sigma_{2}=iR_{\hat{\mathbf{y}}}\left(\pi\right),\ \ \
\sigma_{3}=iR_{\hat{\mathbf{z}}}\left(\pi\right).$ (61)

In this fashion, Supplementary Equation 60 becomes:

$M=\alpha_{0}I+i\alpha_{1}R_{\hat{\mathbf{x}}}\left(\pi\right)+i\alpha_{2}R_{\hat{\mathbf{y}}}\left(\pi\right)+i\alpha_{3}R_{\hat{\mathbf{z}}}\left(\pi\right).$
(62)

The optical implementation of the above equation using PIP technology only
requires (see Supplementary Figure 7): (_i_) the minimal circuit architecture