Encoding Error Correction in an Integrated Photonic Chip

Integrated photonics provides a versatile platform for encoding and processing quantum information. However, the encoded quantum states are sensitive to noise, which limits their capability to perform complicated quantum computations. Here, we use a ﬁve-qubit linear cluster state on a silicon photonic chip to implement a quantum error-correction code and demonstrate its capability of identifying and correcting a single-qubit error. The encoded quantum information is reconstructed from a single-qubit error and an average state ﬁdelity of 0.863 ± 0.032 is achieved for diﬀerent input states. We further extend the scheme to demonstrate a fault-tolerant measurement-based quantum computation (MBQC) on stabilizer formalism that allows us to redo the qubit operation against the failure of the teleportation process. Our work provides a proof-of-concept working prototype of error correction and


I. INTRODUCTION
Quantum information is fragile.On the one hand, we need the individual subsystems to interact sufficiently strongly to perform computations.On the other hand, each subsystem should be adequately insulated from its environment [1].Yet, the discovery of quantum error-correcting codes [2][3][4][5] convincingly demonstrates the possibility of overcoming memory and transmission errors provided that the noise level is below a certain threshold.
The cluster state is a highly entangled resource for measurement-based quantum computation (MBQC), also known as one-way quantum computation.MBQC is typically performed in two stages: preparation of the highly entangled resource followed by a sequence of single-qubit measurements on the cluster state.These measurements are adaptive, where the basis for measuring qubits depends on the results of earlier measurements.The use of the cluster state for the error-correction code has great potential and fault-tolerant thresholds for cluster states have been established [6].Recently, fault-tolerant one-way quantum computers using three-dimensional cluster states have also been proposed [7].
In the field of optical quantum computing, pioneering studies have reported the implementation of errorcorrection codes using bulk optics [8,9] and fiber-optic systems [10] to address arbitrary single-qubit errors at known positions.Compared to bulk optics, integrated photonic chips can offer a more promising approach for the implementation of quantum error correction, with distinct advantages in terms of scalability, stability, and efficiency.Over the years, photonic chips have successfully integrated photon sources [11][12][13][14][15][16][17][18], postselection-based entanglement [19][20][21][22], qubit manipulation and measurement [23][24][25][26][27][28], and even single-photon detectors [29,30].This has led to a proliferation of on-chip demonstrations of various quantum applications, such as quantum walks [31], quantum Hamiltonian learning [32], the graph processor [33], etc.However, an on-chip implementation of quantum errorcorrection codes, specifically targeting arbitrary singlequbit errors at known positions, has yet to be demonstrated.In the chip implementation of error-corrected qubits by Vigliar et al. [34], only the error type of phase-flip error is addressed.
Here, we demonstrate a cluster-state-based quantum error-correction code in an integrated photonic chip that can detect or correct arbitrary single-qubit errors at known positions.Similar functionalities have previously only been shown in bulk optics.A four-physical-qubit state is generated to encode a logical qubit and high reconstruction fidelities are achieved against various errors.Beyond the inherent difference between bulk optics [8,9] and chip integration, our work also differs from theirs in terms of the qubit-encoding method.Our work generates the cluster state first and then uploads the quantum information through teleportation, whereas their scheme directly encodes the information during the state-preparation stage, which will result in information loss if the preparation fails.Besides, we extend this scheme to identify the error types by measuring the stabilizers.The scheme is further extended to a proof-of-principle experiment of measurement-based quantum computing, which enables the redoing of the computation process should the qubit suffer errors.

