Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# A programmable qudit-based quantum processor

## Abstract

Controlling and programming quantum devices to process quantum information by the unit of quantum dit, i.e., qudit, provides the possibilities for noise-resilient quantum communications, delicate quantum molecular simulations, and efficient quantum computations, showing great potential to enhance the capabilities of qubit-based quantum technologies. Here, we report a programmable qudit-based quantum processor in silicon-photonic integrated circuits and demonstrate its enhancement of quantum computational parallelism. The processor monolithically integrates all the key functionalities and capabilities of initialisation, manipulation, and measurement of the two quantum quart (ququart) states and multi-value quantum-controlled logic gates with high-level fidelities. By reprogramming the configuration of the processor, we implemented the most basic quantum Fourier transform algorithms, all in quaternary, to benchmark the enhancement of quantum parallelism using qudits, which include generalised Deutsch-Jozsa and Bernstein-Vazirani algorithms, quaternary phase estimation and fast factorization algorithms. The monolithic integration and high programmability have allowed the implementations of more than one million high-fidelity preparations, operations and projections of qudit states in the processor. Our work shows an integrated photonic quantum technology for qudit-based quantum computing with enhanced capacity, accuracy, and efficiency, which could lead to the acceleration of building a large-scale quantum computer.

## Introduction

Natural quantum matters store rich multidimensional quantum information in a superposition of more than two electronic or mechanical modes. Engineering artificial multilevel quantum devices to mimic nature may allow fundamental innovations and technological advances. Recently, though the state-of-the-art qubit-based quantum technologies have demonstrated revolutionary milestones, e.g., loophole-free Bell tests1,2, satellite-relayed quantum communications3,4 and quantum computational advantages5,6, qudit-based quantum technologies might be able to further enhance quantum capabilities as they are intrinsically consistent with our natural quantum systems. For example, entangled qudit states can strengthen the Bell nonlocality7 and moderate the detection loophole8; distributing qudit states allows high-capacity noise-resilient quantum cryptography9,10,11; by mapping Hamiltonians into multilevel quantum devices, it can provide a direct solution for quantum simulations of complex molecular and physical systems12,13,14,15,16; more importantly, universal quantum computation with qudits is possible in both of the circuit models17 and measurement-based models18,19, requires less resource overhead in quantum error correction20,21, and can improve the execution of quantum algorithms22,23. Heuristically, the exponential speed-up of many quantum algorithms is enabled by the quantum parallel evaluation of a function f(x) for all input x values simultaneously, as $${\sum }_{x}\left|x\right\rangle \left|f(x)\right\rangle$$, where the x input string is represented by a superposition of quantum states. The adoption of qudit as the basic quantum information unit in processing quantum algorithms24 offers enhanced computational capacity that is represented by the size of the Hilbert space of dn, where n is the number of qudits and d is the local size of each qudit. Moreover, it can lead to higher computational accuracy for example in implementing quantum Fourier transform algorithms such as Shor’s fast factorisation25 and phase estimation26, in which the computational accuracy is determined by the size of auxiliary qudits. Processing the Kitaev’s version of quantum Fourier algorithms26,27,28,29 with qudits may allow further speed-up of quantum computing. These unique capabilities have strongly prompted the development of qudit-based quantum computing in universal models17,18,19,30,31, and very recently in experimental controls of qudit states and logic gates in photonics32, solid-state15, trapped ion33, and superconducting34 platforms. In particular, photons are intrinsically multidimensional35, enabling flexible and reliable encoding of qudits with their different degrees-of-freedom, e.g, path36,37, frequency38,39, spatial mode40,41 and temporal mode11,42. Advances in the control of quantum photonic devices have recently allowed remarkable experimental progress. For example, multidimensional Greenberger-Horne-Zeilinger (GHZ) states and cluster states prepared in the frequency-bins and time-bins of two photons generated in a single microring resonator43,44, have firstly shown enhancement in quantum computation by providing increased quantum resources and higher noise robustness compared to the qubit counterparts; An integrated photonic chip for the generation, manipulation and measurement of two-photon multidimensional Bell states has been demonstrated36, while the scaling capability has been verified by the generation of multiphoton multidimensional GHZ states45,46, and the realisation of single-qudit quantum teleportation47,48. Despite of these remarkable development of multidimensional quantum photonic technologies that mainly focus on the preparation and control of qudit states and gates, a monolithically integrated quantum device that is able to initialise, manipulate and analyze qudit states and gates is lacking. Furthermore, the programmability of quantum hardware presents the major enabling capability of quantum computing technologies. For example, several milestones in qubit-based quantum computing have been all realised in programmable quantum devices of photons49,50, trapped ions51,52, superconductors5,6 and semiconductors53. However, limited to the best to our knowledge, such a qudit-based quantum computing device that can be fully reconfigured and reprogrammed to implement different tasks has not been realised to date, in any quantum system. Likely, it requires an integrated platform35,54,55, capable of initialising, manipulating and measuring qudit states and gates, in a fully controllable and highly programmable manner. Realising a programmable qudit-based quantum processor therefore presents a significant step to transition the technological advances of controlling qudit states and logic gates to the implementations of quantum tasks and quantum computational algorithms, in d-ary.

