{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# This cell is added by sphinx-gallery\n# It can be customized to whatever you like\n%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Photonic quantum computers {#photonics}\n==========================\n\n::: {.meta}\n:property=\\\"og:description\\\": Learn how photonic quantum computers work\nthrough code :property=\\\"og:image\\\":\n\n:::\n\n::: {.related}\ntutorial\\_pasqal Quantum computation with neutral atoms\ntutorial\\_trapped\\_ions Trapped ion quantum computing\ntutorial\\_sc\\_qubits Quantum computing with superconducting qubits\ntutorial\\_gbs Quantum advantage with Gaussian Boson Sampling\n:::\n\n*Author: Alvaro Ballon. Posted: 31 May 2022. Last updated: 16 June\n2022.*\n\nTo create a functional quantum computer, we need to produce and control\na large number of qubits. This feat has proven difficult, although\nsignificant progress has been made using trapped ions, superconducting\ncircuits, and many other technologies. Scalability---the ability to put\nmany qubits together---is limited because individual qubits in a\nmulti-qubit system lose their quantum properties quickly. This\nphenomenon, known as decoherence, happens due to the interactions of the\nqubits with their surroundings. One way to get scalable structures is to\nuse photons (particles of light). The quantum states of photons are more\nrobust against decoherence, so we may be onto something!\n\nIndeed, many approaches to use photons for quantum computing have been\nproposed. We will focus on *linear optical quantum computing*, an\napproach that has already achieved quantum advantage. It is being\ndeveloped further by Xanadu, PsiQuantum, and other institutions around\nthe globe. Unlike other physical systems, photonics allows us access to\nan infinite number of states. How can we leverage these extra states to\nmake quantum computers? By the end of this demo, you will be able to\nexplain how photonic devices can be used to build universal quantum\ncomputers. You will learn how to prepare, measure, and manipulate the\nquantum states of light, and how we can encode qubits in photons.\nMoreover, you will identify the strengths and weaknesses of photonic\ndevices in terms of Di Vincenzo\\'s criteria, introduced in the blue box\nbelow.\n\n::: {.container .alert .alert-block .alert-info}\n**Di Vincenzo\\'s criteria**: In the year 2000, David DiVincenzo proposed\na wishlist for the experimental characteristics of a quantum computer.\nDiVincenzo\\'s criteria have since become the main guideline for\nphysicists and engineers building quantum computers:\n\n1\\. **Well-characterized and scalable qubits**. Many of the quantum\nsystems that we find in nature are not qubits, so we must find a way to\nmake them behave as such. Moreover, we need to put many of these systems\ntogether.\n\n2\\. **Qubit initialization**. We must be able to prepare the same state\nrepeatedly within an acceptable margin of error.\n\n3\\. **Long coherence times**. Qubits will lose their quantum properties\nafter interacting with their environment for a while. We would like them\nto last long enough so that we can perform quantum operations.\n\n4\\. **Universal set of gates**. We need to perform arbitrary operations\non the qubits. To do this, we require both single-qubit gates and\ntwo-qubit gates.\n\n5\\. **Measurement of individual qubits**. To read the result of a quantum\nalgorithm, we must accurately measure the final state of a pre-chosen\nset of qubits.\n:::\n\nOur journey will start by defining the simplest states of light, known\nas *Gaussian states*. We will also describe how we can perform simple\ngates and measurements on such states. The next step is to figure out\nreliable methods to generate the more general *non-Gaussian* states that\nare required for universal quantum computing. We\\'ll see that we end up\nneeding only a special type of non-Gaussian states, known as GKP states.\nFinally, we will bring all the concepts together to understand how\nquantum algorithms can be performed using these tools. Let\\'s get\nstarted!\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Gaussian states of light\n========================\n\nWhy are the quantum states of light so durable? Photons seldom interact\nwith each other, which means we can easily avoid uncontrolled\ninteractions that destroy their quantum state. However, to build a\nuniversal quantum computer, we need multi-qubit gates, which means that\nphotons must be made to communicate with each other somehow! We *can*\nmake photons affect each other by using a material as a mediator. To\nstart with, we will focus on manipulating photons using *linear\nmaterials*, whose properties are unchanged when they interact with\nlight. With linear materials, we can produce a subset of the so-called\n**Gaussian states**. They can be fabricated with a 100% success rate\nusing common optical devices, so they are our safest tool in photonics.\n\nTo precisely define a Gaussian state, we need a mathematical\nrepresentation for states of light. As is the case with qubits, states\nof light are represented by a linear combination of basis vectors. But\nunlike qubits, two basis vectors aren\\'t enough. The reason is that\nlight is characterized by its so-called *position and momentum\nquadratures* $x$ and $p,$ captured by the operators $\\hat{X}$ and\n$\\hat{P}$ respectively. Upon measurement, these quadratures can take any\nreal value, which means that $\\hat{X}$ and $\\hat{P}$ have infinitely\nmany eigenvectors. Therefore, to describe a quantum of light\n$\\left\\lvert \\psi \\right\\rangle,$ we need infinitely many basis vectors!\n\n::: {.note}\n::: {.admonition-title}\nNote\n:::\n\nThe position and momentum quadratures $x$ and $p$ do not represent the\nposition and momentum of one photon. They describe the state of possibly\nmany photons, and they are related to the amplitude and phase of light.\nThe names come from the fact that the quadrature observables $\\hat{X}$\nand $\\hat{P}$ satisfy\n\n$$\\left[ \\hat{X},\\hat{P}\\right]=i\\hbar,$$\n\nwhich is the same relation satisfied by conventional position and\nmomentum in quantum mechanics. This means that no simultaneous\nmeasurement of $\\hat{X}$ and $\\hat{P}$ can be performed. Moreover, the\nstandard deviations of the measurements of $x$ and $p$ satisfy the\nuncertainty relation\n\n$$\\Delta x \\Delta p \\geq 1,$$\n\nwhere we work in units where $\\hbar = 2.$ Sometimes the word\n\\\"quadratures\\\" is omitted for simplicity.\n:::\n\nFor example, we write\n\n$$\\left\\lvert \\psi \\right\\rangle = \\int_\\mathbb{R}\\psi(x)\\vert x \\rangle dx,$$\n\nwhere $\\vert x \\rangle$ is the eigenstate of $\\hat{X}$ with eigenvalue\n$x,$ and $\\psi$ is a complex-valued function known as the *wave\nfunction*. A similar expansion can be done in terms of the eigenstates\n$\\vert p \\rangle$ of $\\hat{P}.$ Note that an integral is used here\nrather than an infinite sum because the eigenvalues of $\\hat{X}$ and\n$\\hat{P}$ are continuous. So how do we define a Gaussian state using\nthis representation? It is a state that is completely determined by the\naverage values $\\bar{x}$ and $\\bar{p}$ of the position and momentum\nquadratures, as well as their standard deviations $\\Delta x$ and\n$\\Delta p.$ The most trivial Gaussian state is the *vacuum*---the state\nwith no photons. Let us see what happens if we sample measurements of\nthe quadratures $\\hat{X}$ and $\\hat{P}$ when light is in the vacuum. We\ncan use PennyLane\\'s `default.gaussian` device, which lets us create,\nmanipulate, and measure Gaussian states of light. Let\\'s first call the\nusual imports,\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import pennylane as qml\nfrom pennylane import numpy as np\nimport matplotlib.pyplot as plt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and define the device.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"dev = qml.device(\"default.gaussian\", wires=1, shots=1000)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"::: {.important}\n::: {.admonition-title}\nImportant\n:::\n\nWhat do the wires represent in a photonic device? They are independent\ninformation carriers known as **qumodes**. In photonic quantum\ncomputers, these are waves of light contained inside an optical cavity.\nQumodes are not two-level systems in general, so we must use an infinite\nsuperposition of basis states to represent their quantum state.\n:::\n\nWe would like to know how the measured values of position and momentum\nare distributed in the $x$-$p$ space, usually called [phase\nspace](https://en.wikipedia.org/wiki/Optical_phase_space). The initial\nstate in `default.gaussian` is the vacuum, so the circuits to measure\nthe quadratures need not contain any operations, except for\nmeasurements! We plot 1000 measurement results for both $x$ and $p.$\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"@qml.qnode(dev)\ndef vacuum_measure_x():\n return qml.sample(qml.X(0)) # Samples X quadratures\n\n\n@qml.qnode(dev)\ndef vacuum_measure_p():\n return qml.sample(qml.P(0)) # Samples P quadrature\n\n\n# Sample measurements in phase space\nx_sample = vacuum_measure_x().numpy()\np_sample = vacuum_measure_p().numpy()\n\n# Import some libraries for a nicer plot\nfrom scipy.stats import gaussian_kde\nfrom numpy import vstack as vstack\n\n# Point density calculation\nxp = vstack([x_sample, p_sample])\nz = gaussian_kde(xp)(xp)\n\n# Sort the points by density\nsorted = z.argsort()\nx, y, z = x_sample[sorted], p_sample[sorted], z[sorted]\n\n# Plot\nfig, ax = plt.subplots()\nax.scatter(x, y, c = z, s = 50, cmap=\"RdYlGn\")\nplt.title(\"Vacuum\", fontsize=12)\nax.set_ylabel(\"Momentum\", fontsize = 11)\nax.set_xlabel(\"Position\", fontsize = 11)\nax.set_aspect(\"equal\", adjustable = \"box\")\nplt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We observe that the values of the quadratures are distributed around the\norigin with a spread of approximately 1. We can check these eyeballed\nvalues explicitly, using a device without shots this time.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"dev_exact = qml.device(\"default.gaussian\", wires=1) # No explicit shots gives analytic calculations\n\n\n@qml.qnode(dev_exact)\ndef vacuum_mean_x():\n return qml.expval(qml.X(0)) # Returns exact expecation value of x\n\n\n@qml.qnode(dev_exact)\ndef vacuum_mean_p():\n return qml.expval(qml.P(0)) # Returns exact expectation value of p\n\n\n@qml.qnode(dev_exact)\ndef vacuum_var_x():\n return qml.var(qml.X(0)) # Returns exact variance of x\n\n\n@qml.qnode(dev_exact)\ndef vacuum_var_p():\n return qml.var(qml.P(0)) # Returns exact variance of p\n\n\n# Print calculated statistical quantities\nprint(\"Expectation value of x-quadrature: {}\".format(vacuum_mean_x()))\nprint(\"Expectation value of p-quadrature: {}\".format(vacuum_mean_p()))\nprint(\"Variance of x-quadrature: {}\".format(vacuum_var_x()))\nprint(\"Variance of p-quadrature: {}\".format(vacuum_var_p()))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"But where does the name Gaussian come from? If we plot the density of\nquadrature measurements for the vacuum state in three dimensions, we\nobtain the following plot.\n\n![..](../demonstrations/photonics/vacuum_wigner.png){.align-center\nwidth=\"70.0%\"}\n\nDensity of measurement results in phase space for the vacuum state\n\nThe density has the shape of a 2-dimensional Gaussian surface, hence the\nname. *For Gaussian states only*, the density is exactly equal to the\nso-called [Wigner\nfunction](https://en.wikipedia.org/wiki/Wigner_quasiprobability_distribution)\n$W(x,p),$ defined using the wave function $\\psi(x)$:\n\n$$W(x,p) = \\frac{1}{\\pi\\hbar}\\int_{-\\infty}^{\\infty}\\psi^{*}(x+y)\\psi(x-y)e^{2ipy/\\hbar}dy.$$\n\nSince the Wigner function satisfies\n\n$$\\int_{\\mathbb{R}^2}W(x,p)dxdp = 1$$\n\nand is positive for Gaussian states, it is *almost as if* the values of\nthe momentum and position had an underlying classical probability\ndistribution, save for the fact that the quadratures can\\'t be measured\nsimultaneously. For this reason, Gaussian states are considered to be\n\\\"classical\\\" states of light. Now we\\'re ready for the technical\ndefinition of a Gaussian state.\n\n::: {.admonition .defn}\nDefinition\n\nA photonic system is said to be in a **Gaussian** state if its Wigner\nfunction is a two-dimensional Gaussian function.\n:::\n\nWhat other Gaussian states are there? The states produced by lasers are\ncalled *coherent states*, which are also Gaussian with\n$\\Delta x = \\Delta p = 1.$ Coherent states, in general, can have\nnon-zero expectation values for the quadratures (i.e., they are not\ncentered around the origin).\n\nThe `default.gaussian` device allows for the easy preparation of\ncoherent states through the function\n`~pennylane.CoherentState`{.interpreted-text role=\"class\"}, which takes\ntwo parameters $\\alpha$ and $\\phi.$ Here,\n$\\alpha=\\sqrt{\\vert\\bar{x}\\vert^2+\\vert\\bar{p}\\vert^2}$ is the magnitude\nand $\\phi$ is the polar angle of the point $(\\bar{x}, \\bar{p}).$ Let us\nplot sample quadrature measurements for a coherent state.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"@qml.qnode(dev)\ndef measure_coherent_x(alpha, phi):\n qml.CoherentState(alpha, phi, wires=0) # Prepares coherent state\n return qml.sample(qml.X(0)) # Measures X quadrature\n\n\n@qml.qnode(dev)\ndef measure_coherent_p(alpha, phi):\n qml.CoherentState(alpha, phi, wires=0) # Prepares coherent state\n return qml.sample(qml.P(0)) # Measures P quadrature\n\n\n# Choose alpha and phi and sample 1000 measurements\nx_sample_coherent = measure_coherent_x(3, np.pi / 3).numpy()\np_sample_coherent = measure_coherent_p(3, np.pi / 3).numpy()\n\n# Plot as before\nxp = vstack([x_sample_coherent, p_sample_coherent])\nz1 = gaussian_kde(xp)(xp)\n\nsorted = z1.argsort()\nx, y, z = x_sample_coherent[sorted], p_sample_coherent[sorted], z1[sorted]\n\nfig, ax1 = plt.subplots()\nax1.scatter(x, y, c = z, s = 50, cmap = \"RdYlGn\")\nax1.set_title(\"Coherent State\", fontsize = 12)\nax1.set_ylabel(\"Momentum\", fontsize = 11)\nax1.set_xlabel(\"Position\", fontsize = 11)\nax1.set_aspect(\"equal\", adjustable = \"box\")\nplt.xlim([-0.5, 8])\nplt.ylim([0, 9])\nplt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Indeed, we see that the distribution of quadrature measurements is\nsimilar to that of the vacuum, except that it is not centered at the\norigin. Instead it is centred at the alpha and phi coordinates we chose\nin the code above.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Gaussian operations\n===================\n\nWe have only learned about two types of Gaussian states so far. The\nvacuum can be obtained by carefully isolating a system from any\nenvironmental influences, and a coherent state can be produced by a\nlaser, so we already have these at hand. But how can we obtain any\nGaussian state of our liking? This is achieved through *Gaussian\noperations*, which transform a Gaussian state to another Gaussian state.\nThese operations are relatively easy to implement in a lab using some of\nthe optical elements introduced in the table below.\n\n::: {.rst-class}\ndocstable\n\n+--------+---------------------------+---------------------------------+\n| ::: {. | ::: {.centered} | ::: {.centered} |\n| center | ::: | ::: |\n| ed} | | |\n| ::: | Diagram | Description |\n| | | |\n| Elemen | | |\n| t | | |\n+========+===========================+=================================+\n| Wavegu | ![](../demonstrations/pho | A long strip of material that |\n| ide | tonics/Waveguide.png){.al | contains and guides |\n| | ign-center | electromagentic waves. For |\n| | width=\"70.0%\"} | example, an optical fibre is a |\n| | | type of waveguide. |\n+--------+---------------------------+---------------------------------+\n| Phase- | ![](../demonstrations/pho | A piece of material that |\n| shifte | tonics/Thermo-optic.png){ | changes the phase of light. The |\n| r | .align-center | figure shows a particular |\n| | width=\"70.0%\"} | implementation known as a |\n| | | thermo-optic phase shifter, |\n| | | which is a (sometimes curved) |\n| | | waveguide that changes |\n| | | properties when heated up using |\n| | | a resistor. This allows us to |\n| | | control the applied phase |\n| | | difference. |\n+--------+---------------------------+---------------------------------+\n| Beamsp | ![](../demonstrations/pho | An element with two input and |\n| litter | tonics/Beam_splitter.png) | two output qumodes. It |\n| | {.align-center | transmits a fraction $T$ of the |\n| | width=\"100.0%\"} | photons coming in through |\n| | | either entry port, and reflects |\n| | | a fraction $R=1-T.$ The input |\n| | | qumodes can be combined to |\n| | | create entangled states across |\n| | | the output ports. In a photonic |\n| | | quantum computing chip, a |\n| | | [directional |\n| | | coupler](https://en.wikipedia.o |\n| | | rg/wiki/Power_dividers_and_dire |\n| | | ctional_couplers) |\n| | | is used. |\n+--------+---------------------------+---------------------------------+\n:::\n\nThe vacuum is centered at the origin in phase space. It is advantageous\nto generate states that are centered at any point in phase space. How\nwould we, for example, change the mean $\\bar{x}$ of the $x$-quadrature\nwithout changing anything else about the state? This can be done via the\n*displacement operator*, implemented in PennyLane via\n`~pennylane.Displacement`{.interpreted-text role=\"class\"}. Let\\'s see\nthe effect of this operation on an intial coherent state.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"@qml.qnode(dev)\ndef displace_coherent_x(alpha, phi, x):\n qml.CoherentState(alpha, phi, wires = 0) # Create coherent state\n qml.Displacement(x, 0, wires = 0) # Second argument is the displacement direction in phase space\n return qml.sample(qml.X(0))\n\n\n@qml.qnode(dev)\ndef displace_coherent_p(alpha, phi, x):\n qml.CoherentState(alpha, phi, wires = 0)\n qml.Displacement(x, 0, wires = 0)\n return qml.sample(qml.P(0))\n\n\n# We plot both the initial and displaced state\ninitial_x = displace_coherent_x(3, np.pi / 3, 0) # initial state amounts to 0 displacement\ninitial_p = displace_coherent_p(3, np.pi / 3, 0)\ndisplaced_x = displace_coherent_x(3, np.pi / 3, 3) # displace x=3 in x-direction\ndisplaced_p = displace_coherent_p(3, np.pi / 3, 3)\n# Plot as before\nfig, ax1 = plt.subplots(figsize=(10, 5))\nxp1 = vstack([initial_x, initial_p])\nz1 = gaussian_kde(xp1)(xp1)\nsorted1 = z1.argsort()\nx1, y1, z1 = initial_x[sorted1], initial_p[sorted1], z1[sorted1]\nxp2 = vstack([displaced_x, displaced_p])\nz2 = gaussian_kde(xp2)(xp2)\nsorted2 = z2.argsort()\nx2, y2, z2 = displaced_x[sorted2], displaced_p[sorted2], z2[sorted2]\nax1.scatter(x1, y1, c = z1, s = 50, cmap =\"RdYlGn\")\nax1.scatter(x2, y2, c = z2, s = 50, cmap = \"RdYlGn\")\nplt.xlim([0, 12])\nplt.ylim([0, 9])\nax1.set_aspect(\"equal\", adjustable=\"box\")\nplt.text(1, 0.8, \"Before displacement\")\nplt.text(7.5, 0.8, \"After displacement\")\nax1.set_ylabel(\"Momentum\", fontsize=11)\nax1.set_xlabel(\"Position\", fontsize=11)\nax1.set_title(\"Displacing coherent states\", fontsize=12)\nax1.set_aspect(\"equal\", adjustable = \"box\")\nplt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that setting $x=3$ gave a displacement of 6 units in the horizontal\ndirection in phase space. This is because the scale of phase space is\nset by our choice of units $\\hbar=2.$\n\nSo how do we make a displacement operation in the lab? One method is\nshown below, which uses a beamsplitter and a source of **high-intensity\ncoherent light**.\n\n![..](../demonstrations/photonics/Displacement.png){.align-center\nwidth=\"70.0%\"}\n\nThis setup displaces the input state $\\lvert\\psi\\rangle$ by a quantity\nproportional to $z.$\n\nWe can check that this setup implements a displacement operator using\nPennyLane. This time, we need two qumodes, since we rely on combining\nthe input state that we want to displace with a coherent state in a\nbeamsplitter. Let us code this circuit in the case that the input is a\ncoherent state as a particular case (the operation will work for any\nstate). Let us be mindful that this will only work when the amplitude of\nthe input state is much smaller than that of the auxiliary coherent\nstate.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"dev2 = qml.device(\"default.gaussian\", wires=2, shots=1000)\n\n\n@qml.qnode(dev2)\ndef disp_optics(z, x):\n qml.CoherentState(z, 0, wires = 0) # High-amplitude auxiliary coherent state\n qml.CoherentState(3, np.pi / 3, wires = 1) # Input state (e.g. low amplitude coherent state)\n qml.Beamsplitter(np.arccos(1 - x ** 2 / z ** 2), 0, wires=[0, 1]) # Beamsplitter\n return qml.sample(qml.X(1)) # Measure x quadrature\n\n\n@qml.qnode(dev2)\ndef mom_optics(z, x):\n qml.CoherentState(z, 0, wires = 0)\n qml.CoherentState(3, np.pi / 3, wires = 1)\n qml.Beamsplitter(np.arccos(1 - x ** 2 / z ** 2), 0, wires = [0, 1])\n return qml.sample(qml.P(1)) # Measure p quadrature\n\n\n# Plot quadrature measurement before and after implementation of displacement\ninitial_x = disp_optics(100, 0) # Initial corresponds to beamsplitter with t=0 (x=0)\ninitial_p = mom_optics(100, 0) # Amplitude of coherent state must be large\ndisplaced_x = disp_optics(100, 3)\ndisplaced_p = mom_optics(100, 3) # Set some non-trivial t\n# Plot as before\nfig, ax1 = plt.subplots()\nxp1 = vstack([initial_x, initial_p])\nz1 = gaussian_kde(xp1)(xp1)\nsorted1 = z1.argsort()\nx1, y1, z1 = initial_x[sorted1], initial_p[sorted1], z1[sorted1]\nxp2 = vstack([displaced_x, displaced_p])\nz2 = gaussian_kde(xp2)(xp2)\nsorted2 = z2.argsort()\nx2, y2, z2 = displaced_x[sorted2], displaced_p[sorted2], z2[sorted2]\nax1.scatter(x1, y1, c = z1, s = 50, cmap = \"RdYlGn\")\nax1.scatter(x2, y2, c = z2, s = 50, cmap = \"RdYlGn\")\nax1.set_title(\"Initial\", fontsize = 12)\nplt.xlim([-0.5, 15])\nplt.ylim([0, 9])\nax1.set_ylabel(\"Momentum\", fontsize = 11)\nax1.set_xlabel(\"Position\", fontsize = 11)\nplt.text(1, 0.5, \"Before displacement\")\nplt.text(9.5, 0.5, \"After displacement\")\nax1.set_aspect(\"equal\", adjustable=\"box\")\nax1.set_title(\"Implementation of displacement operator\", fontsize = 12)\nplt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We see that we get a displaced state. The amount of displacement can be\nadjusted by changing the parameters of the beamsplitter. Similarly, we\ncan implement rotations in phase space using\n`~pennylane.Rotation`{.interpreted-text role=\"class\"}, which simply\namounts to changing the phase of light using a phase shifter. In phase\nspace, this amounts to rotating the point $(\\bar{x},\\bar{p})$ around the\norigin.\n\nSo far, we have focused on changing the mean values of $x$ and $p.$ But\nwhat if we also want to change the spread of the quadratures while\nkeeping $\\Delta x\\Delta p =1$?. This would \\\"squeeze\\\" the Wigner\nfunction in one direction. Aptly, the resulting state is known as a\n*squeezed state*, which is more difficult to obtain. It requires shining\nlight through non-linear materials, where the state of light will\nundergo unitary evolution in a way that changes $\\Delta x$ and\n$\\Delta p.$\n\n![..](../demonstrations/photonics/Squeezer.png){.align-center\nwidth=\"70.0%\"}\n\nA non-linear material can work as a squeezer.\n\nWe won\\'t go into detail here, but we note that the technology to\nproduce these states is quite mature. In PennyLane, we can generate\nsqueezed states through the squeezing operator\n`~pennylane.Squeezing`{.interpreted-text role=\"class\"}. This function\ndepends on the squeezing parameter $r$ which tells us how much the\nvariance in $x$ and $p$ changes, and $\\phi,$ which rotates the state in\nphase space. Let\\'s take a look at how squeezing changes the\ndistribution of quadrature measurements.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"@qml.qnode(dev)\ndef measure_squeezed_x(r):\n qml.Squeezing(r, 0, wires = 0)\n return qml.sample(qml.X(0))\n\n\n@qml.qnode(dev)\ndef measure_squeezed_p(r):\n qml.Squeezing(r, 0, wires = 0)\n return qml.sample(qml.P(0))\n\n\n# Choose alpha and phi and sample 1000 measurements\nx_sample_squeezed = measure_squeezed_x(0.4).numpy()\np_sample_squeezed = measure_squeezed_p(0.4).numpy()\n\n# Plot as before\nxp = vstack([x_sample_squeezed, p_sample_squeezed])\nz = gaussian_kde(xp)(xp)\n\nsorted_meas = z.argsort()\nx, y, z = x_sample_squeezed[sorted_meas], p_sample_squeezed[sorted_meas], z[sorted_meas]\n\nfig, ax1 = plt.subplots(figsize=(7, 7))\nax1.scatter(x, y, c = z, s = 50, cmap = \"RdYlGn\")\nax1.set_title(\"Squeezed State\", fontsize = 12)\nax1.set_ylabel(\"Momentum\", fontsize = 11)\nax1.set_xlabel(\"Position\", fontsize = 11)\nax1.set_xlim([-4, 4])\nax1.set_aspect(\"equal\", adjustable = \"box\")\nplt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This confirms that squeezing changes the variances of the quadratures.\n\n::: {.note}\n::: {.admonition-title}\nNote\n:::\n\nThe squeezed states produced above satisfy $\\Delta x \\Delta p = 1,$ but\nmore general Gaussian states need not satisfy these. For the purposes of\nphotonic quantum computing, we won\\'t need these generalized states.\n:::\n\nMeasuring quadratures\n=====================\n\nNow that we know how to manipulate Gaussian states, we would like to\nperform measurements on them. So far, we have taken for granted that we\ncan measure the quadratures $\\hat{X}$ and $\\hat{P}.$ But how do we\nactually measure them using optical elements? We will need a measuring\ndevice known as a photodetector. These contain a piece of a\nphotoelectric material, where each outer electron can be stimulated by a\nphoton. The more photons that are incident on the photodetector, the\nmore electrons that are freed in the material, which in turn form an\nelectric current. Mathematically,\n\n$$I = qN,$$\n\nwhere $I$ is the electric current, $N$ is the number of photons, and $q$\nis a detector-dependent proportionality constant. Hence, measuring the\ncurrent amounts to measuring the number of photons indirectly!\n\nThe number of photons in a quantum of light is not fixed. It is measured\nby the quantum photon-number observable $\\hat{N},$ which has eigenstates\ndenoted $\\vert 0 \\rangle, \\vert 1\\rangle, \\vert 2 \\rangle,\\dots$ These\nstates, known as *Fock states*, do have a well-defined number of\nphotons: repeated measurements of $\\hat{N}$ on the same state will yield\nthe same output. The natural number $n$ in the Fock state\n$\\vert n \\rangle$ denotes the only possible result we would get upon\nmeasuring the photon number. But nothing prevents light from being in a\nsuperposition of Fock states. For example, when we measure $\\hat{N}$ for\nthe state\n\n$$\\vert \\psi \\rangle = \\frac{1}{\\sqrt{3}}\\left(\\vert 0 \\rangle + \\vert 1 \\rangle + \\vert 2 \\rangle\\right),$$\n\nwe get 0, 1, or 2 photons, each with probability $\\frac{1}{3}.$\n\nExcept for the vacuum $\\vert 0 \\rangle,$ *Fock states are not Gaussian*.\nBut all states of light are superpositions of Fock States, including\nGaussian states! For example, let\\'s measure the expected photon number\nfor some squeezed state:\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"dev3 = qml.device(\"default.gaussian\", wires=1)\n\n\n@qml.qnode(dev3)\ndef measure_n_coherent(alpha, phi):\n qml.Squeezing(alpha, phi, wires = 0)\n return qml.expval(qml.NumberOperator(0))\n\n\ncoherent_expval = measure_n_coherent(1, np.pi / 3)\nprint(\"Expected number of photons: {}\".format(coherent_expval))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Since the expectation value is not an integer number, the measurement\nresults cannot have been all the same integer. This squeezed state\ncannot be a Fock state!\n\nBut what about the promised quadrature measurements? We can perform them\nthrough a combination of photodetectors and a beamsplitter, as shown in\nthe diagram below.\n\n![..](../demonstrations/photonics/Homodyne.png){.align-center\nwidth=\"70.0%\"}\n\nMeasuring quadratures using photodetectors\n\nLet\\'s code this setup using PennyLane and check that it amounts to the\nmeasurement of quadratures.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"dev_exact2 = qml.device(\"default.gaussian\", wires = 2)\n\n\n@qml.qnode(dev_exact2)\ndef measurement(a, phi):\n qml.Displacement(a, phi, wires = 0) # Implement displacement using PennyLane\n return qml.expval(qml.X(0))\n\n\n@qml.qnode(dev_exact2)\ndef measurement2(a, theta, alpha, phi):\n qml.Displacement(a, theta, wires = 0) # We choose the initial to be a displaced vacuum\n qml.CoherentState(alpha, phi, wires = 1) # Prepare coherent as second qumode\n qml.Beamsplitter(np.pi / 4, 0, wires=[0, 1]) # Interfere both states\n return qml.expval(qml.NumberOperator(0)), qml.expval(qml.NumberOperator(1)) # Read out N\n\n\nprint(\n \"Expectation value of x-quadrature after displacement: {}\\n\".format(measurement(3, 0).numpy())\n)\nprint(\"Expected current in each detector:\")\nprint(\"Detector 1: {}\".format(measurement2(3, 0, 1, 0)[0].numpy()))\nprint(\"Detector 2: {}\".format(measurement2(3, 0, 1, 0)[1].numpy()))\nprint(\n \"Difference between currents: {}\".format(\n measurement2(3, 0, 1, 0)[1].numpy() - measurement2(3, 0, 1, 0)[0].numpy()\n )\n)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we used $q=1$ as the detector constant, but we should note that\nthis quantity can\\'t really be measured precisely. However, we only care\nabout distinguishing different states of light, so knowing the constant\nisn\\'t really needed!\n\nTrying the above with many input states should convince you that this\nsetup, known as *homodyne measurement*, allows us to measure the\nquadratures $\\hat{X}$ and $\\hat{P}.$ Feel free to play around changing\nthe values of $\\phi$ and $a$!\n\nBeyond Gaussian states\n======================\n\nWe\\'ve learned a lot about Gaussian states now, but they don\\'t seem to\nhave many quantum properties. They are described by their positive\nWigner function, which is to an extent analogous to a probability\ndistribution. Are they really different from classical states? Not that\nmuch! To build a universal photonic quantum computer we need both\nGaussian *and* non-Gaussian states. Moreover, we need to be able to\nentangle any two states.\n\nEntanglement is not a problem, since combinations of Gaussian operations\ninvolving squeezers and beamsplitters can easily create entangled\nstates! Let us set on the more challenging mission to find a way to\nprepare non-Gaussian states. All of the operations that we have learned\nso far---displacements, rotations, squeezing---are Gaussian. Do we need\nsome kind of strange material that will implement a non-Gaussian\noperation? That\\'s certainly a possibility, and there are materials\nwhich can provide non-Gaussian interactions---like the [Kerr\neffect](https://en.wikipedia.org/wiki/Kerr_effect). But relying on these\nnon-linear materials is far from optimal, since the Kerr effect is weak\nand we don\\'t have much freedom to manipulate the setup into getting an\narbitrary non-Gaussian state.\n\nBut there\\'s one non-Gausian operation that\\'s been right in front of\nour eyes all this time. The measurement of the number of photons takes a\nGaussian state and collapses it into a Fock state (although this\ndestroys the photons); therefore, photon-number detection is not a\nGaussian operation. Measuring the exact number of photons is not that\neasy. We need fancy devices known a photon-number resolving detectors\n(commonly abbreviated as PNRs), which are superconductor-based, so they\nwork only at low temperatures. Combined with squeezed states and\nbeamsplitters, we have all the ingredients to produce non-Gaussian\nstates.\n\nLet\\'s explore how this works. The main idea is to tweak a particular\nphotonic circuit known as a *Gaussian Boson Sampler*[^1], which is shown\nbelow.\n\n![..](../demonstrations/photonics/GBS.png){.align-center width=\"70.0%\"}\n\nA Gaussian Boson Sampling circuit. The beamsplitters here may include\nphase shifts.\n\nGaussian boson sampling (GBS) is interesting on its own (see\n`this tutorial `{.interpreted-text role=\"doc\"} for\nan in-depth discussion). So far, two quantum devices have used\nlarge-scale versions of this circuit to achieve quantum advantage on a\nparticular computation, which involves sampling from a probability\ndistribution that classical computers take too long to simulate. In\n2019, USTC\\'s Jiuzhang device took 200 seconds to perform this sampling,\nwhich would take 2.5 billion years for some of our most powerful\nsupercomputers[^2]. In 2022, Xanadu\\'s Borealis performed the same\ncalculation in 36 microseconds, with the added benefit of being\nprogrammable and available on the Cloud[^3].\n\nBut the most interesting application of GBS comes from removing the PNR\nin the last wire, as shown below.\n\n![..](../demonstrations/photonics/GKP_Circuit.png){.align-center\nwidth=\"70.0%\"}\n\nCircuit to produce non-Gaussian states probabilistically\n\nCircuits like the above can, after photon detection of the other\nqumodes, produce non-Gaussian states. The reason is that the final state\nof the circuit is entangled, and we apply a non-Gaussian operation to\nsome of the qumodes. This measurement affects the remaining qumode,\nwhose state becomes non-Gaussian in general. This is the magic of\nquantum mechanics: due to entanglement, a measurement on a physical\nsystem can affect the state of another! Moreover, one can show that\ngeneralizations of the GBS circuit above can be built to produce any\nnon-Gaussian state that we want[^4].\n\nFor example, the choice of parameters\n\n$$t_1 = 0.8624, \\quad t_2=0.7688, \\quad t_3 = 0.7848,$$\n\n$$S_1 = -1.38, \\quad S_2 = -1.22, \\quad S_3 = 0.780 \\quad S_4 = 0.196,$$\n\nfor this generalized GBS circuit produces, with some probability, the\nfollowing state (expressed as a combination of Fock states)\n\n$$\\vert \\psi \\rangle = S(0.196)\\left(0.661 \\vert 0\\rangle -0.343 \\vert 2\\rangle + 0.253\\vert 4\\rangle -0.368\\vert 6\\rangle\n+0.377 \\vert 8\\rangle + 0.323 \\vert 10\\rangle + 0.325\\vert 12\\rangle\\right),$$\n\nwhere $S$ is the squeezing operator[^5]. This state\\'s Wigner function\nis shown below.\n\n![..](../demonstrations/photonics/gkp_wigner.png){.align-center\nwidth=\"70.0%\"}\n\nWigner function of non-Gaussian state\n\nThis Wigner function does not have the shape of a Gaussian and moreover,\nit can be negative---a tell-tale feature of non-Gaussian states (we can\nonly interpret the Wigner function as some sort of probability\ndistribution for the case of Gaussian states!). The only issue is that\nthe non-Gaussian state is produced only with some probability, that is,\n*when the detectors measure some particular number of photons*. But, at\nthe very least, we can be sure that we have obtained the non-Gaussian\nstate we wanted, and otherwise we just discard the qumode. For more\nprecise calculations, you can check out [this\ntutorial](https://the-walrus.readthedocs.io/en/latest/gallery/gkp.html)\nfrom PennyLane\\'s sister library The Walrus, which is optimized for\nsimulating this type of circuit.\n\nEncoding qubits into qumodes\n============================\n\nIt\\'s great that we can manipulate quantum states of light so freely,\nbut we haven\\'t discussed how to use them for quantum computing. We\nwould like a way to encode qubits into qumodes, so that we can run any\nqubit-based quantum algorithm using qumodes. Surely there\\'s more than\none way to encode a two-dimensional subspace into an\ninfinite-dimensional one. The only problem is that most of these\nencodings are extremely sensitive to the noise affecting the larger\nspace. A way that has proven to be quite robust to errors is to encode\nqubits in states of light is using a special type of non-Gaussian states\ncalled *GKP states*[^6].\n\nGKP states are linear combinations of the following two basis states:\n\n$$\\vert 0 \\rangle_{GKP} = \\sum_{n} \\vert 2n\\pi\\rangle_x,$$\n\n$$\\vert 1 \\rangle_{GKP} = \\sum_{n} \\vert (2n+1)\\pi\\rangle_x,$$\n\nwhere the subscript $x$ means that the kets in the sum are eigenstates\nof the quadrature observable $\\hat{X}.$ Therefore, an arbitrary qubit\n$\\vert \\psi \\rangle = \\alpha\\vert 0 \\rangle + \\beta\\vert 1 \\rangle$ can\nbe expressed through the qumode as\n\n$$\\vert \\psi \\rangle_{GKP} = \\alpha\\vert 0 \\rangle_{GKP} + \\beta\\vert 1 \\rangle_{GKP}.$$\n\nThe only problem is that producing these GKP states is physically\nimpossible, doing so would require infinite energy. Instead, we can\nproduce approximate versions of them and still run a quantum computation\nwith great precision. In fact, the GBS circuit we built to produce\nnon-Gaussian states can also produce approximate GKP states. This will\nonly happen when we measure 5 and 7 photons in each of the\ndetectors[^7]. The probability of this happening is rather small but\nfinite.\n\nWe can remain within the subspace spanned by the GKP basis states by\nrestricting the operations we apply on our qumodes. For example, we see\nthat applying a displacement by $\\sqrt{\\pi}$ to $\\vert 0 \\rangle_{GKP}$\ngives the $\\vert 1 \\rangle_{GKP}$ state, and vice versa. Therefore, the\ndisplacement operator corresponds to the qubit bit-flip gate\n`~pennylane.PauliX`{.interpreted-text role=\"class\"}. Similarly, a\nrotation operator by $\\pi/2$ implements the\n`~pennylane.Hadamard`{.interpreted-text role=\"class\"} gate. The table\nbelow gives more detail on how to implement all the gates we need for\nuniversal quantum computation using optical gates on exact GKP\nstates[^8] (on approximate GKP states, the effects of these gates will\nbe approximate on the qubit level).\n\n::: {.rst-class}\ndocstable\n\n+---------+----------------------------+-------------------------------+\n| ::: {.c | ::: {.centered} | ::: {.centered} |\n| entered | ::: | ::: |\n| } | | |\n| ::: | Optical Diagram | Qubit gate on GKP states |\n| | | |\n| Qumode | | |\n| Gate | | |\n+=========+============================+===============================+\n| Displac | ![](../demonstrations/phot | *Pauli X* gate if the |\n| ement | onics/Displacement.png){.a | displacement is by |\n| | lign-center | $\\sqrt{\\pi}$ in the |\n| | width=\"70.0%\"} | $x$-direction. *Pauli Z* if |\n| | | the same displacement is in |\n| | | the $p$-direction |\n+---------+----------------------------+-------------------------------+\n| Rotatio | ![](../demonstrations/phot | *Hadamard* gate for |\n| n | onics/Rotation.png){.align | $\\phi=\\frac{\\pi}{2}.$ |\n| | -center | |\n| | width=\"70.0%\"} | |\n+---------+----------------------------+-------------------------------+\n| Continu | ![](../demonstrations/phot | The squeezing parameter is |\n| ous | onics/CV_ctrlz.png){.align | given by $r=\\sinh^{-1}(1/2)$ |\n| variabl | -center | and the beamsplitters have |\n| e | width=\"100.0%\"} | $T=\\frac{1}{4}(1-\\tanh(r)).$ |\n| CNOT | | Applies a *Control-Z* |\n| | | operation on the GKP states |\n| | | when $\\phi = 0$ and a *CNOT* |\n| | | operation when $\\phi=\\pi/2.$ |\n+---------+----------------------------+-------------------------------+\n| Magic | ![](../demonstrations/phot | We use an auxiliary *magic |\n| state | onics/Tgate.png){.align-ce | state* $\\vert M\\rangle,$ |\n| telepor | nter | which is the GKP state |\n| tation | width=\"100.0%\"} | $\\vert M\\rangle = \\vert +\\ran |\n| | | gle +e^{i\\pi/4} \\vert -\\rangl |\n| | | e,$ |\n| | | and a $\\hat{P}$ homodyne |\n| | | measurement. If we measure |\n| | | $\\vert -\\rangle,$ we apply |\n| | | the shown rotations and |\n| | | squeezers with |\n| | | $r=\\cosh^{-1}(3/4),$ |\n| | | $\\theta=\\tan^{-1}(1/2),$ and |\n| | | $\\phi=-\\pi/2-\\theta,$ |\n| | | resulting in a GKP *T gate*. |\n+---------+----------------------------+-------------------------------+\n:::\n\nEven if their effect is approximate, these gates are quick and quite\nstraightforward to implement with our current technology. Therefore, we\nhave all the ingredients to build a universal quantum computer using\nphotons, summarized in the formula (see [this medium\narticle](https://medium.com/xanaduai/riding-bosonic-qubits-towards-fault-tolerant-quantum-computation-95b92c78cb43)):\n\n![](../demonstrations/photonics/formula_qc.png){.align-center\nwidth=\"70.0%\"}\n\nThe state of the art\n====================\n\nWe have now learned the basics of how to build a quantum computer using\nphotonics. So what challenges are there to overcome for scaling further?\nLet us analyze what we have learned in terms of Di Vincenzo\\'s criteria,\nso we can understand what Xanadu is doing to achieve the ambitious goal\nof building a million-qubit quantum computer.\n\nLooking at the first criterion, we already know that our qubits are far\nfrom perfect. Photonics rely on imperfect realizations of GKP states,\nwhich in turn makes quantum computations only approximate. Moreover,\nwhile we know a lot about GKP states, it is not easy to characterize\nthem after taking into account the noise, so the qubits are not as\nwell-defined as we would like. But our qubits are scalable: GBS circuits\ncan be built on small chips, which we can stack and connect together\nusing optical fibers. Moreover, compared to other implementations where\nlow temperatures are needed everywhere, in photonic quantum computers we\nonly need them for the PNRs to work. Since cryogenics are a bulky part\nof quantum computing architectures, photonic technology promises to be\nmore scalable than, for example,\n`trapped ion `{.interpreted-text\nrole=\"doc\"} or\n`superconducting `{.interpreted-text\nrole=\"doc\"} devices.\n\nThe second criterion, the ability to prepare a qubit, is clearly a\nchallenge. We need GKP states, but these cannot be prepared\ndeterministically; we need to get a bit lucky. We can bypass this by\n*multiplexing*, that is, using many Gaussian Boson Sampling circuits in\nparallel. Moreover, higher-quality GKP states need larger circuits,\nwhich in turn can decrease the probability of qubit production. How can\nwe try to solve this? Xanadu is currently following a hybrid approach.\nWhen we fail to produce a GKP state, Xanadu\\'s architecture produces\nsqueezed states using a separate squeezer. Strongly-entangled squeezed\nstates are a precious resource, since other encodings beyond GKP allow\nus to use these states as a resource for (non-universal) quantum\ncomputing[^9].\n\nThe third criterion of long decoherence times seems innocuous at a first\nglance. However, although the quantum state of individual photons is\nrobust, we do need to minimize the number of photons that escape to the\nenvironment. Recall that all quantum states of light are superpositions\nof Fock states. If a photon escapes, our state changes! The technology\nfor the minimization of photon loss has come a long way, but it\\'s not\nperfect yet. We can avoid losses by optimizing the depth of our\ncircuits, so that photons have a smaller probability of escaping. The\nGKP encoding also works in our favour, since it is robust against noise\nand small displacements from GKP states can be easily steered back.\n\nThe fourth criterion is pretty much satisfied by photonic quantum\ncomputers. We have seen that we can perform universal computations using\nGaussian operations, provided that we have GKP states. Barring our\nimperfect qubits, quantum computing gates are straightforward to\nimplement with good precision inside a chip. Moreover, entangling\nphotons is relatively easy using common optical devices, as opposed to\nother technologies that rely on rather complicated and slow gates.\n\nFinally, we need to be able to measure qubits. Homodyne detection can be\ndone easily and with great precision. In general, we do not need to\nmeasure the number of photons at the end of a quantum computation,\nquadrature measurement is enough to distinguish quantum states. The\nfancy PNRs are only required for qubit production!\n\n![..](../demonstrations/photonics/chip.png){.align-center width=\"40.0%\"}\n\nXanadu\\'s X8 Gaussian Boson Sampling chip. Variants of this chip can be\nused to generate approximate GKP states.\n\nConclusion\n==========\n\nThe approach of photonic devices to quantum computing is quite different\nfrom other technologies. Recent theoretical and technological\ndevelopments have given a boost to their status as a scalable approach,\nalthough the generation of qubits remains a challenge to overcome. The\nvariety of ways that we can encode qubits into photonic states leave\nplenty of room for creativity, and opens the door for further research\nand engineering breakthroughs. If you would like to learn more about\nphotonics, make sure to check out the [Strawberry Fields\ndemos](https://strawberryfields.ai/photonics/demonstrations.html), as\nwell as the references listed below.\n\nReferences\n----------\n\nAbout the author\n----------------\n\n[^1]: C. Hamilton , et al. (2017) \\\"Gaussian Boson Sampling\\\", [Phys.\n Rev. Lett. 119,\n 170501](https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.119.170501).\n ([arXiv](https://arxiv.org/abs/1612.01199))\n\n[^2]: H.S. Zhong, et al. (2020) \\\"Quantum computational advantage using\n photons\\\", [Science 370, 6523:\n 1460-1463](https://www.science.org/doi/10.1126/science.abe8770).\n ([arXiv](https://arxiv.org/abs/2012.01625))\n\n[^3]: L. Madsen, et al. (2022) \\\"Quantum computational advantage with a\n programmable photonic processor\\\" [Nature 606,\n 75-81](https://www.nature.com/articles/s41586-022-04725-x).\n\n[^4]: I. Tzitrin, et al. (2020) \\\"Progress towards practical qubit\n computation using approximate Gottesman-Kitaev-Preskill codes\\\"\n [Phys. Rev. A 101,\n 032315](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.101.032315).\n ([arXiv](https://arxiv.org/abs/1910.03673))\n\n[^5]: I. Tzitrin, et al. (2020) \\\"Progress towards practical qubit\n computation using approximate Gottesman-Kitaev-Preskill codes\\\"\n [Phys. Rev. A 101,\n 032315](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.101.032315).\n ([arXiv](https://arxiv.org/abs/1910.03673))\n\n[^6]: D. Gotesman, A. Kitaev, J. Preskill. (2001) \\\"Encoding a qubit in\n an oscillator\\\", [Phys. Rev. A 64,\n 012310](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.64.012310).\n ([arXiv](https://arxiv.org/abs/quant-ph/0008040))\n\n[^7]: I. Tzitrin, et al. (2020) \\\"Progress towards practical qubit\n computation using approximate Gottesman-Kitaev-Preskill codes\\\"\n [Phys. Rev. A 101,\n 032315](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.101.032315).\n ([arXiv](https://arxiv.org/abs/1910.03673))\n\n[^8]: E. Bourassa, et al. (2021) \\\"Blueprint for a Scalable Photonic\n Fault-Tolerant Quantum Computer\\\", [Quantum 5,\n 392](https://quantum-journal.org/papers/q-2021-02-04-392/).\n ([arXiv](https://arxiv.org/abs/2010.02905))\n\n[^9]: E. Bourassa, et al. (2021) \\\"Blueprint for a Scalable Photonic\n Fault-Tolerant Quantum Computer\\\", [Quantum 5,\n 392](https://quantum-journal.org/papers/q-2021-02-04-392/).\n ([arXiv](https://arxiv.org/abs/2010.02905))\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"::: {.bio photo=\"../_static/Alvaro.png\"}\nAlvaro Ballon\n\nAlvaro Ballon is a quantum computing educator at Xanadu. His work\ninvolves making the latest developments in quantum computing accessible\nto the community.\n:::\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.13"
}
},
"nbformat": 4,
"nbformat_minor": 0
}