qml.templates.subroutines.Interferometer¶

Interferometer
(theta, phi, varphi, wires, mesh='rectangular', beamsplitter='pennylane')[source]¶ General linear interferometer, an array of beamsplitters and phase shifters.
For \(M\) wires, the general interferometer is specified by providing \(M(M1)/2\) transmittivity angles \(\theta\) and the same number of phase angles \(\phi\), as well as \(M1\) additional rotation parameters \(\varphi\).
By specifying the keyword argument
mesh
, the scheme used to implement the interferometer may be adjusted:mesh='rectangular'
(default): uses the scheme described in Clements et al., resulting in a rectangular array of \(M(M1)/2\) beamsplitters arranged in \(M\) slices and ordered from left to right and top to bottom in each slice. The first beamsplitter acts on wires \(0\) and \(1\):mesh='triangular'
: uses the scheme described in Reck et al., resulting in a triangular array of \(M(M1)/2\) beamsplitters arranged in \(2M3\) slices and ordered from left to right and top to bottom. The first and fourth beamsplitters act on wires \(M1\) and \(M\), the second on \(M2\) and \(M1\), and the third on \(M3\) and \(M2\), and so on.
In both schemes, the network of
Beamsplitter
operations is followed by \(M\) localRotation
Operations.The rectangular decomposition is generally advantageous, as it has a lower circuit depth (\(M\) vs \(2M3\)) and optical depth than the triangular decomposition, resulting in reduced optical loss.
This is an example of a 4mode interferometer with beamsplitters \(B\) and rotations \(R\), using
mesh='rectangular'
:Note
The decomposition as formulated in Clements et al. uses a different convention for a beamsplitter \(T(\theta, \phi)\) than PennyLane, namely:
\[T(\theta, \phi) = BS(\theta, 0) R(\phi)\]For the universality of the decomposition, the used convention is irrelevant, but for a given set of angles the resulting interferometers will be different.
If an interferometer consistent with the convention from Clements et al. is needed, the optional keyword argument
beamsplitter='clements'
can be specified. This will result in eachBeamsplitter
being preceded by aRotation
and thus increase the number of elementary operations in the circuit. Parameters
theta (array) – length \(M(M1)/2\) array of transmittivity angles \(\theta\)
phi (array) – length \(M(M1)/2\) array of phase angles \(\phi\)
varphi (array) – length \(M\) array of rotation angles \(\varphi\)
wires (Sequence[int]) – wires the interferometer should act on
mesh (string) – the type of mesh to use
beamsplitter (str) – if
clements
, the beamsplitter convention from Clements et al. 2016 (https://dx.doi.org/10.1364/OPTICA.3.001460) is used; ifpennylane
, the beamsplitter is implemented via PennyLane’sBeamsplitter
operation.
 Raises
ValueError – if inputs do not have the correct format
Contents
Using PennyLane
Development
API
Downloads