II. THEORY AND CHIP DESIGN
The principle of quantum error-correction and the MBQC scheme based on a five-qubit linear cluster state is shown in Fig. 1.The schematic diagram of the quantum photonic chip for demonstrating this scheme is shown in Fig. 2. It starts from the generation of a linear cluster state.We begin with an experimentally feasible initial state (|00 + |11 ) |0 that is easily realizable on a photonic chip.By implementing a fusion operation on qubits 2 and 3 and playing postselection on the result, we achieve a three-qubit Greenberger-Horne-Zeilinger (GHZ) state |000 + |111 with a success probability of 50%.A Hadamard gate is then performed on qubits 2 and 3 to transfer the GHZ state into the form of |0 + + + |1 − − , which is a three-qubit linear cluster state.The three-photon state, which now encodes only three qubits, is further mapped into a higher-dimensional space of four waveg- |00 , |3 − → |11 , so that the final state is transformed into a five-qubit state with three photons, which is given by |L 5 = |0 In quantum error-correction code, the desired logical qubit encoded in a four-physical-qubit system [8] as where the subscripts L and 1, 2, 3, and 4 each denote logical-and physical-qubit indexes.
The two-photon four-qubit state is robust against singlequbit error.We will study how it works on quantum information reconstruction and error type detection.

III. EXPERIMENTAL SETUP
The quantum photonic chip used in this work is a fully integrated platform that includes resource preparation, information encoding, and state measurement.We use a silicon photonic chip to realize the control of qubits with structures such as grating couplers, waveguides, multimode interferometers (MMIs), and heaters.The pulsed laser is first coupled into the chip using grating-coupler structures with specially designed pitches and duty cycles for the TE mode of light and the waveguide cross-section size is designed for TE mode propagation only.The photon source is realized by pumping the spiral waveguides to induce nonlinearity of the silicon to generate a pair of photons in two modes with a four-wave mixing process.MMI is used to split a beam equally for further processing and heaters act as phase shifters to change the refractive index of the material and create a phase difference between the photons.Two MMIs and a phase shifter in between the MMI constitute a Mach-Zehnder interferometer (MZI), which can realize an arbitrary beam-splitting ratio and function as a single-qubit operator.
Three spiral-waveguide structures are coherently pumped with a 500-MHz 1550.116-nmpulse laser to generate a pair of signal (1554.134-nm)and idler (1546.119nm)photons.Qubits are encoded in a dual-rail scheme and we can demonstrate the error-correction scheme on chip with single-qubit operations and postselection-based entanglement.The photon then couples out of the chip with another grating coupler and goes through filters and wavelength division multiplexers (WDMs) to remove all the unwanted wavelengths.Finally, we detect these photons with a superconducting-nanowire single-photon-detector array and use a time tagger to process all the data.More details of the experimental setup and chip calibration can be found in Appendixes A and B.

IV. RESULTS
Our scheme starts from a three-qubit GHZ state.We first perform quantum tomography by measuring the real and imaginary parts of the density matrix, as seen in Figs.The fidelity is F = 0.852 ± 0.014.A residual phase is observed in the antidiagonal elements, possibly resulting from imperfect phase configuration and fabrication defects, which can be mitigated through phase compensation and future chip-design optimization.For an arbitrary single-qubit error at a given location, the encoded quantum information can be reconstructed from the remaining three qubits by applying specific Pauli matrices.Here, as an example, we consider the error at qubit 4: we first trace out the error qubit and leave the remaining three qubits in a mixed state as set α = 1, β = 0 as an example.The measured fidelity is F = 0.963 ± 0.028.

V. STATE RECONSTRUCTION FROM ERROR
We then perform Z measurement on qubit 3 and X measurement on qubit 2 to reconstruct the state from error.The states |A and |B can be written in the measurement basis as where H is the Hadamard gate and ) are eigenvectors for the Pauli-X matrix.Depending on the measurement outcomes of qubits 2 and 3, m 2 and m 3 , the final state can be concluded with a general expression and the density matrix becomes pure again as ρ = |ϕ ϕ|.Thus, the encoded qubit can be reconstructed from the error with feed-forward control on qubit 1.The same process can be applied to any arbitrary single-qubit error at a known location.
For reconstructing the encoded quantum information from the qubit error, we test different initial states ).These states are the eigenvectors for Pauli-X , -Y, and -Z operators.As seen from Eq. ( 3), |ψ 1234 is symmetric, so we need only consider the error at qubit 1 or 3. Suppose that the error happens at qubit 1: by tracing out the error qubit, the remaining three qubits would become a mixed state as described in Eq. ( 4).If the Z-and Xmeasurement results are m 2 = m 3 = 0, then the retrieved state from Eq. ( 5) is |ϕ = H (α |0 + β |1 ).The measured fidelities of states |ϕ for all different initial states are listed in Fig. 4. The blue bars represent errors at qubit 1 and the pink bars are for errors at qubit 3. The average fidelity for the reconstructed states is F = 0.863 ± 0.032.All 12 density matrices retrieved from the tomography process are plotted in Appendix C. In this quantum code, quantum information can be reconstructed from single-qubit errors; whereas, since the circuitry design encodes two qubits by a single photon, a photon loss event would result in the loss of both qubits and lead to the failure to reconstruct the initial state.

