` .. image:: ../_static/teleport.svg :width: 60% :align: center :target: javascript:void(0); :html:`

` This process can be explained as follows: 1. Here, qumodes :math:`q_1` and :math:`q_2` are initially prepared as (the unphysical) infinitely squeezed vacuum states in momentum and position space respectively, .. math:: &\ket{0}_x \sim \lim_{z\rightarrow\infty} S(z)\ket{0}\\ &\ket{0}_p \sim \lim_{z\rightarrow-\infty} S(z)\ket{0}=\frac{1}{\sqrt{\pi}}\int_{-\infty}^\infty \ket{x}~dx before being maximally entangled by a 50-50 beamsplitter: .. math:: BS(\pi/4,0)(\ket{0}_p\otimes\ket{0}_x) 2. These two qumodes are now spatially separated, with :math:`\ket{q_1}` held by Alice, and :math:`\ket{q_2}` held by Bob, with the two connected via the classical communication channels :math:`c_0` and :math:`c_1`. 3. To teleport her unknown state :math:`\ket{\psi}` to Bob, Alice now performs a projective measurement of her entire system onto the maximally entangled basis states. This is done by entangling :math:`\ket{\psi}` and :math:`\ket{q_1}` via another 50-50 beamsplitter, before performing two homodyne measurements, in the :math:`x` and :math:`p` quadratures respectively. 4. The results of these measurements are then transmitted to Bob, who performs both a position displacement (conditional on the :math:`x` measurement) and a momentum displacement (conditional on the :math:`p` measurement) to recover exactly the transmitted state :math:`\ket{\psi}`. Blackbird code --------------- This can be easily implemented using the Blackbird quantum circuit language: .. literalinclude:: ../../examples/teleportation.py :language: python :linenos: :dedent: 4 :tab-width: 4 :start-after: with teleportation.context as q: :end-before: # end circuit Some important notes: * Infinite squeezed vacuum states are not physically realizable; preparing the states with a squeezing factor of :math:`|r|=2` (:math:`\sim 18\text{dB}`) is a reasonable approximation. * :meth:`~strawberryfields.ops.BSgate` accepts two arguments, ``theta`` and ``phi``. A variable storing the value of :math:`\pi` is used for setting these parameters - in Python, this can be imported from NumPy, .. code-block:: python from numpy import pi .. note:: A fully functional Strawberry Fields simulation containing the above Blackbird code is included at :download:`examples/teleportation.py <../../examples/teleportation.py>`.