In this work, we demonstrate a programmable qudit-based quantum processing unit (d-QPU) on a large-scale silicon-photonic quantum chip. The initialisation, manipulation and measurement of arbitrary single-qudit and two-qudit states, and multi-value quantum-controlled logic gates can be implemented on the single d-QPU chip. Such a fully monolithic integration of all necessary functionalities allows the implementation of a top-down hierarchy of programmable qudit-based quantum computation, as shown in Fig. 1. Different quantum tasks and computational algorithms are implemented, all in quaternary, by recompiling the qudit logic circuit in the software level, and then executing the circuit by reprograming the configurations of the d-QPU chip in the hardware level. We then benchmark the enhancement of quantum computational parallelism, by performing the generalised Deutsch-Jozsa and Bernstein-Vazirani algorithms, quaternary phase estimation and order finding algorithms. Our results show a proof-of-principle demonstration of qudit-based quantum computer with integrated optics, that allows improvement of the capacity, accuracy and efficiency of quantum computing.

## Results

### Scheme of multiqudit quantum processor

Figure 2 shows the core of a multiqudit processor, i.e, the multiqudit multi-value controlled logic gate, which is realised by the following three steps: generation of the multiphoton multidimensional Greenberger-Horne-Zeilinger entangled state $${\left|{{\mbox{GHZ}}}\right\rangle }_{n+1,d}$$45,46, which enables the entangling operations between the multiqudit states; Hilbert space expansion of each qudit in y-register to form an entire space of d2n, that locally allows individual and arbitrary single-qudit operations56; coherent compression of the entire state back to a dn space57. These sequences of operations result in a multiqudit multi-value controlled-unitary (MVCU) gate as $$\frac{1}{\sqrt{d}}\mathop{\sum }\nolimits_{j = 0}^{d-1}\left|{k}_{j}\right\rangle \otimes \mathop{\prod }\nolimits_{i = 1}^{n}{O}_{i,j}{\left|\phi \right\rangle }_{i}$$, where $$\left|{k}_{j}\right\rangle$$ in the auxiliary x-register presents the logical state in the j-th mode (for simplicity it is denoted as $$\left|j\right\rangle$$), and Oi,j in the data y-register refers to an arbitrary local operation on the qudit state $${\left|\phi \right\rangle }_{i}$$ that is initialised by the Pi qudit generator. Such multiqudit MVCU gate works with a (1/d) success probability regardless of n (see Supplementary Note 3 and Supplementary Fig. 1). The quantum circuits in Fig. 2a, b provide a scheme of implementing multiqudit quantum Fourier algorithms in the scalable Kitaev’s framework26,27,28,29.

Figure 2c illustrates the integrated photonic quantum circuits for a two-ququart version of qudit-based quantum processing unit (d-QPU). It was fabricated in silicon using the complementary metal-oxide-semiconductor (CMOS) process with the 248nm deep ultraviolet lithography (see a device image in Fig. 2d). The processor allows the generation of a path-encoded two-ququart entangled state of $${\left|{{\mbox{GHZ}}}\right\rangle }_{2,4}$$ (i.e., the 4-dimensional generalised Bell state of $${\left|{{\mbox{Bell}}}\right\rangle }_{4}$$), by a coherent excitation of four integrated spontaneous four-wave-mixing (SFWM) sources. It is followed by the sequences of processes of “space expansion–local operation–coherent compression" for the realisation of d-QPU, see Fig. 2b. The d-QPU chip monolithically integrates the core capabilities and functionalities, including arbitrary single-ququart preparation (P), arbitrary two-ququart MVCU operation (that presents a d-ary generalisation of two-qubit controlled-unitary operation), and arbitrary single-ququart measurement (M). Though on-chip generation, manipulation and measurement of entangled qudit states have been reported36, this work demonstrate the key abilities to initialize, manipulate, and analyze qudit states and gates in a fully reconfigurable and reprogrammable manner, providing a major technological advance for qudit quantum computing. In Fig. 2d it shows one of the largest-scale programmable quantum photonic chip having 451 photonic components, including 116 reconfigurable phase-shifters (see their characterisations in Fig. 2c insets). The two-photons detection rate at the magnitude of 103/s was measured in the two-ququart device, which is six orders higher than that in a four-qubit device (note the detection rate depends on the performance and loss of the quantum devices as well as their pumping and measurement apparatuses)58. Details of device fabrication, state evolution and experimental setup are provided in Supplementary Notes 1 and 3.

### Characterisation of d-ary multi-value controlled-unitary gates

Before reporting experimental results, we first define classical statistic fidelity (Fc) and quantum state (process) fidelity (Fq), used in this work to quantify the qudit states, logic gates and algorithm implementations. The Fc is defined as $${({\sum }_{i}\sqrt{{p}_{i}{q}_{i}})}^{2}$$, where pi, qi are theoretical and measured distributions, respectively; the state Fq is defined as $${({{\mbox{Tr}}}[\sqrt{\sqrt{{\rho }_{0}}\cdot \rho \cdot \sqrt{{\rho }_{0}}}])}^{2}$$, where ρ0, ρ are ideal and measured states, respectively; the process Fq is defined as Tr[χ0χ], where χ0, χ are ideal and reconstructed process matrices, respectively.