VI. STABILIZER FOR ERROR-TYPE IDENTIFICATION
Another interesting function of the scheme is to identify the qubit error type at a given location by measuring the stabilizers.If an operator S keeps the input state unchanged after performing on it or has an eigenvalue λ i = 1, this operator is called the stabilizer of the state.For state |ψ 1234 in Eq. (3), there exist three basic stabilizers [10]: If an error occurs in state |ψ 1234 , the expectation values of S i are different depending on the error type and their theoretical value can be seen from Table I.We list all four expectation values under the identity operator I and three basic error types X , Y, and Z, with the error-qubit location ranging from 1 to 4. The scheme can detect the presence of errors and identify the error type when the error location is known.Error types can be determined uniquely by mapping the stabilizer-measurement results to the error types using the look-up table (Table I).For example, if we are told that the error occurred at qubit 1 and that the measurements under stabilizers S 1 and S 3 are −1 and 1, then from Table I we can tell that the error type is X .Due to the symmetry of the encoded state |ψ 1234 , qubits 1 and 2 share one group of stabilizer-measurement results while qubits 3 and 4 share another.We can also note that S 2 has a constant value of 1 regardless of the error type at qubit 1 or 2, which can be explained by the fact that S 2 has no effect on the first two qubits and there is no entanglement between the first two qubits and the last two qubits in state |ψ 1234 .
The same analysis applies to the results for S 1 on qubits 3 and 4.
The error type at a given qubit position is identified by measuring the stabilizers (Table I).The three error types cause bit flip, phase change, or both.Experimentally, bit flip is realized by relabeling the waveguides and phase change is realized by modulating the integrated phase shifters.In Fig. 5, we study the case where an error arises at qubit 1, so that the stabilizers S 1 and S 3 detect the error type.All expectation values have the correct sign and absolute values above 0.8, proving that the stabilizer works efficiently to distinguish different error types.

VII. MBQC DEMONSTRATION
Finally, we extend the error-correction scheme to faulttolerant measurement-based quantum computing.The idea of MBQC is to teleport the quantum information by performing measurements on cluster states.The basic unit is a two-qubit cluster state |L 2 = 1/ √ 2(|0+ + |1− ).An arbitrary single-qubit operator acting on one qubit can be teleported to the other qubit by performing a Z-basis measurement on the first qubit and feed-forward control on the second qubit, the process of which can be expressed as U 1 |L 2 → HU 2 X m 1 |0 .Here, we demonstrate a faulttolerant MBQC that allows us to withdraw or repeat a teleportation process if the measurement fails due to some loss or error.The state in Eq. ( 1) is equivalent to a linear cluster state |L 5 under local unitary transform and the core idea of this fault-tolerance scheme is that performing a Z-basis measurement can remove the qubit from the linearcluster-state chain.Take the error at qubit 2, for instance, as shown in Fig. 1(a).We perform Z and X measurements on qubits 3 and 5 to obtain where U 2 denotes a single-qubit operator on qubit 2, X and Z are the Pauli matrices, and m 3 and m 5 are measured results for qubits 3 and 5 under a particular basis.By tracing out the error qubit 2 and feed-forwarding the measurement results m 3 and m 5 , the operation U 2 can be removed from the state and the remaining qubits 1 and 4 can always be cast into the form of |L 2 , which is the basic component for MBQC.Therefore, this errorcorrection scheme allows the computation process to be redone, should the qubit suffer any faults during computation.We reconstruct the two-qubit linear cluster state |L 2 at qubits 1 and 4 and 1 and 2 by simulating errors at qubits 2 and 4. The two density matrices are shown in Fig. 6 and the corresponding fidelities are F 14 = 0.852 ± 0.023 and F 12 = 0.833 ± 0.025.Furthermore, the initial two-qubit cluster state |L 2 can be mapped into a (2n + 1)-qubit star-shape cluster state as In this initial state, if the quantum teleportation fails, the qubit involved can be disentangled by Z measurement on the other qubit at the same branch and the operation will be repeated at the next branch until the teleportation succeeds; then, the unused branch can be removed by the Z measurement.As the star-shape fault-tolerant initial state contains n branches of copies, the teleportation can be done n times.Combination of the large-scale star-shape cluster with the stabilizer-pathfinding (SPF) method [35] would enable the continuous updating and generation of optimal loss-tolerant measurement patterns for teleportation upon state generation and measurement, which may provide an effective solution for quantum teleportation in linearoptical quantum computing platforms that are susceptible to qubit loss.In this section, a linear cluster is generated to encode a logical qubit and demonstrate MBQC in the case where one of the qubits (i.e., qubit 2) is faulty.In practice, it is also important to locate the specific qubit position at which the error occurs.Stabilizer measurements are usually utilized to locate the errors [36], such as in the case of five-qubit error-correction codes [37].A look-up table can then map the stabilizer-measurement results to the types and locations of the errors.

