Introduction

Graph states are the multiqubit entangled states, on which universal measurement-based quantum computation (MBQC) can be carried out by applying a sequence of measurements on qubits1,2. Figure 1a shows a graph state \(\left\vert {{{{{{{\rm{G}}}}}}}}\right\rangle=(V,\, E)\), in which one vertex (V) represents one qubit and one edge (E) represents one pairwise entangling interaction2. Mathematically, hypergraph is a generalization of graph. In quantum physics, a generalization of the graph state is the hypergraph state \(\left\vert {{{{{{{\rm{HG}}}}}}}}\right\rangle\) in Fig. 1b, in which a hyperedge (HE) can arbitrarily entangle a subset of multi-qubits in V3,4,5,6, rather than the two nearest qubits in the graph state in Fig. 1a. The graph state is a special case of the two-uniform hypergraph states. Processing such generalized hypergraph states features interesting nonlocal properties7,8,9 and enables unique capabilities in quantum computation10,11,12,13. For example, hypergraph-state quantum computation achieves Pauli universality, meaning it only requires Pauli measurements for MBQC11. It could allow the emulation of non-trivial phases such as symmetry-protected topological order in condensed matter physics12,13. The utilization of hypergraph states could also change the circuit-depth complexity and gain gates parallelization10. Recently, technological progress has lead to creations of multiqubit graph states in the photonics14, superconducting15, trapped ion16, and atomic systems17. By using integrated photonic quantum technologies18,19, it has enabled the on-chip generation and manipulation of graph states20,21,22,23. However, the preparation of hypergraph states is rather challenging due to its requirement of implementing a sequence of multiqubit entangling gates.

Fig. 1: Enumeration of all four-qubit hypergraph states under local unitary transformation.
figure 1

a Topology of a four-qubit graph state, and b a four-qubit hypergraph state. Vertices (V) represent qubits (Q1--Q4), and edges (E, black lines) represent entangling interactions between two qubits, and hyperedges (HE, colored close shapes) represent entangling interactions between multiple qubits. Right plots: Quantum circuits for the preparations of graph state and hypergraph state, shown in the left plots respectively. Vertical colored lines connecting red dots represent the CZ, CCZ and CCCZ entangling gates. c An example to show the principle of local unitary (LU) equivalence. The hypergraphs are locally equivalent if they can be mutually transformed by repeatedly applying the local unitary operations on single-qubits, e.g, local Pauli operations X(k) and Z(k) on the qubit k. The X(k) operation on the qubit k removes or adds these hyperedges in E(k) depending on whether they exist already or not, where E(k) represents all hyperedges that contain qubit k but removing qubit k out. The Z(k) operation on the qubit k removes the one-edge on the qubit k. step1 to step 2: the X3 operation on Q3; step2 to step 3: the X1 operation on Q1; step3 to step4: the one-edge is removed by a Z2 operation. d Enumeration of all 27 four-qubit hypergraph states that are equivalent under LU transformation. The first two refer to two classes of star (\(\left\vert S\right\rangle\)) and line (\(\left\vert L\right\rangle\)) graph states.

In this work, we report the preparation, verification and processing of arbitrary four-qubit hypergraph states on a reprogrammable silicon-photonic quantum chip. We realize the complete classes of 27 different four-qubit hypergraph states and 2 different graph states. The Mermin test provides an experimental tool to verify the presence of multiqubit entanglement, by which we verify entanglement without any closure of the distance or detection loopholes. Genuine multiqubit entanglement for hypergraph states is also certificated by characterizing entanglement witness. We benchmark the implementation of hypergraph MBQC protocol, providing the building blocks for blind quantum computing with Pauli universality.

Results

Theory and scheme

Hypergraph states are n-qubit stabilizer states, which correspond to mathematical hypergraphs with vertices (V) and (\({2}^{{2}^{n}-1}\)) hyperedges (HE) in total3,4,5,6. It can be described as:

$$\left\vert {{{{{{{\rm{HG}}}}}}}}\right\rangle=\mathop{\prod}\limits_{e\in HE}{C}_{e}{\left\vert+\right\rangle }^{\otimes n},$$
(1)

where \({C}_{e}=I-2\left\vert 1...1\right\rangle \left\langle 1...1\right\vert\), adding the Cm-Z (m < n) operations on the qubits \(\left\vert+\right\rangle=(\left\vert 0\right\rangle+\left\vert 1\right\rangle )/\sqrt{2}\) connected by the hyperedge e. When Ce is chosen as the CZ gate, it returns to the scenario of graph states1,2. The preparation of the hypergraph states requires multiqubit entangling interactions that correspond to the hyperedges connecting more than two qubits. Figure 1b shows the quantum circuit for the preparation of a hypergraph state, consisting of a sequence of Cm-Z gates. The Cm-Z returns to the Toffoli gate for m = 2, and to the CZ gate when m = 1. The hypergraph states are real equally weighted states, and they can be mapped to the boolean functions with the dual degeneracy of a global phase factor. For the four-qubit hypergraph states, there are total (\({2}^{{2}^{4}-1}\)) enumerations. However, many of them are locally equivalent. Any hypergraph states can be defined as locally equivalent if they can be mutually transformed by repeatedly applying local unitary (LU) transformations7,9. The rule of LU transformation is provided in Methods and Fig. 1c caption. As a result, for the four-qubit case, there are 27 different LU-classes of hypergraph states together with 2 LU-classes of graph states. Figure 1d enumerates the 29 classes of hypergraph and graph states. The LU equivalent states share the same degree of entanglement, since only single-qubit operations are performed locally on the qubits.

Using conventional quantum photonic methods, preparing hypergraph states by operating the Cm-Z gates (Fig. 1b) is significantly challenging. For example, implementing the three-qubit Toffoli gate requires six CNOT gates. We propose a method to produce the hypergraph states with a high successful probability. In this scheme, quantum entanglement is translated from the photon sources to the entangling gates, by which the difficulty of realizing the Cm-Z gate is mapped to the generation of multidimensional (the local dimensionality of d dimensions) multiphoton (the number of n photons) entangled states24,25; each qudit is mapped to \({{{{{{{{\rm{Log}}}}}}}}}_{2}(d)\) qubits, among which arbitrary entangling gates can be applied determinately. Details and scalability analysis of this method are provided in Supplementary Note 2. In the experiment, we implement the scheme to realize four-qubit hypergraph states on the quantum chip that translates four-dimensional two-photon entanglement to the Cm-Z gates, m ≤ 3.