We first characterised the single-ququart and two-ququart logic gates. As examples, two single-ququart gates are characterised: the generalised d-level Pauli-Xd gate that is defined as $${X}_{d}\left|{k}_{i}\right\rangle =\left|{k}_{(i{\oplus }_{d}1)}\right\rangle$$ where d is addition module of d, and the d-level quantum Fourier gate Fd that transforms the computational basis of $$\left|{k}_{i}\right\rangle$$ to the Fourier basis $$\left|{f}_{i}\right\rangle$$ of $$\frac{1}{\sqrt{d}}\mathop{\sum }\nolimits_{j = 0}^{d-1}{\omega }^{ij}\left|j\right\rangle$$ where i, jNd and ω = $$\,{{\mbox{exp}}}\,({\mathbb{i}}\frac{2\pi }{d})$$. When d is two, they return to the standard Pauli and Fourier (Hadamard) gates for qubits. In Fig. 2c inset, it shows the measured mean Fc of 0.988(13) for the five X4 gates and 0.967(19) for the five F4 gates, where the values in parentheses are uncertainty from photon statistics. Next, we characterised the two-qudit entangling gate:

$$\,{{\mbox{MVCU}}}\,\left|x\right\rangle \left|y\right\rangle =\left|x\right\rangle {O}^{x}\left|y\right\rangle ,$$
(1)

where O can be arbitrarily operated59 on the $$\left|x\right\rangle$$ and $$\left|y\right\rangle$$ registers. Notably, the MVCU gate presents a coherent entanglement between the auxiliary x-register and the data y-register. The processing of d-ary quantum algorithms relies on the multiple path interference in the d-dimensional Fourier gate to obtain the desired solutions. Such coherent superposition of qudits ensures quantum parallelism, that is function evaluations for multiple inputs are executed in parallel. The MVCU is thus a core logic enabling the quantum parallel evaluation of the function. For example, as the d-ary generalisation of the CNOT gate24, the MVCXd gate allows the creation of a complete set of four-level Bell states $${\left|{{\Psi }}\right\rangle }_{i,j}$$ defined as $$\frac{1}{2}\mathop{\sum }\nolimits_{m = 0}^{3}{\omega }^{mi}\left|m\right\rangle \left|m{\oplus }_{d}j\right\rangle$$, by inputing the $$\left|{f}_{i}\right\rangle \otimes \left|{k}_{j}\right\rangle$$ states into the logic, i, j = 0,1,2,3. Figure 3a shows the reconstructed $${\left|{{\Psi }}\right\rangle }_{12}$$ state, and Fig. 3c shows measured Fq for the 16 Bell states with an averaged fidelity of 0.967(31). The state matrices (ρ) represented as a linear combination of Gell-Mann matrices were reconstructed by implementing compressed sensing quantum state tomography techniques60. In addition, a fully product state was created in Fig. 3b, given an input of $$\left|{f}_{0}{f}_{0}\right\rangle$$. Figure 3d shows the experimental process matrix (χ) of the MVCXd gate, by performing quantum process tomography with a full set of 256 state tomographic measurements61, and a process fidelity Fq of 0.952 was obtained. We then characterised the MVCZd gate (Zd is the generalised d-level Pauli-Zd gate) transforming $$\left|x\right\rangle \left|y\right\rangle$$ to $$\left|x\right\rangle {\omega }^{xy}\left|y\right\rangle$$, and the MVCHd gate where Hd is the d-level Hadamard gate with elements of $$\frac{1}{\sqrt{d}}{(-1)}^{i\odot j}$$ (ij is the bitwise dot product, see Supplementary Note 2). Instead of performing full process tomography, we adopted an efficient characterisation by using complementary classical fidelity62. Figure 3e–j show measured input-output truth tables and their classical fidelity (Fc1, Fc2) for the MVCU in two complementary {base I, base II}, from which the complementary classical fidelity is upper and lower bounded by [Fc1 + Fc2 − 1, Min(Fc1, Fc2)].

### Experimental implementation of d-ary Deutsch’s algorithms

