Introduction

Quantum error-correcting codes (QECCs) constitute fundamental building blocks in the design of quantum computer architectures1. It was realized early on that using QECCs2,3,4,5,6 to counteract the effects of decoherence and noise provides a means to increase the coherence time of the encoded information. This enhancement is crucial for enabling a range of speedups in quantum algorithms. Here, the threshold theorem7 ensures that a quantum computer built with faulty, unreliable components can still be used reliably to implement quantum tasks using QECC techniques8,9, so long as the noise affecting its parts is below a given threshold. A great deal of effort is currently being invested in designing new quantum codes to increase the threshold. In this context, a computational paradigm, especially well suited for quantum error correction, is measurement-based quantum computation10,11,12 (MBQC), in which a resource state consisting of many entangled qubits is prepared before the computation starts. In MBQC, an algorithm is enacted by performing sequential measurements on the resource state in such a way that the output of the computation is stored in the unmeasured qubits. Photonic technologies13 have enjoyed enormous success in the generation of a variety of resource states for MBQC14,15,16,17,18 and in the implementation of computational primitives19,20,21,22,23,24,25,26,27,28,29,30,31,32. Importantly, QECCs can be embedded in the resource states for MBQC in several inequivalent ways33,34,35, and of particular theoretical interest, due to their large thresholds, are the topological QECC embeddings36,37,38,39,40,41,42. However, while there has been an experimental proof-of-principle for topological encoding43, overall these codes remain largely out of reach of current technologies due to the size and complexity of the resources required. An alternative and more compact approach is offered by the theory of graph codes44,45,46,47, where very general QECCs can be used within the framework of MBQC to account for different noise scenarios. Graph codes are based on the stabilizer formalism and are thus relevant for both MBQC and the original circuit model.

In this work, we report the experimental demonstration of a quantum error-correcting graph code. We have used an all-optical setup to encode quantum information into photons representing the code. The experiment was carried out for the smallest graph code capable of detecting one quantum error, namely the four-qubit code48,49,50 [[4,1,2]]. Here, [[n,k,d]] is the standard notation for QECCs, where n denotes the number of physical qubits, k is the number of logical qubits encoded and d is the distance, which indicates how many errors can be tolerated and depends on information about the error: a code of distance d can correct up to (d−1)/2 arbitrary errors at unspecified locations. On the other hand, if we know where the error occurs, the code can correct up to d−1 errors (equivalently erasures or loss errors), or it can detect up to d−1 errors at unspecified locations (without necessarily being able to correct them). The four-qubit code used in our experiment has a distance of d=2, so it can correct up to one quantum error or a loss error at a known location and can detect up to one quantum error at an unknown location. This has applications in several key areas of quantum technologies besides the obvious goal of fault-tolerance51,52,53,54, for example in communication over lossy channels, lossy interferometry and secret sharing. Previous experiments have realized error-correcting codes of compact size, such as the 3-qubit code in an ion-trap setup55. One of the key benefits of enlarging the code space size to the four-qubit code is that it enables more general errors, in particular loss errors, to be corrected. While the four-qubit code has been realized before in several works, most notably in ref. 56, these studies have been restricted to quantum error-correction with the four-qubit code using the original circuit model. For example, in ref. 56 the logic gates were applied sequentially using a series of polarizing beam splitter (PBS) elements in a linear optics setup.