A programmable silicon-photonic quantum chip

Figure 2a reports a quantum photonic chip that allows arbitrary on-chip preparation, operation, and measurement of four-qubit hypergraph states. The quantum chip shifts the task of constructing a generic multiqubit entangling gate to operating multipartite entanglement from parametric nonlinear sources26,27. We implement a qudit-qubit mapping in which the four-qubit states are encoded into two-ququart states of photons and arbitrary entangling operations can be performed28. The device consists of four main parts, i.e, entanglement-generation, space expansion, local unitary operation, and coherent compression, as shown in Fig. 2a. A four-dimensional Bell state is first generated in integrated four-wave-mixing sources29, which results in a four-qubit state as \((\left\vert 0000\right\rangle+\left\vert 0101\right\rangle+\left\vert 1010\right\rangle+\left\vert 1111\right\rangle )/2\). For the idler single-photon, its operational space is subsequently expanded for applying the arbitrary local unitary operation Uij which is physically realized by universal linear-optic circuits30. The entire process retains quantum coherence by space compression. The chip allows implementations of multi-qubit controlled unitary Cm-U gates. For example, the triply-controlled CCCZ gate can be obtained by setting the configuration as U00 = U01 = U10 = II and U11 = CZ. The circuit thus results in the (\(\left\vert 00\right\rangle \left\langle 00\right\vert II+\left\vert 01\right\rangle \left\langle 01\right\vert II+\left\vert 10\right\rangle \left\langle 10\right\vert II+\left\vert 11\right\rangle \left\langle 11\right\vert CZ\)) gate, which functions as the CCCZ gate. Similarly, other Cm-Z gates (m ≤ 3) for generating the hypergraph states (see Fig. 1) can be realized or compiled in the device. Details for state evolution, device fabrication and experimental setup have been provided in Methods.

Fig. 2: A reprogrammable silicon-photonic quantum chip for the arbitrary preparation, operation, and measurement of four-qubit hypergraph states.
figure 2

a Circuit diagram. The four-qubit hypergraph device is fabricated on a silicon-nanophotonic quantum chip. The chip integrates more than 400 components for the generation, operation, and measurement of four-qubit {Q1, Q2, Q3, Q4} hypergraph states. Two-qubit states are mapped to a four-dimensional qudit state in one single-photon as: {\({\left\vert 00\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}\to {\left\vert 0\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}\), \({\left\vert 01\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}\to {\left\vert 1\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}\), \({\left\vert 10\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}\to {\left\vert 2\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}\), \({{\left\vert 11\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}\to {\left\vert 3\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}}\)}. The multi-qubit controlled gate Cm-Z is enabled by a process of “entanglement generation--space expansion--local operation--coherent compression". Reconfiguring the unitary operations Uij (i, j = 0,1) allows the implementations of Cm-Z gates. A sequence of controlled gates are compiled by setting Uij accordingly. Right inset: a photograph for packaged silicon-photonic quantum chip, which is wire bonded (gold lines) on a printed circuit board. b Characterization of the CCCZ gate. Truth tables are measured in four different input-output sets of conjugate product bases. {\(\left\vert 0\right\rangle,\left\vert 1\right\rangle\)} represents the computational basis, and \(\left\vert \pm \right\rangle\) = \((\left\vert 0\right\rangle \pm \left\vert 1\right\rangle )/\sqrt{2}\) represents the Hadamard basis. The probability distributions are coded by colors and the key is provided at the right bottom. The classical statistic fidelity (Fc) shown in the plots is used to characterize each truth table. The CCCZ gate is characterized by the Hofmann fidelity estimated from four tables in b.

As an example, we characterize the multiqubit CCCZ entangling gate, by employing an efficient method of generalized Hofmann fidelity31. It requires only 4 × 24 = 256 measurements, consisting of four measurement settings in the partially conjugate product bases. In each setting, three of the qubits are prepared and measured in the Pauli-Z basis \(\left\vert 0\right\rangle,\left\vert 1\right\rangle\), while one qubit is prepared and measured in the Pauli-X basis \(\left\vert \pm \right\rangle\). Figure 2b shows measured input-output truth tables for the CCCZ gate. The CCCZ gate flips the phase only when the qubits are in the \(\left\vert 1111\right\rangle\) state. A classical statistic fidelity (Fc) is defined to quantify the results, \({{{{{{{{\rm{F}}}}}}}}}_{{{{{{{{\rm{c}}}}}}}}}=\frac{1}{{2}^{4}}\mathop{\sum }\nolimits_{i=1}^{{2}^{4}}{p}_{i}{q}_{i}\), where pi, qi are theoretical and measured distributions, respectively. They are measured to be Fc1 = 0.95(9), Fc2 = 0.95(8), Fc3 = 0.974(8), and Fc4 = 0.958(9), demonstrating high-fidelity CCCZ gate. This gives the lower bound Hofmann fidelity of the gate Fc > Fc1 + Fc2 + Fc3 + Fc4 − 3 = 0.84(9).

Preparation and verification of hypergraph states

Executing a sequence of multiqubit Cm-Z gates, similar to quantum circuits in Fig. 1b, we create all 29 LU-classes of hypergraph and graph states as shown in Fig. 1d. Note that quantum circuits are compiled in experiment by means of combining the sequence of gates, as the Cm-Z operators commute with each other. We reconstruct density matrices for all these states by implementing quantum state tomographical measurements with compressed sensing techniques32. Quantum state fidelities Fq, that is defined as \({{{{{{{{\rm{F}}}}}}}}}_{{{{{{{{\rm{q}}}}}}}}}={({{{{{{{\rm{Tr}}}}}}}}[\sqrt{\sqrt{{\rho }_{0}}\cdot \rho \cdot \sqrt{{\rho }_{0}}}])}^{2}\), are estimated from the measured (ρ) and ideal (ρ0) density matrices. Figure 3a summarises the estimated fidelities Fq for all LU-classes of hypergraph states and graph states. Though the standard tomographic approach becomes impractical when increasing the number of qubits or at a low photon counting rate, more efficient approaches are available for state verification and fidelity estimation33.

Fig. 3: On-chip characterization and verification of genuine multipartite entanglement in the hypergraph states.
figure 3