The class of Deutsch’s algorithms well identify quantum parallelism. A generalised d-ary Deutsch-Jozsa algorithm can determine whether a multi-value function f: {0, 1,..., d−1}n → {0, 1,..., d − 1} is constant or balanced by a single query of a quantum oracle63. Classically, it however requires dn−1 + 1 queries. The quantum circuit performing f(x) dy is shown in Fig. 4a. In the case of d = 2, it returns to the original binary Deutsch-Jozsa64. We implemented the ququart Deutsch-Jozsa algorithm on the d-QPU for the case of n = 1 and d = 4. Figure 4b–h show the measured probability distributions of the x-register in the computational basis, when the multi-value function is chosen as constant (see Fig. 4b) and balanced (see Fig. 4c–h), respectively. The d-QPU thus determines whether f is constant or balanced, and the fidelity Fc of 0.967(2) was measured to quantify its success probability. Notably, the measured distributions in Fig. 4b, c, h, i are fully distinguishable. These imply an interesting capability of computing a close expression for an affine function f: A0A1x1 . . . Anxn. That presents the d-ary generalisation of the Bernstein-Vazirani algorithm65, whose task is to compute the d-ary coefficients Ai. The output state of the x register can be derived as $${\omega }^{-{A}_{0}}\left|{A}_{1},{A}_{2},...,{A}_{n}\right\rangle$$, where the $$\left|{A}_{1},{A}_{2},...,{A}_{n}\right\rangle$$ state can be directly read out in its computational basis (A0 is lost as a global phase).

From the experimental results in Fig. 4b, c, h, i one can therefore determine the multi-value function with A1= {0, 1, 2, 3}, respectively, by a single query of the oracle. Details of the generalisation of the Deutsch’s algorithms are provided in Supplementary Note 4.

### Benchmarking of d-ary phase estimation and order finding

Quantum phase estimation and order finding are two of the most featured quantum Fourier transform ralgorithms, that are essential to molecular simulation66 and fast factorisation25. Kitaev’s scalable implementation of both algorithms (in binary)26,27,28,29 has been reported in several leading quantum platforms67,68,69,70,71,72. The remarkable idea is to replace the 2n qubits by a single qubit in the auxiliary x-register, but at the expense of repeating m-sequences of single-qubit measurement and single-qubit feedforwarded operation, see quantum circuits in Fig. 5a. In Kitaev’s phase estimation and order-finding algorithms, the computational capacity is determined by the number of n-qubits in the y-register, and the computational accuracy is determined by the number of m-sequences in the x-register. In this respect, one can see processing quantum algorithms with qudits results in nontrivial advantages: a log2(d) larger computational capacity, and log2(d) higher computational accuracy or log2(d)-less computational steps to achieving the same precision, as shown in Supplementary Fig. 3b, which could be important to quantum computers with limited coherence time.

In the quantum phase estimation, we aim to compute the eigenphase ϕ of an unitary as $$O\left|\psi \right\rangle$$=$${e}^{{\mathbb{i}}2\pi \phi }\left|\psi \right\rangle$$, given the eigenstate of $$\left|\psi \right\rangle$$. The eigenphase of ϕ can be described in d-ary as 0. ϕ1ϕ2ϕm−1ϕm, where m denotes iterative steps determining the approximation accuracy26,29, and each dit of the phase is in [0, 1,..., d − 1]67,69,73. We take the s-th step as an example (see quantum circuit in Fig. 5a). We prepare an input state of $$\frac{1}{\sqrt{d}}\mathop{\sum }\nolimits_{j = 0}^{d-1}\left|j\right\rangle \left|\psi \right\rangle$$ and perform the MVCU gate, that results in a state of $$\frac{1}{\sqrt{d}}\mathop{\sum }\nolimits_{j = 0}^{d-1}{e}^{{\mathbb{i}}j2\pi (0.{\phi }_{s}{\phi }_{s+1}...{\phi }_{m})}\left|j\right\rangle \left|\psi\right\rangle$$. Then, the x-register qudit state is feed-forwardly rotated around the Pauli Zd basis as diag[$$1,{e}^{{\mathbb{i}}2\pi {\theta }_{s}},...,{e}^{{\mathbb{i}}2\pi (d-1){\theta }_{s}}$$], where the rotation angle θs of − 0.0ϕs+1ϕs+2ϕm is given by previous measurement outcomes. Remarkably, implementing an inverse Fd in the x-register returns an output state as $${\left|{\phi }_{s}\right\rangle }_{}=\left|s\right\rangle$$ (see Supplementary Note 5). Measuring the x-register in the computational basis of $$\left|s\right\rangle$$ therefore allows the extraction of the s-th dit of the dit expansion. The algorithm iteratively computes all m dits of the eigenphase backwardly, in which, notably, each dit is once estimated with d-ary accuracy. Figure 5b–d report measured eigenphases of 4-dimensional unitary matrices by quaternary phase estimation. We estimated the four eigenphases for three logic gates, i.e., a phase gate Z4, a Fourier gate F4 and a randomised gate Urandom (see their explicit forms in Supplementary). Each pie chart presents one dit measurement outcomes, and the area of each coloured sector denotes measured probability distributions in the computational basis of {$$\left|0\right\rangle$$,$$\left|1\right\rangle$$,$$\left|2\right\rangle$$,$$\left|3\right\rangle$$}, respectively. In Fig. 5b, c, the eigenphases of Z4 and F4 gates can be described by a single dit. Figure 5d shows the computed eigenphases of the Urandom gate with an accuracy of 12 dits, by running the algorithm with a number of 12 interactions on the d-QPU. Instead, in the qubit-based device, achieving the same computational accuracy of ± 4−12 requires a number of 24 computational interactions. And the achieved computational accuracies of 12 quarts are sufficient for the calculation of molecular eigen-energies67,69. In Fig. 5, it shows experimental data are in good agreement with theoretical predictions (indicated under each pie).