Here we go beyond this approach and show how to realize the code using a different experimental setup that can generate an entangled graph state in the promising context of MBQC and fully characterize its performance. One of the key distinctions of our work compared with previous studies is that the graph state resource for the code is generated first and then the quantum information is teleported into it, following closely the model for MBQC. This allows us to transfer arbitrary qubits into the code as well as preparing the logical subspaces in a given state. This is an important distinction, as the quantum information to be encoded is untouched during the generation of the code resource. In this way, if the entanglement process fails, we can start again without the quantum information being lost, which means that our work cannot be re-interpreted as the quantum circuit used in ref. 56. We show that by measuring an external ancilla qubit, its information in the Bloch sphere can be transferred into the logical subspace of the code, which after undergoing a noisy channel can be decoded to retrieve the original information with high quality. These encoding and decoding operations are straightforwardly extended to larger codes, as they rely on an appropriate graph state connectivity45,46,47 and can always be achieved via local qubit interactions. Importantly, this procedure also lends itself to variations where the number of encoded qubits can increase (in the case of larger codes) at the expense of reducing the distance d, by modifying the shape of the total graph. This is relevant in order to boost the code rate, k/n, for the erasure channel7,50. Recent experimental work incorporating quantum error correction using a measurement-based approach with tree-like graph state resources has considered basic protection against loss56 and for the case of phase errors using a box-type graph where the location of the error is known57,58. In this work, we lift these restrictions and experimentally demonstrate a graph code using a different type of graph state that can be described within the MBQC framework to provide protection against general errors and loss, where the location of the error is known, as well as the detection of general quantum errors where the location is unknown. In our experiment, we generate the graph state resource via the method of fusion59. This has several advantages over interferometric methods19, such as overall stability of the setup and, in principle, scalability to larger graph states. We successfully demonstrate all elements of error correction in our experiment, including in sequence the encoding, detection and correction of errors, and we verify the quality of each of these steps separately. Demonstrations of compact QECC schemes, such as the one we have performed, are of the utmost importance to the design and characterization of noise protection in a number of different physical architectures at present. They constitute the necessary first steps towards large-scale quantum computers. Our experimental demonstration and its full analysis contribute to helping achieve these first steps.

Results

Resource state characterization

The resource state we used for demonstrating the four-qubit graph code was generated as shown in Fig. 1a using two photonic crystal fibre (PCF) sources60,61,62, which each produce correlated pairs of photons via spontaneous four-wave mixing when pumped by picosecond laser pulses. One of the sources was in a Sagnac loop configuration, such that the PCF is pumped in both directions, with one direction producing horizontally polarized signal-idler pairs, , and the other producing vertical pairs, . When the two paths are combined at a PBS, the polarizations of a pair outside the loop are entangled in a Bell state (see Methods), . The other source is used to produce a heralded signal photon in the state , where . This is overlapped with the signal photon from the entangled pair at a PBS, performing a post-selected fusion operation59,63,64. Conditioned on a fourfold coincidence detection, this will leave a GHZ state on three of the photons, . This state is equivalent to a three-qubit linear cluster state up to local rotations, which are applied to the end qubits using half-wave plates on the two signal modes to give . Additional path degrees of freedom are then used to expand the state into a five-qubit linear cluster18,22. Here, the signal photons are each split into two paths using PBSs, so that the path they take is correlated with their polarization, and the transmitted and reflected paths, p1 and p2, are labelled as |0 and |1 for the additional qubits. To detect a path qubit in a particular basis, the paths are recombined at a 50:50 beam splitter (BS), which performs a Hadamard rotation on the path, independent of the polarization. By shifting the relative phase θ before this, using tilted glass plates, the path qubit can be detected after the BS in any state in the equatorial plane of the Bloch sphere given by , for example, the Pauli X and Y bases. Measurements in the Pauli Z basis can be achieved by blocking one or the other interferometer path, in which case the BS reduces the measurement rate by 50%. The polarization qubits are measured after the path qubits using a quarter-wave plate (QWP), HWP and PBS chain, followed by a detection of the photon using single-photon avalanche photodiodes. This allows us to measure in the X, Y and Z basis65. The state after a path qubit is added to each signal photon, with Hadamard rotations applied to the signal polarizations using a HWP in each path, can be written as

Figure 1: Experimental setup.
figure 1

(a) Setup used to generate the graph state resource consisting of the four-qubit graph code plus ancilla qubit. Two PCF sources are pumped using a Ti:sapphire laser producing picosecond pulses at 720 nm. The first source produces a pair of photons in the state and the second produces photons in the state . The signal photons from the first pair are rotated to the state |+ using a HWP and both signal photons are then fused using a (PBS). The polarizations of the signal photons are then rotated using half-wave plates to form the three-qubit linear cluster state , where the first idler photon is used as a trigger to verify a fourfold coincidence signifying the generation of the state. The path degree of freedom of the signal photons is then used to expand the resource to a five-qubit linear cluster state using a Sagnac interferometer, as shown in the dashed boxes and explained in the main text. (b) Five-qubit linear cluster state and local complementation steps (LC1 and LC2) to generate the graph code plus ancilla qubit. Here, the vertices correspond to qubits initialized in the state |+› and edges correspond to controlled-phase gates, CZ=diag(1,1,1,−1), applied to the qubits. The LC operations are performed using half-wave plates, QWPs and phase shifters in the relevant photon modes and correspond to LC1=A1B2(AA)3B4A5 and LC2=A1A2B3A4A5, where and . In the steps shown in the figure, the operation A (B) is depicted as a dashed (solid) outline around the qubit. The background shading in the final step represents the quantum resource used to perform the quantum error-correction schemes. (c) Expectation values of the operators used to verify genuine multipartite entanglement in the graph state. Here Õ corresponds to measurements in the O basis with the eigenstates swapped. The ideal values correspond to the dashed line. All error bars in the figures are calculated using a Monte Carlo method with Poissonian noise on the count statistics65.