a Measured quantum state fidelities (Fq) for all the 27 LU-equivalent classes of hypergraph states as well as 2 classes of graph states. Insets: experimentally reconstructed density matrices of three states by the quantum state topographic measurement. Column heights represent the absolute values ρ; colors represent the phases \({{{{{{{\rm{Arg}}}}}}}}(\rho )\). The values in parentheses are ± 1σ uncertainty, estimated by Monte Carlo methods considering Poissonian photon statistics. b, c Measured Mermin parameters of μ and \(\tilde{\mu }\). Experimental results confirm the maximum violations of the Mermin–Klyshko type inequalities, indicated by the local hidden variable bound (e.g, blue line in c). Note the error bars for the measured Fq, μ and \(\tilde{\mu }\) are too small to be visible. Dashed lines are theoretical results.

We measure alternatively the entanglement witness to verify the presence of genuine multiqubit entanglement of the hypergraph states, where all subsystems are genuinely entangled. The witness operator is defined as \(\hat{W}=I-\frac{1}{\alpha }\left\vert \psi \right\rangle \left\langle \psi \right\vert\)34,35, where α is the maximum overlap between the given state \(\left\vert \psi \right\rangle\) and product states in any bipartition. Measuring the expectation value of witness provides an efficient way for entanglement verification. As an example, we verified the hypergraph state no.11 in Fig. 1d. We decompose the state into a linear combination of products of single Pauli operators and measure their average values. Experimental results are reported in Fig. 4, in good agreement with theoretical ones. The measured witness value is \(\langle \hat{W}\rangle=-0.42\pm 0.1 < 0\), thus demonstrating strong genuine multipartite entanglement.

Fig. 4: Measurement of entanglement witness for hypergraph states.
figure 4

Theoretical and experimental values for the decomposed product Pauli operators for the hypergraph state no.11. A collection of in total 256 measurements in the basis of product Pauli operators are performed. The average values for each operator are color coded and the key is provided at the top. The expected witness operator \(\langle \hat{W}\rangle\) is measured to be −0.42 ± 0.1.

The Mermin test provides an experimental tool to verify the presence of multiqubit entanglement that we adopt here to examine the quality of hypergraph states and the performance of the device. We measure the Mermin–Klyshko (MK) polynomials7,36 to verify genuine multiqubit entanglement. Note that neither the detection nor distance loophole is closed in our current experiment. Mermin parameters μ and \(\tilde{\mu }\) are defined to characterize the state \(\left\vert \psi \right\rangle\).

