# Beamsplitter¶

Module: pennylane

class Beamsplitter(theta, phi, wires)[source]

Beamsplitter interaction.

$B(\theta,\phi) = \exp\left(\theta (e^{i \phi} \a \hat{b}^\dagger -e^{-i \phi}\ad \hat{b}) \right).$

Details:

• Number of wires: 2

• Number of parameters: 2

• Gradient recipe: $$\frac{d}{d \theta}f(B(\theta,\phi)) = \frac{1}{2} \left[f(B(\theta+\pi/2, \phi)) - f(B(\theta-\pi/2, \phi))\right]$$ where $$f$$ is an expectation value depending on $$B(\theta,\phi)$$.

• Heisenberg representation:

$\begin{split}M = \begin{bmatrix} 1 & 0 & 0 & 0 & 0\\ 0 & \cos\theta & 0 & -\cos\phi\sin\theta & -\sin\phi\sin\theta \\ 0 & 0 & \cos\theta & \sin\phi\sin\theta & -\cos\phi\sin\theta\\ 0 & \cos\phi\sin\theta & -\sin\phi\sin\theta & \cos\theta & 0\\ 0 & \sin\phi\sin\theta & \cos\phi\sin\theta & 0 & \cos\theta \end{bmatrix}\end{split}$
Parameters: theta (float) – Transmittivity angle $$\theta$$. The transmission amplitude of the beamsplitter is $$t = \cos(\theta)$$. The value $$\theta=\pi/4$$ gives the 50-50 beamsplitter. phi (float) – Phase angle $$\phi$$. The reflection amplitude of the beamsplitter is $$r = e^{i\phi}\sin(\theta)$$. The value $$\phi = \pi/2$$ gives the symmetric beamsplitter. wires (Sequence[int] or int) – the wire the operation acts on