`\n\n![](/tutorials/images/cloning.svg)\n\n :align: center\n :width: 70%\n :target: javascript:void(0);\n\n:html:`

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

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

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

`\n\n4. Finally, we apply another beamsplitter to mode $q_0$ and mode $q_3$ in the\n vacuum state, to get our two cloned outputs:\n\n .. math::\n\n BS(\\ket{\\tilde{\\alpha_0}}\\otimes\\ket{0}) = \\ket{\\frac{1}{\\sqrt{2}}\\tilde{\\alpha_0}}\\otimes\n \\ket{\\frac{1}{\\sqrt{2}}\\tilde{\\alpha_0}} = \\ket{\\alpha'}\\otimes \\ket{\\alpha'}.\n\n where $\\alpha' \\sim N(\\mu, \\text{cov}), ~~\\mu=(\\text{Re}(\\alpha_0), \\text{Im}(\\alpha_0)), ~~\\text{cov}=\\I/4$.\n\nCoherent average fidelity\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf we were to perform the Guassian cloning circuit over an ensemble of identical input\nstates $\\ket{\\alpha_0}$, the cloned output can be described by the following mixed state,\n\n\\begin{align}\\rho = \\iint d^2 \\alpha' \\frac{2}{\\pi}e^{-2|\\alpha'-\\alpha_0|^2}\\ket{\\alpha'}\\bra{\\alpha'},\\end{align}\n\nwhere the exponential term is the PDF of the random variable $\\alpha'$ from (4) above.\nTo calculate the average fidelity over the ensemble of the cloned states, it is sufficient\nto calculate the inner product\n\n\\begin{align}F = \\braketT{\\alpha_0}{\\rho}{\\alpha_0}.\\end{align}\n\nFrom the Fock basis decomposition of the coherent state (see `coherent_state`), it can\nbe easily seen that $|\\braketD{\\alpha_0}{\\alpha'}|^2 = e^{-|\\alpha_0-\\alpha'|^2}$.\nTherefore,\n\n\\begin{align}F = \\frac{2}{\\pi}\\iint d^2 \\alpha' e^{-2|\\alpha'-\\alpha_0|^2}\n |\\braketD{\\alpha_0}{\\alpha'}|^2 = \\frac{2}{\\pi}\\iint d^2 \\alpha ~e^{-3|\\alpha|^2} = \\frac{2}{3},\\end{align}\n\nwhere we have made the substitution $\\alpha=\\alpha'-\\alpha_0$. Note that the\naverage fidelity is independent of the initial state $\\alpha_0$.\n\n

The above is calculated in the case of unity quantum efficiency $\\eta=1$.\n When $\\eta<1$, there is non-zero uncertainty in the homodyne measurement,\n $\\sigma_H=\\frac{1-\\eta}{\\eta}$, and in practice the symmetric Gaussian cloning\n scheme has coherent state average cloning fidelity given by\n\n .. math:: F(\\sigma_H)=\\frac{2}{3+\\sigma_H}\n\n In the case of the Gaussian backend, $\\sigma_H=2\\times 10^{-4}$\n (see :meth:`GaussianBackend.measure_homodyne\n