The task of quantum factoring is to efficiently compute the prime factors p and q from an integer N25. It can be reduced to the task of finding the order r of a module N, i.e., by computing a function f: armodN = 1 (a is a co-prime of N), and with a high probability it returns a factor as gcd(ar/2 ± 1, N), where gcd(α, β) refers to the greatest common divisor of α and β. As the order-finding is just the phase estimation of a unitary having the eigenphases of s/r, s [0, r − 1], one can directly adopt the d-ary phase estimation to determine the order of r in the d-ary format. It can be considered as a generalisation of d-ary order-finding by adopting Kiteav’s iterative techniques70,71,72 (see details in Supplementary Note 6). We then reprogrammed the d-QPU to implement the order-finding in quaternary. The a [0, r − 1] satisfying gcd(a, 15) = 1 is randomly chosen. We chose a = 4 and 2 as examples, and set the unitary of the MVCU gate as {Id, Xd, Id, Xd} and $$\{{I}_{d},{X}_{d},{X}_{d}^{2},{X}_{d}^{3}\}$$, respectively, where Id is the d-mode identity. In our experiment, the order-finding algorithm was iteratively implemented by three steps, and each step returns quaternary outcomes in the computational basis, resulting in the 3-quart (64-level) computational accuracy of the s/r eigenphase. Figure 5e, f show the measured output probabilities of the x-register in the computational basis of $$\left|ijk\right\rangle$$, i, j, k = 0, 1, 2, 3. Classical statistic fidelities Fc of 0.909(9) and 0.922(9) were obtained in comparison with theoretical distributions, showing successful estimations of the order of r = 2 (Fig. 5e) and r = 4 (Fig. 5f), respectively. The d-QPU thus finds the order with double-enhanced computational accuracy; alternatively speaking, it executes the task twice faster than a qubit-QPU, given the same estimation precision. The order-finding algorithm together with classical processing using the continued fraction algorithm returns the factor of gcd(ar/2 ± 1, N) = (3, 5). Implementing the d-ary algorithms in the d-QPU can therefore find the order of a function and compute the eigenphase of a unitary, with a log2(d)-faster computational speed.

## Discussion

We have reported a proof-of-principle experimental demonstration of a programmable qudit-based quantum processor in photonic integrated circuits, and implementations of several generalised d-ary quantum Fourier transform algorithms in the d-QPU chip. In agreement with the references17,18,19,24,43,44,45,46, our experimental results show that qudit-based quantum computation with integrated photonics can enhance quantum parallelism in terms of the computational capacity, accuracy and efficiency, in comparison with its qubit-based quantum computing counterpart. The computational capacity of the two ququart quantum processor is equivalent to that of a four-qubit processor, thus allowing the implementations of the Deutsch’s algorithms for a function with longer-string. Keeping the same number of photons n but encoding each qudit in a dimension d, not only gives a larger Hilbert space74, but also significantly improve the detection rate of photons43,44. We obtained the detection rate of about 6 orders brighter than that in another device with the same Hilbert space58. More analysis is provided in Supplementary Fig. 3. Moreover, multiple parallel evaluations of the function and multiple path interference in the d-ary quantum Fourier gate, allow the enhancement of the computational efficiency and speed up of the determination of desired solutions. In the implementations of Kitaev’s phase estimation and factorisation, a number of log2(d)-less iterations are needed in the qudit processor, i.e., a log2(d) times speed up of quantum computation, compared with the qubit ones, given the same computational accuracy (see Supplementary Fig. 3b).

As the multi-value quantum controlled gates are the result of the entanglement in the generation stage and the gates are instead local operations that steer the state to collapse in the desired outputs, our scheme can be straightforwardly generalised to multi-qudit quantum computiation. Its scalability is naively dependent on the number (n) of qudits and the dimensionality (d) of each qudit. Regarding the dimension of units, though the ququart states are implemented as an example in this work, it is straightforward to extend to a larger-d device36, which can be fabricated using the same CMOS fabrication techniques. Remarkably, this entanglement-assisted d-QPU scheme works with a success probability of 1/d regardless of n (Supplementary Note 3). The scaling of d-QPU therefore strongly relies on the generation of the qudit GHZ entangled states. Combing the state-of-the-art technologies, including the techniques of generating multi-photon qudit GHZ states45,46, on-chip high-fidelity control of qudit states36, high-quality photon-pair sources75,76, low-loss fibre-chip interface75,77, and large-scale quantum integration57, we estimate a 10-photons d-QPU is achievable in near term. Its further scaling requires high-efficiency heralded multiplexing photon-pairs sources78 and multiplexing qudit GHZ generators31. That being said, given the efficient generation of the multi-photon multi-qudit GHZ states, the d-QPU scheme is scalable. Calculations and analysis are provided in Supplementary Note 9 and Supplementary Fig. 3d. Moreover, when scaling up the d-QPU, an interesting concern is the required resources, in particular the number of classical controls. As an example, let us consider a processor with one qudit in the auxiliary register and n qudits in the data register (see Fig. 2a). It requires a number of (n + 1) single-qudit generators for state preparation, (nd) local single-qudit operators for multi-qudit MVCU operation, and (dn + 1) single-qudit projectors. The physical resources, i.e, the number of phase-shifters, scale with (d2 − d) for the qudit operators50,59, and 2(d − 1) for the qudit generators and projectors36, as shown in Supplementary Note 9 and Supplementary Fig. 2. Importantly, the required resources for classical controls scale polynomially with the number of particles. In Supplementary Fig. 3c, it is shown that thousands of phase-shifters are required for a 10-photon d-QPU. This large amount of phase-shifters can be individually addressed and controlled, by using a co-integration technology of photonic and electronic circuits in silicon.