which is the five-qubit linear cluster state shown in Fig. 1b, where the polarization of photon s1 represents qubit 1 (|H/V → |0/1›) and its path represents qubit 2 (|p1/p2›→|0/1›). Similarly for photon s2, whose polarization represents qubit 5 and its path qubit 4. The polarization of photon i2 represents qubit 3.

The linear cluster state is then transformed into the resource state consisting of the graph code plus ancilla qubit according to the local complementation rules for graph states, as shown in Fig. 1b and described in the caption. The resulting graph state can be written compactly as , where the logical states of the four-qubit graph code are given by and , with the Bell states given by and . Here the logical Pauli operators on the code space are and , with (see Methods). The total resource state can be written more explicitly as

where the states are the Y eigenstates. To obtain this state from equation (1) in our experiment, a QWP on idler mode i2 carries out the required rotation for qubit 3. The transformations for the signal path qubits are implemented by a relabelling of the |0› and |1› paths to |+› and |−›, and π/2 phase-shifts using tilted glass plates. To check the entanglement of the resource, we use an entanglement witness as described in ref. 66. Here, for any GHZ or linear cluster state, it is possible to detect genuine multipartite entanglement (GME) using correlations taken from just two local measurement bases. Since the resource is locally equivalent to a linear cluster state, making corresponding changes to the reference frames of the measurements provides an appropriate witness. The measurements are X1X2X3X4X5 and Z1Y2Y3Y4Z5 (see Methods), which result in a witness value of

where the error has been calculated using a Monte Carlo method with Poissonian noise on the count statistics65. The negative value of the witness indicates the presence of GME, confirming that all qubits are involved in the generation of the resource. The individual expectation values forming the expression for the witness are shown in Fig. 1c. Using seventeen measurement bases (see Methods) we obtain the fidelity of the graph state of F=0.70±0.01.

In order to check the persistency of entanglement in the resource, we measure the ancilla qubit using a Z measurement, thus removing it from the graph. For the case that the state |0›3 is measured, the remaining four qubits should be left in the logical code state |+L›, which corresponds to a ‘box’ cluster state,

Using the relevant witness in ref. 66 (see Methods) we find the value

showing GME persists even when the ancilla qubit is removed. Using nine measurement bases (see Methods), we obtain the fidelity of the box cluster state of F=0.73±0.01, consistent with the quality of the initial five-qubit graph state.

Encoding logical states

In order to encode an arbitrary ancilla qubit α|0›3+β|1›3 into the four-qubit graph code, we measure it in the X basis as shown in Fig. 2a. This is a basic quantum information transfer primitive in MBQC and propagates the qubit into the code while at the same time applying a Hadamard operation, so that the qubit is encoded in the Hadamard basis, that is, . Thus, the encoding of an arbitrary state can be carried out up to a logical byproduct operation depending on the ancilla’s measurement result, s3=(0,1). Alternatively, an unknown qubit could be entangled with the ancilla qubit via a controlled-phase operation, CZ=diag(1,1,1,−1), after which both the unknown state and ancilla are measured in the X basis, transferring the quantum information into the code in the computational basis. We start our characterization of the graph code’s performance by analysing the quality of the logical encodings for general input states. To do this, we encode the probe states |0›, |1›, |+› and |+y› onto the ancilla qubit and measure it in the X basis, as shown in Fig. 2b. This is sufficient to reconstruct the encoding process completely as a quantum channel and fully characterize its quality.

Figure 2: Graph code.
figure 2

