Phase#

class discopy.quantum.optics.Phase(phi)[source]#

Bases: Box

Phase shifter.

Corresponds to Matrix \(\begin{pmatrix} e^{2\pi i \phi} \end{pmatrix}\).

Parameters:

phi (float) – Phase parameter ranging from 0 to 1.

Example

>>> Phase(0.8).array
array([[0.30901699-0.95105652j]])
>>> assert np.allclose((Phase(0.4) >> Phase(0.4).dagger()).array
...                    , Id(1).array)