The highly flexible and reliable programmability of the qudit processor, that is enabled by technological advances in a monolithic integration of all key functionalities and capabilities in a silicon chip, has allowed the implementations of more than one million qudit generators, operators and projectors (see Supplementary Note 8), and also the benchmarking of different generalised quantum algorithms. Such programmability can transition the advanced technologies in controlling qudit states and gates36,37,38,39,40,41,42,43,44,45,46,47,48 to algorithm implementations, playing an enabling role in the roadmap of qudit-based quantum computations. The full chip-scale integration technologies also perfectly match the top-down hierarchy of quantum computing, in which users can define and execute multiple quantum tasks by recompiling the software and reprogramming the quantum hardware. In general, the programmable qudit-based quantum devices can find applications in noise-resilient quantum network9,10, quantum simulation of complex chemical and physical systems12,13,14,15, and universal quantum computing with qudit cluster states19,20,21.

## Data availability

The data that support the plots within this paper and other findings of this study are available from the corresponding author upon reasonable request.

## Code availability

The codes used for the analysis included in the current study are available from the corresponding authors upon reasonable request.

## References

1. Giustina, M. et al. Significant-loophole-free test of bell’s theorem with entangled photons. Phys. Rev. Lett. 115, 250401 (2015).

2. Shalm, L. K. et al. Strong loophole-free test of local realism. Phys. Rev. Lett. 115, 250402 (2015).

3. Liao, S. K. et al. Satellite-to-ground quantum key distribution. Nature 549, 43–47 (2017).

4. Liao, S. K. et al. Satellite-relayed intercontinental quantum network. Phys. Rev. Lett. 120, 030501 (2018).

5. Arute, F. et al. Quantum supremacy using a programmable superconducting processor. Nature 574, 505–510 (2019).

6. Wu, Y. et al. Strong quantum computational advantage using a superconducting quantum processor. Phys. Rev. Lett. 127, 180501 (2021).

7. Collins, D. et al. Bell inequalities for arbitrarily high-dimensional systems. Phys. Rev. Lett. 88, 040404 (2002).

8. Vértesi, T., Pironio, S. & Brunner, N. Closing the detection loophole in bell experiments using qudits. Phys. Rev. Lett. 104, 060401 (2010).

9. Cerf, N. J. et al. Security of quantum key distribution using d-level systems. Phys. Rev. Lett. 88, 127902 (2002).

10. Bouchard, F. et al. High-dimensional quantum cloning and applications to quantum hacking. Sci. Adv. 3, e1601915 (2017).

11. Islam, N. T. et al. Provably secure and high-rate quantum key distribution with time-bin qudits. Sci. Adv. 3, e1701491 (2017).

12. Kaltenbaek, R. et al. Optical one-way quantum computing with a simulated valence-bond solid. Nat. Phys. 6, 850–854 (2010).

13. Neeley, M. et al. Emulation of a quantum spin with a superconducting phase qudit. Science 325, 722–725 (2009).

14. Blok, M. S. et al. Quantum information scrambling on a superconducting qutrit processor. Phys. Rev. X. 11, 021010 (2021).

15. Choi, S. et al. Observation of discrete time-crystalline order in a disordered dipolar many-body system. Nature 543, 221–225 (2017).

16. Wei, S. & Long, G. Duality quantum computer and the efficient quantum simulations. Quant. Inf. Process. 15, 1189–1212 (2016).

17. Luo, M. & Wang, X. Universal quantum computation with qudits. Sci. China Phys. Mech. 57, 1712–1717 (2014).

18. Zhou, D. L. et al. Quantum computation based on d-level cluster state. Phys. Rev. A. 68, 062303 (2003).

19. Wei, T. C., Affleck, I. & Raussendorf, R. Affleck-kennedy-lieb-tasaki state on a honeycomb lattice is a universal quantum computational resource. Phys. Rev. Lett. 106, 070501 (2011).

20. Campbell, E. T. Enhanced fault-tolerant quantum computing in d-level systems. Phys. Rev. Lett. 113, 230501 (2014).

21. Bocharov, A., Roetteler, M. & Svore, K. M. Factoring with qutrits: Shor’s algorithm on ternary and metaplectic quantum architectures. Phys. Rev. A. 96, 012306 (2017).