(a) Encoding logical states. In order to encode the state of the ancilla qubit into the graph it should be measured in the X basis. This propagates the information into the graph code while at the same time applying a Hadamard operation. Thus, the ancilla state is encoded in the Hadamard basis. The background shading represents the quantum state nonlocally encoded into the qubits in the graph resource. (b) Logical density matrices for the four different probe states |0›, |1›, |+› and |+y› once propagated into the code. These are calculated from the expectation values of the joint four-qubit logical operators , and . (c) Encoding as a channel. Here, the Bloch sphere transformation is shown for the encoding of arbitrary ancilla qubits (points on the surface of the sphere) into the code. Note that a Hadamard operation has been performed on the qubit, corresponding to a rotation of 180 degrees about the XZ plane.

The probe state |0› is encoded onto the ancilla qubit using a polarizer in the idler mode i2 with the qubit then measured in the X basis. This propagates the probe state into the code as the state |+L›. This is the box cluster state, which we find to have a witness value of . For convenience, we have taken the case where no byproduct is produced during the encoding measurement, that is, s3=0. The density matrix for the encoded logical state is shown in Fig. 2b and is obtained by measuring in the collective , and bases of the code, corresponding to local measurements of the four qubits. The fidelity with respect to the ideal case is F=0.78±0.01. Similarly, using a polarizer in the idler mode, we encode the |1› probe state that is propagated into the graph code as |−L›, a state equivalent to the box cluster up to Z rotations on each physical qubit, as . A witness value for GME is found to be . The density matrix for this logical state is shown in Fig. 2b and the fidelity with respect to the ideal case is F=0.77±0.01

For the |+› probe state, we find that it is naturally encoded into the ancilla qubit in the total graph resource and upon measuring it, we expect the logical state |0L› to be encoded into the four-qubit graph. For the physical qubits, this logical state can be rewritten as a rotated GHZ state, . Using a GME witness with two measurement settings (see Methods) we find . The logical density matrix is shown in Fig. 2b and the fidelity with respect to the ideal case is F=0.78±0.01. Finally, for the |+y› probe state we use a QWP in idler mode i2 and expect the logical state |−y,L› to be encoded into the graph. The |±y,.L› states are the only encodings not expected to show GME under ideal conditions; instead they are biseparable and composed of two maximally entangled pairs and . For the state |−y,L› we find an entanglement witness value for qubit pair (1,2) of and for pair (4,5) a value of . The logical density matrix is shown in Fig. 2b and the fidelity with respect to the ideal case is F=0.88±0.01.

Using the logical density matrices for the encoded probe states we are able to reconstruct the encoding process as a quantum channel using quantum process tomography28. In this case, the encoding transforms a single-qubit input state ρ for the ancilla into the output density matrix ε(ρ) in the graph code’s logical qubit basis and can be formally written as . Here, the operators Mi correspond to a complete basis for the Hilbert space allowing any physical channel to be described. We choose the Pauli basis, Mi=(I, X, Y, Z), for the operators so that the elements of the χ matrix define the channel completely. This allows us to determine the effect of the MBQC information transfer process on the original qubit due to imperfections in the experimental graph resource. In Fig. 2c we show the original Bloch sphere for arbitrary input ancilla states and the final reconstructed encoded Bloch sphere using the experimentally determined values from the χ matrix. The Bloch sphere is reduced slightly in diameter, but overall, the structure closely resembles that of the original input states rotated by a Hadamard operation. The process fidelity for the encoding quantifies how close the experiment is to the ideal case and is given by , where χexp describes the experimental channel and χideal corresponds to a Hadamard rotation. From the channel reconstruction we find Fp=0.70±0.01.

Loss tolerance

With the logical encodings characterized we now analyse the performance of the graph code for providing protection against the loss of any of the qubits when the location of the loss is known. In order to see how the graph code tolerates loss, consider the case in which qubit 4 is lost, as shown in Fig. 3a. Due to the symmetry of the state, any other qubit can be considered to be lost, with the same recovery procedure applied upon an appropriate rotation of the labelling of the qubits. In the case that we lose qubit 4, the state of the remaining three qubits is found by tracing it out. From the initial state α|+L+β|−L› one finds the state , where |φ›=α′(|0›|φ›+|1›|ψ›)+β′(|0›|ψ+›+|1›|φ+›) and |φ›=−α′(|1›|φ›+|0›|ψ›)+β′(|1›|ψ+›+|0›|φ+›). Here, the coefficients are and . By measuring qubit 2 in the Z basis, we obtain the state , with and . Next, measuring qubit 5 in the X basis produces the state , with . Thus, the final state of qubit 1 is a pure state ρ1=|νν|, from which, if we remove the Pauli operators via feed forward rotations19, we can recover the encoded qubit and re-encode it for further processing, thereby correcting the loss error. Note that even when there is no loss one can use this method to decode the qubit. A more rigorous description of the recovery procedure using the stabilizer formalism is given in the Methods.