VIII. CONCLUSIONS
In this work, we have demonstrated an error-correction code for detecting and correcting single-qubit errors, and a proof-of-principle demonstration of measurementbased quantum computing, in the integrated photonic chip.The demonstrated stabilizer-based quantum errorcorrection codes are key components of fault-tolerant quantum computer architectures, which can in principle be scaled to a larger number of qubits.We experimentally achieve a high quantum information reconstruction fidelity and demonstrate the identification of error types by measuring a set of stabilizers.Factors limiting the Hong-Ou-Mandel (HOM) visibility and computation fidelities include photon-number impurity induced by multiphoton emissions and spectral impurity resulting from spectra correlations in the spontaneous four-wave mixing (SFWM) process.Losses do not degrade visibility but reduce the brightness of fourfold coincidences.Fabrication defects and inaccuracies during phase-shifter calibration and detection-efficiency calibration can also harm the fidelities.
In linear-optical circuitry, the creation of multiphoton cluster states is probabilistic, conditioned on the desired computational subspace, which is commonly referred to as postselection.Although it does not impede a proofof-principle implementation, the achievement of practical and scalable fault-tolerant quantum computing would ultimately require substantial breakthroughs in on-demand entangled photon sources, high-efficiency detectors, and advanced protocols that can restrict the probability of postselection independent of the computation size, such as the topological codes that can keep the size of resource states constant [38].
The integrated photonic chip is an intrinsically scalable and manufacturable platform that can manipulate qubits with high fidelity and low noise.It holds great prospects for building fault-tolerant quantum computers.Recently, fusion-based quantum computing has presented a new framework for fault-tolerant quantum computation [38], which utilizes small entangled resource states and projective entangling gates to prepare large-scale entanglement, offering significant architectural simplification and an enhanced scheme for integrated photonic chips on the path toward fault-tolerant quantum computing.

APPENDIX A: DETAILS OF EXPERIMENTAL SETUP
A microscope photograph of the real chip is shown in Fig. 7.The whole scale of the circuit is about 4.5 mm × 2.5 mm.The white wires and square pads are electric wires and contact metal pads to load the external signal onto the phase shifters to control the qubits.It is a fully integrated platform that includes resource preparation, information encoding, and state measurement.The silicon photonic chip is used to realize the control of qubits with structures such as grating couplers, waveguides, MMIs, and heaters.
The 500-MHz 1550.116-nmpulsed laser is first coupled into the chip using grating-coupler structures with specially designed pitches and duty cycles for the TE mode of light and the waveguide cross section is 220 nm × 500 nm for TE-mode propagation only.An MMI is used to equally split a beam into two paths for further processing and the heaters work as phase shifters to change the refractive index of the material, which creates the phase difference between the photons.Two MMIs with a phase shifter in between can form an MZI, which can realize an arbitrary beam-splitting ratio and function as a single-qubit operator.An on-chip single-photon source is realized by pumping the spiral waveguides to induce the nonlinearity properties of the silicon to generate a pair of signal (1555.747-nm,C27) and idler (1544.526-nm,C41) photons in two modes via the SFWM process.These two modes of photons are split by an asymmetric MZI into different waveguides, to form the dual-rail qubit.With single-qubit operations and postselection, the error-correction scheme can be demonstrated on chip.Then, the photon couples outside the chip with another grating coupler and is collected by the single-photon detector.