22. Gokhale, P. et al. Asymptotic improvements to quantum circuits via qutrits. In Proceedings of the 46th International Symposium on Computer Architecture, 554-566 (2019).

23. Wang, D. S., Stephen, D. T. & Raussendorf, R. Qudit quantum computation on matrix product states with global symmetry. Phys. Rev. A. 95, 032312 (2017).

24. Wang, Y. et al. Qudits and high-dimensional quantum computing. Front. Phys. 8, 479 (2020).

25. Shor, P. W. Algorithms for quantum computation: Discrete logarithms and factoring. Proc. 35nd Annual Symposium on Foundations of Computer Science, IEEE Computer Society Press (1994).

26. Kitaev., A. Y. Quantum measurements and the abelian stabilizer problem. Electronic Colloquium on Computational Complexity. 3 (1996).

27. Griffiths, R. B. & Niu, C. S. Semiclassical fourier transform for quantum computation. Phys. Rev. Lett. 76, 3228–3231 (1996).

28. Parker, S. & Plenio, M. B. Efficient factorization with a single pure qubit and $$\log N$$ mixed qubits. Phys. Rev. Lett. 85, 3049–3052 (2000).

29. Dobšíček, M. et al. Arbitrary accuracy iterative quantum phase estimation algorithm using a single ancillary qubit: A two-qubit benchmark. Phys. Rev. A. 76, 030306 (2007).

30. Adcock, M. R. A., Høyer, P. & Sanders, B. C. Quantum computation with coherent spin states and the close hadamard problem. Quant. Inf. Process. 15, 1361–1386 (2016).

31. Paesani, S. et al. Scheme for universal high-dimensional quantum computation with linear optics. Phys. Rev. Lett. 126, 230504 (2021).

32. Erhard, M., Krenn, M. & Zeilinger, A. Advances in high-dimensional quantum entanglement. Nat. Rev. Phys. 2, 365–381 (2020).

33. Ringbauer, M. et al. A universal qudit quantum processor with trapped ions. arXiv:2109.06903 [quant-ph] (2021).

34. Cervera-Lierta, A. et al. Experimental high-dimensional greenberger-horne-zeilinger entanglement with superconducting transmon qutrits. arXiv:2104.05627 [quant-ph] (2021).

35. Chen, X. et al. Quantum entanglement on photonic chips: a review. Adv. Photon. 3, 064002 (2021).

36. Wang, J. et al. Multidimensional quantum entanglement with large-scale integrated optics. Science 360, 285–291 (2018).

37. Li, L. et al. Metalens-array–based high-dimensional and multiphoton quantum source. Science 368, 1487–1490 (2020).

38. Kues, M. et al. Quantum optical microcombs. Nat. Photon. 13, 170–179 (2019).

39. Hu, X. M. et al. Efficient generation of high-dimensional entanglement through multipath down-conversion. Phys. Rev. Lett. 125, 090503 (2020).

40. Dada, A. C. et al. Experimental high-dimensional two-photon entanglement and violations of generalized Bell inequalities. Nat. Phys. 7, 677–680 (2011).

41. Feng, L. F. et al. On-chip coherent conversion of photonic quantum entanglement between different degrees of freedom. Nat. Commun. 7, 11985 (2016).

42. Martin, A. et al. Quantifying photonic high-dimensional entanglement. Phys. Rev. Lett. 118, 110501 (2017).

43. Reimer, C. et al. High-dimensional one-way quantum processing implemented on d-level cluster states. Nat. Phys. 15, 148–153 (2019).

44. Imany, P. et al. High-dimensional optical quantum logic in large operational spaces. npj Quant. Inf. 5, 59 (2019).

45. Malik, M. et al. Multi-photon entanglement in high dimensions. Nat. Photon. 10, 248–252 (2016).

46. Erhard, M. et al. Experimental greenberger–horne–zeilinger entanglement beyond qubits. Nat. Photon. 12, 759–764 (2018).

47. Hu, X. M. et al. Experimental high-dimensional quantum teleportation. Phys. Rev. Lett. 125, 230501 (2020).

48. Luo, Y. H. et al. Quantum teleportation in high dimensions. Phys. Rev. Lett. 123, 070505 (2019).

49. Zhong, H. S. et al. Phase-programmable gaussian boson sampling using stimulated squeezed light. Phys. Rev. Lett. 127, 180502 (2021).

50. Carolan, J. et al. Universal linear optics. Science 349, 711–716 (2015).

51. Debnath, S. et al. Demonstration of a small programmable quantum computer with atomic qubits. Nature 536, 63–66 (2016).

52. Monroe, C. et al. Programmable quantum simulations of spin systems with trapped ions. Rev. Mod. Phys. 93, 025001 (2021).

53. Watson, T. F. et al. A programmable two-qubit quantum processor in silicon. Nature 555, 633–637 (2018).

54. Wang, J. et al. Integrated photonic quantum technologies. Nat. Photon. 14, 273–284 (2020).

55. Pelucchi, E. et al. The potential and global outlook of integrated photonics for quantum technologies. Nat. Rev. Phys. https://doi.org/10.1038/s42254-021-00398-z (2021).