Figure 3: Loss tolerance.
figure 3

(a) General scenario of loss tolerance for the four-qubit graph code. Here any one of the four qubits may be lost. In the first case, qubit 4 has been lost by combining the two paths corresponding to the computational basis of the qubit. The encoded qubit can be recovered on qubit 1 using the measurements and results of the remaining qubits 2 and 5 as described in the main text. (b) Path qubit lost with the recovery treated as a channel. Here the Bloch sphere representation is used to show the original qubit states and the recovered qubit states. (c) The χ matrix representation of the channel, showing the real part (left) and imaginary part (right). Ideally the χ matrix has only one component, the entry I I, corresponding to the identity operation. (d) In the second case, qubit 1 has been lost by combining the two polarizations corresponding to the computational basis of the qubit. The encoded qubit is recovered on qubit 5 using the measurements and results of the remaining qubits 2 and 4. (e) Polarization qubit loss with the recovery treated as a channel. Here the Bloch sphere representation shows the original qubit states and the recovered qubit states. (f) The χ matrix representation of the channel, showing the real part (left) and imaginary part (right).

In Fig. 3b, we show the original Bloch sphere for the ancilla qubit and the recovered sphere after qubit 4 is lost and the recovery is carried out with feed forward rotations. In our graph state qubit 4 is a path qubit and we lose it by incoherently combining the two paths corresponding to its computational basis states. This loss of information about which path photon s2 populates is equivalent to tracing out qubit 4 from the system. Here we have used the four probe states discussed earlier to reconstruct the combined encoding and recovery channel. The recovered Bloch sphere is relatively consistent with the original sphere, corresponding to a process fidelity of Fp=0.70±0.01, although slightly squeezed in the Z and X directions. This effect can be seen more clearly in the χ matrix shown in Fig. 3c. Here there is a strong component of the identity operation, as expected, but also a non-negligible contribution of a Y operation due to the non-ideal graph resource used in our experiment. The combination of the identity and Y operation gives rise to the squeezing effect seen in the Bloch sphere, which maintains the position of the Y eigenstates, but sends the X and Z eigenstates towards the maximally mixed state . As any state can be written as a combination of these eigenstates, the corresponding components will be affected similarly. The average fidelity for an encoded and recovered qubit is found to be , and the fidelities for the individual probe states are F0=0.80±0.01, F1=0.77±0.01, F+=0.75±0.01 and . In Fig. 3d we consider qubit 1 as lost and show the Bloch sphere representation of the recovery in Fig. 3e, as well as the χ matrix in Fig. 3f. In this case, qubit 1 is a polarization qubit and we lose it by removing the PBS at the polarization analysis stage for photon s1, thus combining the two polarizations corresponding to the qubit’s computational basis states. We find a process fidelity for the encoding and recovery of Fp=0.73±0.01. The average fidelity for an encoded and recovered qubit is found to be , and the fidelities for the individual probe states are F0=0.80±0.01, F1=0.77±0.01, F+=0.78±0.01 and . One can see in Fig. 3e the recovered Bloch sphere is similar to that of the path qubit loss. However, the squeezing is now mainly in the X direction due to the additional presence of a Pauli Z operation, as can be seen more clearly in the χ matrix shown in Fig. 3f.

Quantum error detection and correction

