` .. image:: /tutorials/images/cloning.svg :align: center :width: 70% :target: javascript:void(0); :html:`

` Here, :math:`\ket{\alpha_0}` represents an input coherent state, :math:`\ket{\alpha'}_1` and :math:`\ket{\alpha'}_3` represent the two identical but approximate clones, and the beamsplitters are 50-50 beamsplitters (hence the 'symmetric' in symmetric cloning algorithm). Let's walk through the various stages of the circuit above, and examine what is occuring. 1. The action of a 50-50 beamsplitter on a coherent state :math:`\ket{\alpha}` and a vacuum state :math:`\ket{0}` is :math:`BS(\ket{\alpha}\otimes\ket{0}) = \ket{\frac{1}{\sqrt{2}}\alpha}\otimes \ket{\frac{1}{\sqrt{2}}\alpha}`. As such, after the two beamsplitters, the circuit exists in the following state: .. math:: \ket{\frac{1}{\sqrt{2}}\alpha_0}\otimes \ket{\frac{1}{2}\alpha_0}\otimes \ket{\frac{1}{2}\alpha_0}. :html:`

` 2. Performing the homodyne detection on modes :math:`q_1` and :math:`q_2` results in the two normally distributed measurement variables :math:`u` and :math:`v` respectively: .. math:: u\sim N\left(\sqrt{\frac{\hbar}{2}}\text{Re}(\alpha_0), \frac{\hbar}{2}\right), ~~~ v\sim N\left(\sqrt{\frac{\hbar}{2}}\text{Im}(\alpha_0), \frac{\hbar}{2}\right). :html:`

` 3. Two controlled displacements :math:`X(\sqrt{2}u)=D(u/\sqrt{\hbar})` and :math:`Z(\sqrt{2}v)=D(iv/\sqrt{\hbar})` are then performed on mode :math:`q_0`: .. math:: D\left(\frac{1}{\sqrt{\hbar}}(u+iv)\right)\ket{\frac{1}{\sqrt{2}}\alpha_0} = \ket{\frac{1}{\sqrt{2}}\alpha_0 + \frac{1}{\sqrt{\hbar}}(u+iv)} = \ket{\tilde{\alpha_0}} Since we are displacing a coherent state, the result of the controlled displacements remains a pure coherent state. However, since the parameters of the controlled displacements are themselves random variables, we must describe the resulting coherent state by a rando variable :math:`\tilde{\alpha_0} \sim N(\mu, \text{cov})`. Here, :math:`\tilde{\alpha_0}` is randomly distributed as per a multivariate normal distribution with vector of means :math:`\mu=\sqrt{2}(\text{Re}(\alpha_0), \text{Im}(\alpha_0))` and covariance matrix :math:`\text{cov}=\I/2`. :html:`

` 4. Finally, we apply another beamsplitter to mode :math:`q_0` and mode :math:`q_3` in the vacuum state, to get our two cloned outputs: .. math:: BS(\ket{\tilde{\alpha_0}}\otimes\ket{0}) = \ket{\frac{1}{\sqrt{2}}\tilde{\alpha_0}}\otimes \ket{\frac{1}{\sqrt{2}}\tilde{\alpha_0}} = \ket{\alpha'}\otimes \ket{\alpha'}. where :math:`\alpha' \sim N(\mu, \text{cov}), ~~\mu=(\text{Re}(\alpha_0), \text{Im}(\alpha_0)), ~~\text{cov}=\I/4`. Coherent average fidelity ~~~~~~~~~~~~~~~~~~~~~~~~~ If we were to perform the Guassian cloning circuit over an ensemble of identical input states :math:`\ket{\alpha_0}`, the cloned output can be described by the following mixed state, .. math:: \rho = \iint d^2 \alpha' \frac{2}{\pi}e^{-2|\alpha'-\alpha_0|^2}\ket{\alpha'}\bra{\alpha'}, where the exponential term is the PDF of the random variable :math:`\alpha'` from (4) above. To calculate the average fidelity over the ensemble of the cloned states, it is sufficient to calculate the inner product .. math:: F = \braketT{\alpha_0}{\rho}{\alpha_0}. From the Fock basis decomposition of the coherent state (see :ref:`coherent_state`), it can be easily seen that :math:`|\braketD{\alpha_0}{\alpha'}|^2 = e^{-|\alpha_0-\alpha'|^2}`. Therefore, .. math:: F = \frac{2}{\pi}\iint d^2 \alpha' e^{-2|\alpha'-\alpha_0|^2} |\braketD{\alpha_0}{\alpha'}|^2 = \frac{2}{\pi}\iint d^2 \alpha ~e^{-3|\alpha|^2} = \frac{2}{3}, where we have made the substitution :math:`\alpha=\alpha'-\alpha_0`. Note that the average fidelity is independent of the initial state :math:`\alpha_0`. .. note:: The above is calculated in the case of unity quantum efficiency :math:`\eta=1`. When :math:`\eta<1`, there is non-zero uncertainty in the homodyne measurement, :math:`\sigma_H=\frac{1-\eta}{\eta}`, and in practice the symmetric Gaussian cloning scheme has coherent state average cloning fidelity given by .. math:: F(\sigma_H)=\frac{2}{3+\sigma_H} In the case of the Gaussian backend, :math:`\sigma_H=2\times 10^{-4}` (see :meth:`GaussianBackend.measure_homodyne