56. Wang, J. et al. Experimental quantum Hamiltonian learning. Nat. Phys. 13, 551–555 (2017).

57. Chen, X. et al. A generalized multipath delayed-choice experiment on a large-scale quantum nanophotonic chip. Nat. Commun. 12, 2712 (2021).

58. Adcock, J. C. et al. Programmable four-photon graph states on a silicon chip. Nat. Commun. 10, 3528 (2019).

59. Clements, W. R. et al. Optimal design for universal multiport interferometers. Optica 3, 1460–1465 (2016).

60. Riofrío, C. A. et al. Experimental quantum compressed sensing for a seven-qubit system. Nat. Commun. 8, 15305 (2017).

61. Mohseni, M., Rezakhani, A. T. & Lidar, D. A. Quantum-process tomography: resource analysis of different strategies. Phys. Rev. A. 77, 032322 (2008).

62. Hofmann, H. F. Complementary classical fidelities as an efficient criterion for the evaluation of experimentally realized quantum operations. Phys. Rev. Lett. 94, 160504 (2005).

63. Fan, Y. A generalization of the deutsch-jozsa algorithm to multi-valued quantum logic. In 37th International Symposium on Multiple-Valued Logic, 12–12 (IEEE, 2007).

64. Deutsch, D. & Jozsa, R. Rapid solution of problems by quantum computation. Proc. R. Soc. Lond. Ser. A Math. Phys. Sci. 439, 553–558 (1992).

65. Bernstein, E. & Vazirani, U. Quantum complexity theory. SIAM J. Comput. 26, 1411–1473 (1997).

66. Aspuru-Guzik, A. et al. Simulated quantum computation of molecular energies. Science 309, 1704–1707 (2005).

67. Lanyon, B. P. et al. Towards quantum chemistry on a quantum computer. Nat. Chem. 2, 106–111 (2010).

68. Zhou, X. Q. et al. Calculating unknown eigenvalues with a quantum algorithm. Nat. Photon. 7, 223–228 (2013).

69. Santagati, R. et al. Witnessing eigenstates for quantum simulation of hamiltonian spectra. Sci. Adv. 4, aap9646 (2018).

70. Smolin, J. A., Smith, G. & Vargo, A. Oversimplifying quantum factoring. Nature 499, 163–165 (2013).

71. Martin-Lopez, E. et al. Experimental realization of shor’s quantum factoring algorithm using qubit recycling. Nat. Photon. 6, 773 (2012).

72. Monz, T. et al. Realization of a scalable Shor algorithm. Science 351, 1068–1070 (2016).

73. Lu, H. H. et al. Quantum phase estimation with time-frequency qudits in a single photon. Adv. Quant. Technol. 3, 1900074 (2020).

74. Vigliar, C. et al. Error-protected qubits in a silicon photonic chip. Nat. Phys. 17, 1137–1143 (2021).

75. Llewellyn, D. et al. Chip-to-chip quantum teleportation and multi-photon entanglement in silicon. Nat. Phys. 16, 148–153 (2020).

76. Paesani, S. et al. Near-ideal spontaneous photon sources in silicon quantum photonics. Nat. Commun. 11, 2505 (2020).

77. Paesani, S. et al. Generation and sampling of quantum states of light in a silicon chip. Nat. Phys. 15, 925–929 (2019).

78. Kaneda, F. & Kwiat, P. G. High-efficiency single-photon generation via large-scale active time multiplexing. Sci. Adv. 5, eaaw8586 (2019).

## Acknowledgements

We acknowledge X.Wang and S.Tao for useful discussions and assistance of experiment. We acknowledge support from Beijing Natural Science Foundation (Z190005), the National Key R&D Program of China (nos 2019YFA0308702, 2018YFB1107205, 2018YFB2200403, and 2018YFA0704404), the National Natural Science Foundation of China (nos 61975001, 61590933, 61904196, 61675007, and 61775003), and Key R&D Program of Guangdong Province (2018B030329001).

## Author information

Authors

### Contributions

J.W. conceived the project. Y.C., J.H., Z.C.Z., J.M., Z.N.Z, X.C., C.Z., J.B., T.D., H.Y., M.Z., B.T., and Y.Y. implemented the experiment. Y.C., X.C., and J.B. designed the device. Y.C., J.H., Z.C.Z., J.M. and Z.N.Z provided theoretical analysis. D.D., Z.L., Y.D., L.K.O., M.G.T., J.L.O., Y.L., Q.G., and J.W. managed the project. All authors discussed the results and contributed to the manuscript.

### Corresponding author

Correspondence to Jianwei Wang.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review

### Peer review information

Nature Communications thanks Jacqui Romero and Taira Giordani for their contribution to the peer review of this work. Peer reviewer reports are available.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Chi, Y., Huang, J., Zhang, Z. et al. A programmable qudit-based quantum processor. Nat Commun 13, 1166 (2022). https://doi.org/10.1038/s41467-022-28767-x

• Accepted:

• Published:

• DOI: https://doi.org/10.1038/s41467-022-28767-x