Finally, we check the graph code’s ability to detect general quantum errors. To see this note that the logical code states are all common eigenstates of the stabilizer operators S1=Y1Z2Z4Y5=K1K5, S2=Y1Z2Y4Z5=K1K4 and S3=Z1Y2Y4Z5=K4K2, where the Ki are the original graph state stabilizer operators10,11. If there is a phase flip Z on any one qubit of the code, as shown in Fig. 4a, we can locate the error by measuring all three stabilizers without disturbing the graph code and correct the error as ‹Si›=1 and ‹SiZj›=−1 for a given j and two of the stabilizers. Thus measuring the stabilizers performs the role of syndrome measurements for the graph code. In Fig. 4a, we show the values of the stabilizers measured in our experiment when there is a Z error on each of the qubits for all the probe states. The experimental values agree well with the theory with all having the correct sign and an error of 0.02 or less. As an arbitrary state can be written as a superposition of the probe states, the results show that any state can be encoded into the code and the error detected. Similar arguments about the stabilizers hold for Y errors, as shown in Fig. 4b with the experimental values measured for the probe states. On the other hand, if there is a bit flip X on any one qubit, it can be detected by measuring the stabilizers, but it cannot be located, since an X error anticommutes with all stabilizers: ‹SiXj›=−1 for a given j and all i, as shown by the experimental values in Fig. 4c. This is the reason (along with a degeneracy in locating Z and Y errors) why the code can only detect general quantum errors (X, Y or Z) acting on an unknown single qubit, but cannot correct them. If an error is detected via the stabilizers, then the state is discarded and one starts a given quantum protocol again by re-encoding. On the other hand, if the location of the error is known, then the type of error (X, Y or Z) can be determined from the pattern of the stabilizer results and the error can be corrected. All expectation values of the stabilizers were found to be consistent with those expected when there was an error occurring on any one of the qubits for all probe states, thus confirming the graph code’s ability to detect unknown single-qubit errors and correct known single-qubit errors.

Figure 4: Error detection.
figure 4

(a) Z errors on one of the qubits of the code flips the sign of the expectation value of one or two of the stabilizer (syndrome) operators S1, S2 and S3, as can be seen in the tables showing the experimental values for the four probe states. The values range from 0.66 to 0.79 in magnitude. The syndrome operators correspond to joint measurements, thus they can in principle be measured without disturbing the state. If no error has occurred the code can continue to be used. If an error has occurred then it will be detected and the ancilla can be encoded again to allow the continuation of a given protocol. If the error is known to be a Z Pauli operation then its location can be detected and corrected. If it is not, the ancilla must be re-encoded to allow the continuation of a given protocol. (b) Y errors on one of the qubits of the code also flips the sign of the expectation value of one or two of the syndrome operators. If the error is known to be a Y Pauli operation then its location can be detected and corrected. If not, the ancilla can again be re-encoded. (c) X errors on one of the qubits of the code flips the sign of the expectation value of all the syndrome operators. Note that if the location of the error is known, then the type of error can be inferred from the pattern of the expectation values of the syndrome operators and the error can be corrected.

Discussion

In this work, we have reported the experimental demonstration of a graph state code using an all-optical setup to encode quantum information into photons representing the qubits of the code. The experiment was carried out for the smallest graph code capable of correcting up to one general quantum error or a loss error at a known location, or detecting a general quantum error at an unknown location. We showed that the graph state code can be used to correct and detect errors in a photonic setting with the results in close agreement with the theory and limited only by the quality of the initial resource state. Our demonstration and analysis provides a stimulating outlook for several applications of photonic quantum technologies besides the obvious goal of fault tolerance, for example in communication over lossy channels, lossy interferometry and secret sharing. In general, the versatility of graph codes, such as the one we have demonstrated, can further be increased by generalizing them to codeword-stabilized (CWS) codes67, where a given graph is supplemented with a (possibly non-additive) classical code that corrects the classical errors induced by the stabilizer structure. The theory of CWS codes is the most general theory of QECCs to date, as it encompasses graph codes, of which the four-qubit graph code we have realized is the simplest instance, and non-additive codes. Thus, the graph encoding we have demonstrated is amenable to be used with the more general CWS codes and helps to open up the playing field to more general classes of graph codes, allowing for more efficient constructions of error correction with intermediate size and applications in the near future. Moreover, the graph code and MBQC techniques we have introduced here can be readily transferred to other promising physical setups, such as ion traps, cavity-QED and superconducting qubits. The next steps will be to design and realize QECC schemes using larger graph states45,46,47 with enhanced error-correction capabilities70, and introduce concatenation methods against loss errors68,69,70. Our experimental demonstration and characterization of a four-qubit graph code’s performance contributes to the first steps in the direction of full-scale fault-tolerant quantum information processing.

Methods

