BBS#

class discopy.quantum.optics.BBS(bias)[source]#

Bases: Box

Beam splitter with a bias.

Corresponds to Matrix \(\begin{pmatrix} \tt{sin}((0.25 + bias)\pi) & i \tt{cos}((0.25 + bias)\pi) \\ i \tt{cos}((0.25 + bias)\pi) & \tt{sin}((0.25 + bias)\pi) \end{pmatrix}\).

Parameters:

bias (float) – Bias from standard 50/50 beam splitter, parameter between 0 and 1.

Example

The standard beam splitter is:

>>> BS = BBS(0)

We can check the Hong-Ou-Mandel effect:

>>> assert np.isclose(np.absolute(BS.amp([1, 1], [0, 2])) **2, 0.5)
>>> assert np.isclose(np.absolute(BS.amp([1, 1], [2, 0])) **2, 0.5)
>>> assert np.isclose(np.absolute(BS.amp([1, 1], [1, 1])) **2, 0)

Check the dagger:

>>> y = BBS(0.4)
>>> assert np.allclose((y >> y.dagger()).eval(2), Id(2).eval(2))
>>> comp = (y @ y >> Id(1) @ y @ Id(1)) >> (y @ y >> Id(1) @ y @ Id(1)
...   ).dagger()
>>> assert np.allclose(comp.eval(2), Id(4).eval(2))