$$\left\{\begin{array}{l}\mu (\psi )={{{{{{{\rm{Max}}}}}}}}[\langle \psi | {M}_{n}| \psi \rangle,\,\langle \psi | {M}_{n}^{{\prime} }| \psi \rangle ]\hfill\\ \tilde{\mu }(\psi )={{{{{{{\rm{Max}}}}}}}}[{\langle \psi | {M}_{n}| \psi \rangle }^{2}+{\langle \psi | {M}_{n}^{{\prime} }| \psi \rangle }^{2}],\end{array}\right.$$
(2)

where the MK polynomials Mn and \({M}_{n}^{{\prime} }\) for the n-qubit system are defined by M1 = a1, \({M}_{n}=\frac{1}{2}{M}_{n-1}({a}_{n}+{a}_{n}^{{\prime} })+\frac{1}{2}{M}_{n-1}^{{\prime} }({a}_{n}-{a}_{n}^{{\prime} })\) (so as \({M}_{n}^{{\prime} }\)), and {\({a}_{i},\, {a}_{i}^{{\prime} }\)} are optimized single-qubit observables for the i-th qubit (see Methods). Distribution of measured Mermin parameters {μ, \(\tilde{\mu }\)} can provide the sufficient condition for the verification of four-qubit states as37: (I) If \(\left\vert \psi \right\rangle\) is a separable state, μ ≤ 1. (II) If \(\left\vert \psi \right\rangle\) is bipartite 2-entangled, i.e, having a form \(\left\vert {\psi }_{12}\right\rangle \otimes \left\vert {\psi }_{34}\right\rangle\) or \(\left\vert {\psi }_{12}\right\rangle \otimes \left\vert {\psi }_{3}\right\rangle \otimes \left\vert {\psi }_{4}\right\rangle\), \(\tilde{\mu }\le 2\). (III) If \(\left\vert \psi \right\rangle\) is tripartite 3-entangled, i.e, having a form \(\left\vert {\psi }_{123}\right\rangle \otimes \left\vert {\psi }_{4}\right\rangle\), \(\tilde{\mu }\le 4\). By violating the Mermin inequalities according to the above {μ, \(\tilde{\mu }\)} distribution, the entanglement structure can be verified, accordingly. For example, when the measured \(\tilde{\mu }\) value is greater than 4, violating the (III) inequality, the state must be at least 4-entangled.

Figures 3b, c report the measured Mermin parameters μ and \(\tilde{\mu }\) for all the (27 + 2) classes of hypergraph (graph) states. When performing measurement for each state, its local projectors {\({a}_{i},{a}_{i}^{{\prime} }\)} for each qubit are optimized by an algorithm and mapped to the reconfigurable quantum chip, so as to maximize the violation of inequalities. The algorithm and a full list of optimized projections are provided in Supplementary Note 1. In Fig. 3b, the measured Mermin parameter μ for all states strongly violates the local hidden variable (LHV) classical bound. In Fig. 3c, the measured values of \(\tilde{\mu }\) reach more than 90% of the maximal achievable values according to quantum mechanics, confirming high-quality entanglement. The observation of \(\tilde{\mu }\) greater than 4, violating the (III) inequalities, e.g, for the hypergraph states labeled with a number of {6,11,20,25} and the star-type graph state labeled with S, thus identifies the genuine four-partite entanglement.

Hypergraph states for blind MBQC

We next show the implementations of hypergraph-state MBQC for blind quantum computations10,11,38, as illustrated in Fig. 5a. The server capable of preparing largely entangled resource states is destined to securely share the MBQC resource states with the client who is only able to perform simple measurements to execute computation39,40. One main task for the client is to efficiently certificate the shared resource states, and check the correctness of quantum computing outcomes. Saying the server prepares the resource states independently in each run, a typical strategy for the client is to require some copies of the state and to perform verification before computation. These tests can return a lower bound on the average fidelity of the received states. From this result, the client can further estimate the possible error rate in the following quantum computation.

Fig. 5: Benchmarking the measurement-based protocol and efficient verification of hypergraph states by Pauli universal measurements.
figure 5

a A diagram of verified hypergraph-state quantum computing in a blind manner between the server and the client. The server produces multipartite hypergraph states and share them with the client. For the client, only single-qubit Pauli measurements are performed for the verification of resource states sent from the server and for the execution of MBQC. b A two-dimensional lattice of the Union Jack state which is the resource state for Pauli universal MBQC. Three vertices of each elementary triangle are connected by an order-3 hyperedge (i.e, CCZ operation). Right plot: color-encoding stabilizers for the Union Jack state, which is 3-colored regardless of the number of qubits due to the symmetry. That means only three measurement settings are sufficient to verify the state. The group of qubits in the red dashed boxes represents a unit cell of the Union Jack state, which is the No.15 hypergraph state in Figs. 1 and 2. c, d Implementations of basic measurement-based protocol on the No.15 hypergraph state. In c, when measuring the qubit Q4 in the Y basis, an operation of \(C{Z}_{123}{(\sqrt{C{Z}_{13}}\sqrt{C{Z}_{23}})}^{o4}\) where o4 = ± 1 is the measurement outcome of Q4, will add to the remaining three qubits. In d, it shows the state evolution when projectively measuring the qubits Q1 and Q2 in the Z basis, respectively resulting in a maximally entangled state or a product state between Q3 and Q4, determined by the outcomes of the measured qubits Q1 and Q2. In c and d, quantum operations on the remaining qubits are determined by the measurement outcomes of detected qubits. Experimentally reconstructed density matrices are shown in c and d, where column heights represent the absolute values ρ and colors represent the phases \({{{{{{{\rm{Arg}}}}}}}}(\rho )\). The Fq values in parentheses are ± 1σ uncertainty, estimated from Monte Carlo considering Poissonian photon statistics. e Experimental certification of state fidelity of the Union Jack state’s unit cell by the colored stabilizers. \({K}_{i}^{{\prime} }\)(i = 1, 2, 3) represents the three colored Pauli stabilizers. A number of three measurements represented by 3-color-encoding stabilizers, regardless of the number of qubits, is sufficient to certify the state fidelity.

Adopting the hypergraph states as the resource states can greatly simplify the client’s requirement, as its Pauli universality requires only simple Pauli measurements to be performed on qubits10,11, making it particularly suitable for blind MBQC applications39,40. To benchmark the basic operations in the hypergraph-state MBQC, we choose the No.15 state in Figs. 1 and 2 (i.e, a unit cell of the Union Jack state in Fig. 5b, the resource state for Pauli universal MBQC). We perform two examples by using only Pauli measurements. In Fig. 5c, the qubit Q4 is measured in the Pauli-Y basis. It results in a measurement-induced operation on the remaining three qubits as \(C{Z}_{123}{(\sqrt{C{Z}_{13}}\sqrt{C{Z}_{23}})}^{o4}\), where o4 = ± 1 is determined by the measurement outcome of Q4. Using this operation together with Hadamard gates, arbitrary quantum circuits can be simulated12. In Fig. 5d, measuring the qubits Q1 and Q2 in the Pauli-Z basis makes the qubits Q3 and Q4 collapse to either a maximally entangled state or a product state. When doing so on the large scale, the remaining state after measurements will be random cluster states which can be used to initialise and readout information12.

We then show that by only performing Pauli measurements, the hypergraph states can be efficiently verified. That is, both the verification of the hypergraph resource states and their proceeding of MBQC are enabled by solely performing Pauli measurements. We adopt an approach of color-encoding stabilizers41 to verify the No.15 hypergraph state. The idea is to perform Pauli operators that commute with the stabilizer operators of a certain group of qubits, projecting the state onto a joint eigenstate \(\left\vert {\psi }_{j}\right\rangle\). Measurements are defined by independent sets of the hypergraph, where an independent set (denoted as A) is a subgroup of qubits with no connected edge between them (\(\bar{A}\) is the complement set of A). Different independent sets are represented by distinct colors41. The operators Xj, Zk, and Ki all commute for i, jA, \(k\in \bar{A}\), where Ki = Xi ∏eE,ei Ce/{i} is the stabilizer for the qubit i, and Ce/{i} corresponds to the multqubit controlled-Z gate acting on neighboring qubits around the vertex i enclosed by the hyperedge e. When all the Xj and Zk are measured, it collapses the original state into a shared eigenstate of the stabilizer Ki for all iA, that is \({K}_{i}\vert \psi \rangle={(-1)}^{{t}_{i}}\vert {\psi }_{j}\rangle\), where ti is given by oi + ∑eE,ei(∏ke,kiok) and \({(-1)}^{{o}_{i}}\) is the measurement outcome of the qubit i. When ti equals to 1, it means that the original state is stabilized by all the Ki for i in set A, and this test on A passes. The same procedure is repeated for all other independent sets. Importantly, the number of test settings depends on the number of colored independent sets to cover the entire hypergraph, instead of the number of qubits, resulting in efficient verification. For example, as shown in Fig. 5b, the Union Jack state is always a 3-color-encoding state regardless of the number of qubits. For a s-color-encoding hypergraph state, one colored testing set is randomly chosen in each test, and N tests are repeated. If all N tests pass, the verified state fidelity can be obtained as \(\bar{F}\ge s\cdot {\delta }^{1/N}-(s-1)\), where δ is the significance level41. In the experiment, we measure the average value of the joint projector for each color (\({K}_{1}^{{\prime} },\, {K}_{2}^{{\prime} },\, {K}_{3}^{{\prime} }\) in Fig. 5e). This average value equals to the passing probability \(\bar{P}\) for one single test, which equivalently (see Methods) returns a lower bound of the state fidelity as \(\bar{F}\ge s\cdot \bar{P}-(s-1)\). Figure 5e shows the experimental results of the Union Jack state’s unit cell state, which shows high-level single-test passing probabilities with a mean value of 0.97(6). This gives a lower bound of the average state fidelity of \(\bar{F}\ge 0.91\).

Discussion

We have experimentally realized, characterized and verified complete classes of four-qubit hypergraph states on the reprogrammable photonic quantum chip. The Mermin-type inequalities and entanglement witness were characterized to verify genuine multipartite entanglement of the created hypergraph states. Basic measurement-based protocols were implemented to prototype hypergraph-state quantum computing with only Pauli measurement on single qubits. Mapping qudits to qubits enables arbitrary multiqubit-controlled gates with high fidelities and significantly improved photon rates (more than six orders higher than that in graph states21,42,43), thus allowing the benchmarking of hypergraph-state measurement-based quantum computation. The hypergraph-state quantum devices can be further scaled up using state-of-the-art devices and technologies, including high-efficiency photon sources44,45, multi-photon multi-dimensional entanglement devices24,25, large-scale silicon-photonic quantum circuits29,46, and large-scale waveguide single-photon detectors47. Analysis of scalability is provided in Supplementary Note 2. Moreover, this scheme of implementing hypergraph states can be applied to other degrees of freedom of photons, such as orbital angular momentum modes24,48,49 and frequency modes23,50,51, which possess natural high-dimensional scalability and strong controllability. Recent technological advances in realizing high-dimensional entanglement and multi-qubit gates in superconducting52 and trapped ion systems53, also promise experimental implementations of the hypergraph-state quantum information processing in those systems. Our results may cast light on the investigation of complex entanglement structures in hypergraph states and the development of profound applications in Pauli-universal blind quantum computations. Though the hypergraph-state device demonstrated here is a type of noisy intermediate-scale quantum device, universal measurement-based1,2,54 or fusion-based quantum computing55 architectures using graph states could be upgraded to the large-scale fault-tolerant implementation of hypergraph-states quantum computing3,4,5,6.

Methods

Silicon-photonic quantum chip

The chip is fabricated by standard complementary metal-oxide-semiconductor processes. The waveguide circuit patterns are defined on an 8 inches silicon-on-insulator (SOI) wafer through the 248 nm deep ultraviolet (DUV) photolithography processes and the inductively coupled plasma (ICP) etching processes. Once the waveguides layer is fabricated, a layer of silicon dioxide (SiO2) of 1μm thickness was deposited by plasma-enhanced chemical vapor deposition (PECVD). Finally, thermal-optical phase-shifters are patterned by a layer of 50-nm-thick titanium nitride (TiN) deposited on top of waveguides. Single photons were generated and guided in silicon waveguides with a cross-section of 450 nm × 220 nm. The photon-pair sources were designed with a length of 1.2 cm. Multimode interferometers (MMIs) with a width of 2.8 μm and length of 27 μm were used as balanced beamsplitters. The chip was wired-bounded on a PCB and each phase-shifter was individually controlled by an electronic driver. An optical microscopy image of the chip is shown in Fig. 2a.

Experimental setup

In our experiment, we used a tunable continuous wave (CW) laser at the wavelength of 1550.12 nm to pump the nonlinear sources, which was amplified to 100 mW power using an erbium-doped fiber amplifier (EDFA). Photon-pairs of different frequencies were generated in integrated sources by the spontaneous four wave mixing (SFWM) process, and then spatially separated by on-chip asymmetric Mach-Zehnder interferometers (MZIs). The signal photon was chosen at the wavelength of 1545.32 nm and the idler photon at 1554.94 nm. Single-photons were routed off-chip for detection by an array of fiber-coupled superconducting nanowire single-photon detectors (SNSPDs) with an averaged efficiency of 85%, and photon coincidence counts were recorded by a multichannel time interval analyzer (TIA). The rate of photons is dependent on the choice of projective measurement bases. In the typical setting of our experiments, for example, when the state is projected to the eigenbasis, the two-photon coincidence rate was measured to be ~kHz, and the integration time in the projective measurement was chosen as 5 s.

State evolution and the C m Z gates

Our quantum photonic chip is shown in Fig. 2a, which integrates more than 400 photonic components, allowing arbitrary on-chip preparation, operation, and measurement of four-qubit hypergraph states. Key ability includes the multiqubit-controlled unitary operations CmU, where U represents the arbitrary unitary operation (e.g., U = Z in our experiment) and m is the number of control qubits. The realization of multi-qubit CmU gates relies on the transformation from the entanglement sources to the entangling operations, by using the process of “entanglement  generation – space expansion–local operation – coherent compression"28.

Firstly, the four-dimensional Bell state is created by coherently exciting an array of four spontaneous four-wave mixing (SFWM) sources. A pair of photons with different frequencies are then separated by on-chip asymmetric Mech-Zehnder interferometers and routed to different paths, resulting in the four-dimensional Bell state29:

$${\left\vert {{{{{{{\rm{Bell}}}}}}}}\right\rangle }_{4}=\frac{{\left\vert 0\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{s}{\left\vert 0\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{i}+{\left\vert 1\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{s}{\left\vert 1\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{i}+{\left\vert 2\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{s}{\left\vert 2\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{i}+{\left\vert 3\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{s}{\left\vert 3\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}^{i}}{2},$$
(3)

where \(\left\vert k\right\rangle\) (k = 0, 1, 2, 3) represents the logical bases of qudits, and the superscripts of s, i represent the signal and idler single-photon, respectively. The two-qubit states are mapped to the four-dimensional qudit state in both of the signal and idler single-photon as the following:

$$\left\{\begin{array}{c}\left\vert 00\right\rangle_{{{{{{{{\rm{qubit}}}}}}}}}\to \left\vert 0\right\rangle_{{{{{{{{\rm{qudit}}}}}}}}}\hfill\\ \left\vert 01\right\rangle_{{{{{{{{\rm{qubit}}}}}}}}}\to \left\vert 1\right\rangle_{{{{{{{{\rm{qudit}}}}}}}}}\hfill\\ \left\vert 10\right\rangle_{{{{{{{{\rm{qubit}}}}}}}}}\to \left\vert 2\right\rangle_{{{{{{{{\rm{qudit}}}}}}}}}\hfill\\ {\left\vert 11\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}\to {\left\vert 3\right\rangle }_{{{{{{{{\rm{qudit}}}}}}}}}\hfill\end{array}\right.$$
(4)

This results in the four-qubit state as:

$$\left\vert \Phi \right\rangle= \frac{{\left\vert 00\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{s}{\left\vert 00\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{i}+{\left\vert 01\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{s}{\left\vert 01\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{i}}{2}\\ +\frac{{\left\vert 10\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{s}{\left\vert 10\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{i}+{\left\vert 11\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{s}{\left\vert 11\right\rangle }_{{{{{{{{\rm{qubit}}}}}}}}}^{i}}{2},$$
(5)

where \(\left\vert k\right\rangle\) (k = 0, 1) represents the logical bases of qubits. For clarity, we omit the subscript of qubit in the following.

Secondly, we expand the Hilbert space of the idler-photonic qubit into a 4-dimensional space. After the space expansion process, we add two ancillary qubits \({\left\vert \phi \right\rangle }^{i}\) (third ququart) into the state:

$${\left\vert \Phi \right\rangle }_{1}=\frac{{\left\vert 00\right\rangle }^{s}{\left\vert 00\right\rangle }^{i}{\left\vert \phi \right\rangle }^{i}+{\left\vert 01\right\rangle }^{s}{\left\vert 01\right\rangle }^{i}{\left\vert \phi \right\rangle }^{i}+{\left\vert 10\right\rangle }^{s}{\left\vert 10\right\rangle }^{i}{\left\vert \phi \right\rangle }^{i}+{\left\vert 11\right\rangle }^{s}{\left\vert 11\right\rangle }^{i}{\left\vert \phi \right\rangle }^{i}}{2}.$$
(6)

Thirdly, the ancillary two-qubit \({\left\vert \phi \right\rangle }^{i}\) are locally operated using arbitrary two-qubit unitary gates represented by Uij. We apply different unitary operations U00, U01, U10, and U11 on the \({\left\vert \phi \right\rangle }^{i}\) (marked by different colors in Fig. 2a). This returns a state:

$${\left\vert \Phi \right\rangle }_{2}= \frac{{\left\vert 00\right\rangle }^{s}{\left\vert 00\right\rangle }^{i}{\left\vert {\phi }_{R}\right\rangle }^{i}+{\left\vert 01\right\rangle }^{s}{\left\vert 01\right\rangle }^{i}{\left\vert {\phi }_{Y}\right\rangle }^{i}}{2}\\ +\frac{{\left\vert 10\right\rangle }^{s}{\left\vert 10\right\rangle }^{i}{\left\vert {\phi }_{G}\right\rangle }^{i}+{\left\vert 11\right\rangle }_{1}{\left\vert 11\right\rangle }^{s}{\left\vert {\phi }_{B}\right\rangle }^{i}}{2},$$
(7)

where subscripts of {R(ed), Y(ellow), G(reen), B(lue)} represent the state after Uij. The Uij are realized by universal linear-optical circuits30.

Finally, to preserve quantum coherence, the which-process information is erased in the coherent compression process. This swaps the state information of the idler qubits as:

$${\left\vert \Phi \right\rangle }_{3}= \frac{{\left\vert 00\right\rangle }^{s}{\left\vert {\phi }_{R}\right\rangle }^{i}{\left\vert 00\right\rangle }^{i}+{\left\vert 01\right\rangle }^{s}{\left\vert {\phi }_{Y}\right\rangle }^{i}{\left\vert 01\right\rangle }^{i}}{2}\\ +\frac{{\left\vert 10\right\rangle }^{s}{\left\vert {\phi }_{G}\right\rangle }^{i}{\left\vert 10\right\rangle }^{i}+{\left\vert 11\right\rangle }^{s}{\left\vert {\phi }_{B}\right\rangle }^{i}{\left\vert 11\right\rangle }^{i}}{2},$$
(8)

Through the post-selection procedure of projecting the last two qubits into the superposition state \((\left\vert 00\right\rangle+\left\vert 01\right\rangle+\left\vert 10\right\rangle+\left\vert 11\right\rangle )/2\), we coherently compress the 16-dimensional space back into the 4-dimensional space with a success probability of 1/4, and we obtain:

$${\left\vert \Phi \right\rangle }_{4}=\frac{{\left\vert 00\right\rangle }^{s}{\left\vert {\phi }_{R}\right\rangle }^{i}+{\left\vert 01\right\rangle }^{s}{\left\vert {\phi }_{Y}\right\rangle }^{i}+{\left\vert 10\right\rangle }^{s}{\left\vert {\phi }_{G}\right\rangle }^{i}+{\left\vert 11\right\rangle }^{s}{\left\vert {\phi }_{B}\right\rangle }^{i}}{2}.$$
(9)

In short, the process of “entanglement generation-space expansion-local operation-coherent compression" results in the multi-qubit entangling gate as:

$$\left\vert 00\right\rangle \left\langle 00\right\vert {U}_{00}+\left\vert 01\right\rangle \left\langle 01\right\vert {U}_{01}+\left\vert 10\right\rangle \left\langle 10\right\vert {U}_{10}+\left\vert 11\right\rangle \left\langle 11\right\vert {U}_{11}.$$
(10)

By reprogramming the linear-optical circuits for local unitary operations Uij, we can realize different multi-qubits controlled unitary gates such as CmZ, m ≤ 3. For example, the triple-controlled CCCZ gate can be obtained by setting the configuration as U00 = U01 = U10 = II and U11 = CZ. The quantum chip thus enables the generation, operation and measurement of arbitrary four-qubit hypergraph states.

Characterizations of the CCCZ gate

We here adopt the method proposed in ref. 31 to characterize the CCCZ gate. Since the CCCZ gate is invariant with respect to the permutation of the controlled and target qubits, we can characterize the gate by measuring the input-output truth tables for four complementary product bases. In these bases, three of the qubits are prepared and measured in the computational basis states {\(\left\vert 0\right\rangle,\left\vert 1\right\rangle\)} while the fourth qubit is prepared and measured in the Hadamard basis states {\(\left\vert+\right\rangle,\left\vert -\right\rangle\)}. Inputting the product state \(\vert {\psi }_{i,j}\rangle\) returns a product state of \(\vert {\psi }_{i,j}^{{{{{{{{\rm{(out)}}}}}}}}}\rangle={U}_{CCCZ}\vert {\psi }_{i,j}\rangle\). The measured truth tables are shown in Fig. 2. We define the average statistic classical state fidelity as \({{{{{{{{\rm{F}}}}}}}}}_{{{{{{{{\rm{c}}}}}}}}(j)}=\mathop{\sum }\nolimits_{i=1,k=1}^{16}{p}_{ik}{q}_{ik}/16\), where pik and qik are the theoretical and measured distribution. According to the Choi-Jamiolkowski isomorphism, we define the Choi matrix of an ideal CCCZ gate as χ0, and the experimental Choi matrix as χ, from which the quantum process fidelity for the CCCZ gate can be written as \({{{{{{{{\rm{F}}}}}}}}}_{\chi }={{{{{{{\rm{Tr}}}}}}}}[\chi {\chi }_{0}]/({{{{{{{\rm{Tr}}}}}}}}[{\chi }_{0}]{{{{{{{\rm{Tr}}}}}}}}[\chi ])\), where \({{{{{{{\rm{Tr}}}}}}}}[{\chi }_{0}]=16\) accounts for the normalization. We obtain the generalized Hodmann bound of fidelity31 (the lower bounded process fidelity) for the CCCZ gate, which can be estimated from the four above averaged state fidelities as Fχ ≥ Fc1 + Fc2 + Fc3 + Fc4 − 4.

Local unitary transformation

In this part, we show the rule of LU transformation when applying local Pauli operations on the hypergraph states of \(\left\vert {{{{{{{\rm{HG}}}}}}}}\right\rangle=({\prod }_{e\in E}{C}_{e}){\left\vert+\right\rangle }^{\otimes n}\)9, where e is a hyperedge connecting vertices {i1, i2, . . . , im} and \({C}_{e}=I-2({\left\vert 1\right\rangle }_{{i}_{1}}{\left\vert 1\right\rangle }_{{i}_{2}}\cdots {\left\vert 1\right\rangle }_{{i}_{m}})\cdot ({\left\langle 1\right\vert }_{{i}_{1}}{\left\langle 1\right\vert }_{{i}_{2}}\cdots {\left\langle 1\right\vert }_{{i}_{m}})\) is the corresponding multiqubit controlled-Z gates. To show the LU transformation, as an example, we consider the case when applying the Pauli X-operation on the kth qubit. The state can be written as:

$${X}_{k}\left\vert HG\right\rangle= {X}_{k}(\mathop{\prod}\limits_{e\in E}{C}_{e}){\left\vert+\right\rangle }^{\otimes n}\\= (\mathop{\prod}\limits_{e\in E,e\not\ni k}{C}_{e}){X}_{k}(\mathop{\prod}\limits_{e\in E,e\ni k}{C}_{e}){\left\vert+\right\rangle }^{\otimes n}\\= (\mathop{\prod}\limits_{e\in E,e\not\ni k}{C}_{e})\cdot \left[\right.{X}_{k}(\mathop{\prod}\limits_{e\in E,e\ni k}{C}_{e}){X}_{k}\left]\right.{\left\vert+\right\rangle }^{\otimes n}\\= (\mathop{\prod }\limits_{e\in E,e\not\ni k}{C}_{e})\cdot (\mathop{\prod}\limits_{e\in E,e\ni k}{X}_{k}{C}_{e}{X}_{k}){\left\vert+\right\rangle }^{\otimes n}.$$
(11)

Now we focus on to the single operator XkCeXk. Assume the edge e connects vertices {1, 2, . . . , m} and for simplicity we can assume k = 1 is the first vertex (this does not sacrifice generality). Following the above assumption, we can write the operator explicitly as:

$${X}_{k}{C}_{e}{X}_{k}= {X}_{k}(I-2\left\vert 11\cdots 1\right\rangle \left\langle 11\cdots 1\right\vert ){X}_{k}\\= I-2\left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert$$
(12)

Next step we separate Ce out on the left side. Notice that \(I={C}_{e}^{2}\) and

$$\left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert= (I-2\left\vert 11\cdots 1\right\rangle \left\langle 11\cdots 1\right\vert )\cdot \left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert \\= {C}_{e}\left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert$$
(13)

Therefore, we have

$${X}_{k}{C}_{e}{X}_{k}= I-2\left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert\hfill \\ = {C}_{e}\cdot ({C}_{e}-2\left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert )\hfill\\ = {C}_{e}\cdot (I-2\left\vert 11\cdots 1\right\rangle \left\langle 11\cdots 1\right\vert -2\left\vert 01\cdots 1\right\rangle \left\langle 01\cdots 1\right\vert )\\ = {C}_{e}\cdot \left(I-2\cdot \underbrace{(\left\vert 1\right\rangle \left\langle 1\right\vert+\left\vert 0\right\rangle \left\langle 0\right\vert )}_{\begin{array}{c}{I}_{k}\end{array}}\otimes \underbrace{\left\vert 1\cdots 1\right\rangle \left\langle 11\cdots 1\right\vert }_{\begin{array}{c}m-1\end{array}}\right)\hfill\\= {C}_{e}({I}_{k}\otimes {C}_{e/\{k\}})$$
(14)

where Ce/{k} represents the multiqubit controlled gates corresponding to a new hyperedge {1, 2, . . . , k − 1, k + 1, . . , m}.

Finally, we complete the proof by substituting the above formula into Eq.(11), which leads to

$${X}_{k}\left\vert G\right\rangle= (\mathop{\prod}\limits_{e\in E,e\not\ni k}{C}_{e})\cdot (\mathop{\prod}\limits_{e\in E,e\ni k}{X}_{k}{C}_{e}{X}_{k}){\left\vert+\right\rangle }^{\otimes n}\\= (\mathop{\prod}\limits_{e\in E,e\not\ni k}{C}_{e})\cdot (\mathop{\prod}\limits_{e\in E,e\ni k}{C}_{e}({I}_{k}\otimes {C}_{e/\{k\}})){\left\vert+\right\rangle }^{\otimes n}\\= (\mathop{\prod}\limits_{e\in E}{C}_{e})\cdot (\mathop{\prod}\limits_{e\in E,e\ni k}{C}_{e/\{k\}}){\left\vert+\right\rangle }^{\otimes n}.$$
(15)

Equation (15) shows the LU transformation rule: applying a local Pauli X gate on a qubit equals to applying a series of multiqubit controlled-Z gates which connect other qubits that share the same edge with it.

We take an example to illustrate local unitary transformation, as shown in Fig. 1c. The initial state is

$$\left\vert \psi \right\rangle= \left\vert 0000\right\rangle+\left\vert 0001\right\rangle+\left\vert 0010\right\rangle+\left\vert 0011\right\rangle \\ +\left\vert 0100\right\rangle -\left\vert 0101\right\rangle+\left\vert 0110\right\rangle+\left\vert 0111\right\rangle \\ +\left\vert 1000\right\rangle+\left\vert 1001\right\rangle+\left\vert 1010\right\rangle+\left\vert 1011\right\rangle \\ -\left\vert 1100\right\rangle -\left\vert 1101\right\rangle -\left\vert 1110\right\rangle -\left\vert 1111\right\rangle$$
(16)

After applying X3, which flips the third qubit, the state becomes

$$\left\vert \psi \right\rangle=\left\vert 0000\right\rangle+\left\vert 0001\right\rangle+\left\vert 0010\right\rangle+\left\vert 0011\right\rangle \\+\left\vert 0100\right\rangle+\left\vert 0101\right\rangle+\left\vert 0110\right\rangle -\left\vert 0111\right\rangle \\+\left\vert 1000\right\rangle+\left\vert 1001\right\rangle+\left\vert 1010\right\rangle+\left\vert 1011\right\rangle \\ -\left\vert 1100\right\rangle -\left\vert 1101\right\rangle -\left\vert 1110\right\rangle -\left\vert 1111\right\rangle$$
(17)

which can be quickly verified as the expression for the second hypergraph state in Fig. 1c. Following a similar procedure, the hypergraph can be simplified to only two edges as shown in Fig. 1c. The rule of LU transformation can be graphically described as the X(k) operation on the qubit k removes or adds these hyper-edges in E(k) depending on whether they exist already or not, where E(k) represents all hyper-edges that contain qubit k but removing qubit k out. The Z(k) operation on the qubit k remove the one-edge on the qubit k.

Measurement basis for the Mermin–Klyshko (MK) polynomials

We here derive the basis used for the evaluation of MK polynomials M4 and \({M}_{4}^{{\prime} }\). The general form of Mn is given as37:

$${M}_{n}=\frac{1}{2}{M}_{n-1}({a}_{n}+{a}_{n}^{{\prime} })+\frac{1}{2}{M}_{n-1}^{{\prime} }({a}_{n}-{a}_{n}^{{\prime} })$$
(18)

where an and \({a}_{n}^{{\prime} }\) are single-qubit operators and M1 = a1. \({M}_{n}^{{\prime} }\) can be obtained by interchanging the terms with and without the prime. In particular, for the four-qubit state, we then have M4 and \({M}_{4}^{{\prime} }\):

$$\left\{\begin{array}{l}{M}_{4}=\frac{1}{2}{M}_{3}({a}_{4}+{a}_{4}^{{\prime} })+\frac{1}{2}{M}_{3}^{{\prime} }({a}_{4}-{a}_{4}^{{\prime} })\quad \\ {M}_{4}^{{\prime} }=\frac{1}{2}{M}_{3}^{{\prime} }({a}_{4}+{a}_{4}^{{\prime} })-\frac{1}{2}{M}_{3}({a}_{4}-{a}_{4}^{{\prime} }).\quad \end{array}\right.$$
(19)

Similarly, {M3, M2} and {\({M}_{3}^{{\prime} },{M}_{2}^{{\prime} }\)} can be obtained. We instead use an alternative way by dividing the original 4-qubit operators into 2-qubit by 2-qubit parts because of the implementation of qubit-qudit mapping in our device. This leads to the construction of the MK polynomials M4 and \({M}_{4}^{{\prime} }\) from M2 and \({M}_{2}^{{\prime} }\):

$$\left\{\begin{array}{l}{M}_{4}=\frac{1}{2}\left[\right.{M}_{2}({a}_{3}{a}_{4}^{{\prime} }+{a}_{3}^{{\prime} }{a}_{4})+{M}_{2}^{{\prime} }({a}_{3}{a}_{4}-{a}_{3}^{{\prime} }{a}_{4}^{{\prime} })\left]\right.\quad \\ {M}_{4}^{{\prime} }=\frac{1}{2}\left[\right.{M}_{2}^{{\prime} }({a}_{3}{a}_{4}^{{\prime} }+{a}_{3}^{{\prime} }{a}_{4})-{M}_{2}({a}_{3}{a}_{4}-{a}_{3}^{{\prime} }{a}_{4}^{{\prime} })\left]\right..\quad \end{array}\right.$$
(20)

In experiment, we first measured the \({M}_{2},\, {M}_{2}^{{\prime} },\, ({a}_{3}{a}_{4}^{{\prime} }+{a}_{3}^{{\prime} }{a}_{4})\) and \(({a}_{3}{a}_{4}-{a}_{3}^{{\prime} }{a}_{4}^{{\prime} })\), and then estimated the MK polynomials M4 and \({M}_{4}^{{\prime} }\). A total number of 64 bases are required for M4 and \({M}_{4}^{{\prime} }\), each of which is determined by the choice of the corresponding ai and \({a}_{i}^{{\prime} }\).

Efficient verification of hypergraph states

In blind quantum computation, clients use the expensive resource states shared by the server to perform their measurements. In such a scenario, the average fidelity of the states generated by the server has to be verified before computation. Ideally, the clients are capable of estimating a lower bound of the state fidelity and verifying genuine entanglement, without much cost. We here use a protocol of color-encoding stabilizers41. To achieve a verification of fidelity larger than 1 − ϵ0, the number of states required is given by

$$N=\left\lceil \frac{{{{{{\rm{ln}}}}}}(\delta)}{{{{{{\rm{ln}}}}}}(1-\epsilon_0/s)} \right\rceil,$$
(21)

where s is the minimum number of colors in the hypergraph state, δ is the significance level and ϵ0 denotes the error. This formula can be better understood in the following form

$$\delta \ge {(1-{\epsilon }_{0}/s)}^{N},$$
(22)

where the right-hand side represents a total passing probability of the total N tests for a state with an infidelity ϵ0. When this probability is smaller than the chosen significance level and a passing event occurs on the client side, we can draw the conclusion that the real infidelity of the state generated from the server should satisfy ϵ < ϵ0 with a significance level δ.

A simple transformation of Eq. (21) gives

$$\bar{F}\ge s\cdot {\delta }^{1/N}-(s-1).$$
(23)

In the ideal case, if the generated state is exactly the target hypergraph state, i.e, F = 1, the probability of passing the test is always 100%, while increasing the number of tests will result in a tighter bound (smaller ϵ0). In reality, for experimental states with non-unit fidelity, the total passing probability will decrease exponentially with the number of tests N. When we define the single-test passing probability as \(\bar{P}\), the total passing probability will take the form of \({\bar{P}}^{N}\), which should be kept above the significance level δ. Therefore, for a selected significance level, the maximum number of tests, which corresponds to the tightest bound on fidelity, should satisfy \({\bar{P}}^{N}=\delta\). Replacing δ by \({\bar{P}}^{N}\) in Eq. (23) thus returns

$$\bar{F}\ge s\cdot \bar{P}-(s-1).$$
(24)