Experimental setup

The fibre source used was a birefringent PCF similar to that described in refs 28, 59. For a pump wavelength of 720 nm launched into the fibre’s slow axis, signal-idler pairs are generated on the fast axis at wavelengths of 626 and 860 nm, respectively. This is a turning point on the phase-matching curve for the signal wavelength, where the signal spectrum becomes uncorrelated with the pump wavelength, and hence also with the idler spectrum. This means the signal-idler pair are generated almost without spectral correlations in a pure quantum state, and do not require tight spectral filtering to show quantum interference.

To generate entangled pairs from the Sagnac loop source, the fibre axes are rotated at each end. With the fast-axis vertical at the output of the clockwise path, this direction will produce vertical photon pairs, whereas at the output of the counter clockwise direction the fast axis must be horizontal in order to produce horizontal photon pairs. These orientations also result in the pump light being launched into the correct (slow) axis. Since the pump is always cross polarized from co-propagating photons, it exits the loop from the opposite port, helping to filter it out of the signal and idler channels. A Soleil-Babinet birefringent compensator in the pump beam before the source was used to tune the relative phase between the two terms of the entangled state. The total generation rate of entangled photons (detected twofold coincidences) used in the experiment is ~9,000 per second.

The other PCF source produces horizontally polarized signal photons, which are rotated to diagonal before being fused with the signal from the entangled pair, leaving the three-photon GHZ state. It is necessary to detect the unentangled idler photon from this PCF source in order to herald the signal. The idlers from both sources are filtered with tuneable bandpass filters of ~4 nm bandwidth to remove Raman emission and other background, while 40 nm wide bandpass filters are used for the signals’ wavelength which is relatively free of background. The total generation rate of signal-idler pairs of photons for the second PCF source is again ~9,000 per second. The signal photons from both sources are fused using a PBS, which transmits horizontally polarized photons and reflects vertically polarized photons, as described in ref. 59. In order to optimize the fusion operation, we first set the polarization of the signal photons to diagonal polarization and send them through the PBS, measuring the twofold coincidences of the output photons in diagonal polarization together with heralding by the idlers, that is, a fourfold coincidence. As the arrival time of one of the input signal photons at the PBS is delayed we find an antidip (or peak) in the coincidence rate. The visibility of this antidip provides a value that can be used to quantify the indistinguishability of the signal photons. We obtain a visibility of ~62%. This non-ideal visibility affects the overall quality of the fused state via an effective dephasing decoherence channel on the qubits, as described in more detail in ref. 59. The visibility of 62% is consistent with the measured fidelity of the final five-qubit graph state resource generated in our experiment.

After the fusion operation at the PBS, all four photons are collected into single-mode fibres. The signals are then relaunched into path-qubit setups, which consist of displaced Sagnac interferometers built around hybrid BS cubes, with half of the coating a PBS and the other half a 50:50 BS. The photons are split at the PBS side, so their path is correlated with their polarization, and then recombined on the BS side, while the displaced Sagnac configuration gives intrinsic phase stability between the paths. Each path contains a half-wave plate, to carry out the local polarization rotations for state preparation, then a 3 mm glass plate, which can be tilted to change the phase and hence the measurement basis.