APPENDIX B: SYSTEM CALIBRATION
The spectra of the input pulsed laser (blue line) are shown in Fig. 8(a).The spectral full width at half maximum (FWHM) is 1.1 nm.To ensure better photon purity, a 100-GHz WDM device is added to select the C34 channel with a central wavelength at 1550.116 nm and a FWHM bandwidth of 0.5 nm to narrow down the line width (orange line).Another advantage is to suppress the background photon at the signal and idler channel.The input spectrum has an extinction ratio of 40 dB and the background is around −77 dBm.With the WDM added, the background light is suppressed to the noise level of the optical-spectrum analyzer and the extinction ratio is measured up to 100 dB.
The fiber grating coupler is also calibrated with a broadband laser, as seen in Fig. 8(b).First, the spectrum of the input laser (blue line) is measured and the laser is injected into a simple structure of two grating couplers and a short length of waveguide to measure the output spectra (orange line).As the length of the waveguide is only on the hundreds of micrometers level, its noise is negligible and the loss of the grating coupler is calibrated (yellow line).The center wavelength is at 1570 nm, with an optimal loss of 5 dB, and the loss at the working wavelength of 1550 nm is around 6 dB.
The spectra of the asymmetric Mach-Zehnder interferometer (AMZI) are shown in Fig. 8(c).By adjusting the optical path difference (OPD), it functions as a filter to select different wavelengths from two ports.Its free spectral range is 22.4 nm, which is 28 WDM channels, and the extinction ratio is over 25 dB.The signal-and idler-photon wavelengths are designed accordingly, with a separation of 11.2 nm, exactly half of the free spectral range.By tuning the heater current at one arm of the AMZI to adjust the temperature, the refractive index of the silicon waveguide is changed and induces the OPD to shift.The wavelength is adjusted to match the designed WDM channel so that the signal and idler wavelengths fall at the peaks and valleys of the spectra, which corresponds to the two output ports of the AMZI, to realize the separation of two photons.
The HOM-effect interference is measured to characterize the indistinguishability of the photon source.Two signal photons from different spiral structures are merged into an MZI to perform the interference.Two idler photons are coupled into detectors directly, to function as triggers of the signal photons.By tuning the phase difference of the photon at two arms from 0 to π , the four-photon coincidence count fringe is observed to change from peak to valley and back to peak, as seen in Fig. 8(d).The blue dots are measured results and the dashed line is the fitting function.The HOM interference visibility is 0.885 ± 0.046.

APPENDIX C: RECONSTRUCTED STATES
In the quantum information reconstruction part of the process, the detailed density matrices for error at qubits 1 and 3 are shown in Figs. 9 and 10, with the fidelities listed below each density matrix.The colored bars are measured results and the transparent bars are theoretical results.

APPENDIX D: SYSTEM EFFICIENCY
This work has utilized standard integrated photonic components, including grating couplers, spiral waveguides for single-photon emission, AMZIs, MZIs with MMI couplers, and tunable heaters.They are connected in specific ways to realize the probabilistic Bell-state generation, GHZ-state generation, the encoding of qubits to highdimensional qudits, and quantum state tomography.The loss of all the components in the system is calibrated, as summarized in Table II.The entire loss of the system is 16.1 dB, which corresponds to a system efficiency of 2.47% and a fourfold-coincident count level of approximately 30 counts/h.