The signal photons are again collected into single-mode fibres and launched into a polarization analysis section. The entangled idler also goes into the polarization analysis section, but with space for additional optics (a wave plate or polarizer) to be inserted to encode the ancilla qubit state. Polarization analysis consists of a QWP, HWP, then a PBS, with both outputs of the PBS collected into multimode fibres coupled to silicon avalanche photodiodes65. The heralding idler goes straight to a detector. The detectors are connected to an eight-channel FPGA(MT-30A FPGA multichannel coincidence counter from Qumet Technologies: http://www.qumetec.com), which allows all combinations of coincidence to be monitored within a nanosecond-timing window. The detected rate of fourfold coincidences is ~0.25 per second.

Entanglement witnesses

For the graph state corresponding to the code resource plus ancilla qubit we use the following entanglement witness on qubits 1, 2, 3, 4 and 5

where Õ corresponds to measurements in the O basis with the eigenstates swapped. This is a locally rotated version of the witness given in ref. 66 for a five-qubit linear cluster state and takes into account the local complementation operations described in Fig. 1b of the main text.

For the box cluster we use the following entanglement witness on qubits 1, 2, 4 and 5

which is a locally rotated version of the one given in ref. 66 for a four-qubit linear cluster state and takes into account the local complementation operations needed to rotate it into a box cluster.

For the rotated GHZ state, we use the following entanglement witness on qubits 1, 2, 4 and 5

which is a locally rotated version of the one given in ref. 66.

For the maximally entangled qubit pairs in the logical encoding of the probe state |+y›, we use the following entanglement witness on qubit pair (1,2) and pair (4,5)

which is a locally rotated version of the one given in ref. 66 for a two-qubit linear cluster state.

Fidelity operators

For the five-qubit graph state resource, we decompose the fidelity operator into a summation of products of Pauli matrices as

Obtaining the expectation value of this operator requires 17 unique measurement bases: XXXXX, XXYYZ, XXYZY, XXZYY, XXZZZ, YYXYY, YYXZZ, YYZXX, YZYYZ, YZXZY, YZYXX, ZYYYZ, ZYZZY, ZYYXX, ZZXYY, ZZXZZ and ZZZXX.

For the four-qubit box cluster state we decompose the fidelity operator as

Obtaining the expectation value of this operator requires nine unique measurement bases: XXXX, XXYY, XXZZ, YYXX, YZYZ, YZZY, ZYYZ, ZYZY and ZZXX.

Stabilizer picture of the graph code

The stabilizer description of QECC is a compact and powerful way to gain insight on the symmetries of quantum codes. A different way of writing the original state of the ancilla qubit 3 is , where . In order to see how this description is equivalent to the one introduced in the Results section, note that |ψ3=α|0›3+β|1›3=U|0›3 for some unitary operation U. The projector will transform accordingly, that is, , since the Pauli matrices, together with the identity, form a basis for all single-qubit density matrices. Specifically, we have that, for and , the correspondence ex=sin θ cos ϕ, ey=sin θ sin ϕ and ez=cos θ.

The four-qubit graph code [[4,1,2]] is the common eigenspace of the stabilizer operators S1=Y1Z2Z4Y5=K1K5, S2=Y1Z2Y4Z5=K1K4 and S3=Z1Y2Y4Z5=K4K2, where the Ki=XijεN(i)Zj are the original box cluster state stabilizer operators10,11. We have chosen and to be the logical Pauli operators acting on the code space, respectively. Note that this choice is independent from the labelling. Encoding information can be seen as expanding the operators acting on the ancilla qubit into the four-qubit box cluster state plus ancilla. For simplicity, we fix ey=0, and restrict the logical state to be in the XZ equator of the Bloch sphere. After tracking how the X and Z operators are expanded, we then find the expansion of Y=i XZ and remove the restriction. Note that the controlled-phase gate acts like and . Applying the operation to the qubits of the four-qubit box cluster and an ancilla qubit to make the initial five-qubit graph state resource (code plus ancilla) will change the shape of the logical ancilla operators as:

Here, on the right hand side of equations (12) and (13), we represent the logical operations by assigning the local operators to each qubit’s spatial location in the graph, as shown in Fig. 2a. We can reshape these expanded logical operators by multiplying them by expanded versions of operators O for which the box cluster is an eigenstate, that is, , where the operators :

and

where the operator is a cluster state stabilizer. Since the expanded logical operators do not have support on qubit 4, measuring this qubit will not be needed to decode the information, and it can thus be lost. Qubit 3 will be measured in the X basis, which leaves the four remaining qubits in the state . It is straightforward to see that the encoding operation entangles ancilla qubit 3 with the qubits of the code, and its measurement in the X basis effectively teleports the information into the code space, after an application of a Hadamard operation (note the unit vectors ex and ez are swapped in the encoded state). We can then find the logical Y operator using the relation to generalize the result. Of the qubits in the graph code, one can see from the form of the logical operators that we need to measure qubits 2 and 5 in the Z and X basis, respectively. That will leave qubit 1 in the state |ψ, modulo some known Pauli corrections. This method constitutes a generalization to logical subspaces of the task for propagating information through a resource state in MBQC. The above method also illustrates how decoding can be achieved.

Additional information

How to cite this article: Bell, B. A. et al. Experimental demonstration of a graph state quantum error-correction code. Nat. Commun. 5:3658 doi: 10.1038/ncomms4658 (2014).