APPENDIX E: MEASUREMENT OF EXPECTATION VALUES
For a d-dimensional single-qudit observable operator U, which is a Hermitian operator, the state |ψ can be measured under the eigenvectors |v i of U to calculate the expectation value.Due to the Hermitian property, there is always a real eigenvalue λ i for its eigenvector |v i .The operator U can be expressed as and the expectation value can be expressed as Then, the eigenvector basis |v i will be transformed to the qudit basis |i through a basis transformation T, which is defined as T = d i=0 |i v i |.Thus, the expectation value U can be written as U = d−1 i=0 λ i | i| Tψ | 2 .In the experiment, a rotation matrix T is performed after the state ψ and then it is measured under qudit basis ψ to calculate the expectation values.
Taking the calculation of stabilizer S 3 = X 1 ⊗ X 2 ⊗ X 3 ⊗ X 4 as an example, the eigensystem of operator X is calculated as λ 0 = 1, |v 0 = 1/ The stabilizer is now expanded by 16 terms of four-qubit operator combinations and its expectation value under the state |ψ can be given by To calculate the expectation value, each term in the computational basis {|i, j , k, l } is measured and the corresponding basis transform matrix T is given by T = (|0 v 0 | + |1 v 1 |) ⊗4 = H ⊗4 , where H = 1/ √ 2 1 1 1 −1 .Thus, the expectation value is further transformed to S 3 = then the expectation value is calculated as S 3 =

FIG. 1 .
FIG. 1.The principle of measurement-based quantum computing.(a) A schematic of fault-tolerant MBQC.If the teleportation succeeds, the remaining qubit can be disentangled from the state by measurements.If the teleportation fails, the faulty qubit can be removed and another |0+ + |1− state can be initialized to reperform the teleportation.(b) The graph representation for the star-shape cluster state that allows multiple attempts at teleportation.
3(a) and 3(b).The colored bars are the measured density matrix and the transparent bars are the theoretical results.

whereFIG. 3 .
FIG. 3. The (a),(c) real and (b),(d) imaginary parts of the density matrix of (a),(b) the GHZ state for initial state preparation and (c),(d) the mixed state during quantum state reconstruction, with α = 1, β = 0.The experimental (theoretical) parts are represented by the colored (transparent) bars, respectively.

FIG. 4 .
FIG. 4. The measured fidelities for the reconstructed states.The blue bars E 1 are for error at qubit 1 and the pink bars E 3 are for error at qubit 3.

FIG. 9 .
FIG. 9.The real and imaginary parts of the density matrices of the reconstructed state for error at qubit 1 with the initial state as H , V, D, A, R, L. The colored bars are for measured data and the transparent bars are for theoretical data.The corresponding fidelities of the states are as follows: (a) F H = 0.826 ± 0.029; (b) F V = 0.915 ± 0.053; (c) F D = 0.882 ± 0.021; (d) F A = 0.882 ± 0.022; (e) F R = 0.843 ± 0.037; (f) F L = 0.821 ± 0.036.

1 iFIG. 10 .
FIG. 10.The real and imaginary parts of the density matrices of the reconstructed state for error at qubit 3, with the initial state as H , V, D, A, R, L. The colored bars are for measured data and the transparent bars are for theoretical data.The corresponding fidelities of the states are as follows: (a) F H = 0.789 ± 0.028; (b) F V = 0.958 ± 0.039; (c) F D = 0.816 ± 0.0260; (d) F A = 0.858 ± 0.020; (e) F R = 0.898 ± 0.037; (f) F L = 0.871 ± 0.037.
FIG. 2. A schematic diagram of the error-correction implementation in a photonic chip.The entire chip accomplishes the functionalities of I, initial state generation; II, quantum information encoding; III, generation of the postselected GHZ state; IV, encoding to high dimensions; and V, unitary transformations and quantum state tomography. of state |L 5 and then a Z-basis measurement to teleport information to the remaining four physical qubits.When the measurement result is |0 on qubit 1, we obtain the encoded state α |φ + 23 φ + 45 + β |φ − 23 φ − 45 .For convenience, we relabel the subscripts to match |ψ L as

TABLE I .
The expectation values of the stabilizers.

TABLE II .
The loss summary of the error-correction circuit.