Experimental test of Mermin inequalities on a 5-qubit quantum computer

Violation of Mermin inequalities is tested on the 5-qubit IBM quantum computer. For 3, 4 and 5 parties, quantum states that violate the corresponding Mermin inequalities are constructed using quantum circuits on superconducting qubits. Measurements on different basis are included as additional final gates in the circuits. The experimental results obtained using the quantum computer show violation of all Mermin inequalitites, with a clear degradation of the results in the 5 qubit case. Though this quantum computer is not competitive to test Mermin inequalities as compared to other techniques when applied to few qubits, it does offer the opportunity to explore multipartite entanglement for four and five qubits beyond the reach of other alternative technologies.

Violation of Mermin inequalities is tested on the five qubit IBM quantum computer. For 3, 4 and 5 parties, quantum states that violate the corresponding Mermin inequalities are constructed using quantum circuits on superconducting qubits. Measurements on different basis are included as additional final gates in the circuits. The experimental results obtained using the quantum computer show violation of all Mermin inequalities, with a clear degradation of the results in the 5 qubit case. Though this quantum computer is not competitive to test Mermin inequalities as compared to other techniques when applied to few qubits, it does offer the opportunity to explore multipartite entanglement for four and five qubits beyond the reach of other alternative technologies.
Quantum physics can be discriminated from classical physics using Bell-type inequalities [1]. In particular, the violation of Bell inequalities for two qubits has been extensively verified since they were first checked in atomic physics experiments [2,3]. Later on, the improvement of quantum optics techniques as well as other technologies such as NV-centers has made it possible to eliminate many of the loopholes in the experimental verification of 2-qubit Bell inequalities [3].
An extension of Bell inequalities to a larger number of particles corresponds to the set of Mermin inequalities [4]. Such inequalities should be maximally violated by GHZ-type states [5]. The experimental verification of multipartite Mermin inequalities faces the problem of a good control of three or more qubits, including the generation of entangled states, and the possibility of performing different measurements on each one. Violation of Mermin inequalities has been reported for three qubits [6] and four qubits [7], where all qubits are made out of photons, and for up to 14 qubits with a quantum computer based on ion traps [8].
In the case of superconducting qubits, violation of the CHSH inequality was achieved in [9], whereas the GHZ construction and the 3-qubit Mermin inequality violation was demonstrated by [10]. For a general review of theoretical and experimental progress in Bell inequalities, see [11].
The construction of the first prototypes of quantum computers allows for the possibility of experimenting with quantum states containing more than 2 qubits. In particular, IBM has opened the use of its 5-qubit quantum computer to the community [12]. We here shall report results on the use of this quantum computer to test the violation of Mermin inequalities for 3, 4 and 5 superconducting qubits.

Mermin polynomials
Local realism can be tested using Mermin polynomials. The technique to generate them is explained for example in [13]. The Mermin polynomial for 3-qubits is where a i and a ′ i correspond to two different settings for the measurement of each qubit i. Each measurement can take the values {−1, 1}. Classical theories obey local realism (LR) which translates into a bound for the expectation value of the Mermin polynomial, M 3 LR ≤ 2. Instead, for quantum mechanics (QM) the observables a i and a ′ i are built out of linear combinations of Pauli matrices. Each measurement is expressed as a Kronecker product of the three local measurements and the expectation value for M 3 is the maximum eigenvalue of the resulting 8x8 matrix. In this case, the maximum possible eigenvalue, and therefore the quantum bound, is M 3 QM ≤ 4. We shall shortly construct circuits to check the violation of the classical bound on this inequality. The Mermin polynomial that will be experimentally checked for 4-qubits is In the 5-qubit case, the Mermin polynomial reads , with a classical bound of M 5 LR ≤ 4 and a quantum bound of M 5 QM ≤ 16.

Circuit implementation
There are a number of technical issues associated to the specific implementation of the IBM 5-qubit quantum computer. This quantum computer is based on superconducting flux qubits that live on a fridge with a temperature of about 15 mK, where only one of the qubits can be used to act as the target qubit of any CNOT gate. In the test of Mermin inequalitites, only GHZ-like states have to be created. This requires the use of a Hadamard gate on a control qubit followed by CNOTs targeted to the rest. In order to implement this kind of action we shall need to operate CNOT gates targeted to other qubits. This can be done using the where H 1 and H 2 are Hadamard gates on qubits 1 and 2, whereas CN OT 1→2 is the control-NOT gate which is controlled by qubit 1.
In our choice of settings, the needed GHZ-like states have relative phases, as in the case of 3-qubits, where |φ = 1/ √ 2(|000 + i|111 ). These phases are implemented using S and T gates, which are one-qubit gates that mutiply the |1 term with π/2 and π/4 phases, respectively. Measurements can only be done on the σ z basis, but they can be simulated in another basis with the help of additional gates, namely an H gate for σ x and an S † gate followed by an H gate for σ y .
Another relevant issue to be considered is that not all of the qubits are equally robust in the present quantum computer, some have relaxation and decoherence times larger than others, although all of them are of the order of T = O(100µs). We shall adapt our circuits to minimize the number of gates on the qubits that behave more poorly. For example gates that implement phases that can be put freely in any qubit are allocated to the most robust ones. Figures 1 and 2 represent the three circuits for the 3, 4 and 5 qubit Mermin inequalities. In principle we need to perform as many experiments as the number of terms in the Mermin inequalities (1), (2) and (3). However due to our limited access to the computer and the symmetry of particle exchange of the states and the inequalities, only one experiment for a term representative of each number of primes (a ′ i ) is run. In our choice of settings, the number of primes amounts to the number of σ y measurements, whereas the non primes (a i ) correspond to σ x measurements. We thus have 2 experiments for 3qubits, 5 experiments for 4-qubits and 3 experiments for 5-qubits. Each experiment is run 8192 times, the maximum available, except for the 3-qubit experiments, which have been run only 1024 times. When computing the expected value of the whole polynomial, each experiment is given the corresponding weight. In the errors discussion we compare results obtained when using the symmetry with results obtained without using it, computing all the terms, for the three-qubit case.
FIG. 1: The two circuits used for the three-qubit Mermin inequality. The first circuit corresponds to σxσxσy experiment, and the second circuit to σyσyσy experiment. The S † gates make the difference between a σx and a σy measurement.
FIG. 2: Two of the circuits used for the four-qubit and fivequbit Mermin inequalities. The first circuit corresponds to σyσyσxσx experiment, whereas the second corresponds to σxσyσxσxσy experiment. The S † gates make the difference between a σx and a σy measurement. In order to change from σx to σy, one has to add an S † gate, or remove it to do the opposite. With this technique one can obtain all circuits needed to test the inequalities.

Results
We shall now give a more detailed discussion of the results for the 3-qubits case and an abridged one for the 4 and 5-qubit cases, as much of it is basically the same.
In order to check the violation of the inequality, one has to choose the settings and the corresponding state that maximally violate it. One possibility is to choose settings a i = σ x and a ′ i = σ y for all the qubits. The state that maximizes the quantum violation in this case is |φ = 1/ √ 2(|000 + i|111 ). The 3-qubit Mermin inequality has 4 terms as shown in Eq. (1). In principle, four different circuits are needed, one for each term. The state will be the same for all of them, but the settings change. However, one can use the symmetry of the state and the inequality to reduce the number of measurements needed if there is limited access to the experimental setting as is our case. All the terms that have the same number of primes (a ′ i ) are represented by the same circuit by symmetry. We then considered only two different experiments, with 1024 runs each, the σ x σ x σ y experiment and the σ y σ y σ y experiment. The results are shown in table I . Eight probabilities for each term are obtained. In order to translate these probabilities to the expected values that appear in the inequality, one has to arrange the results in two groups according to the parity of the number of 1 (which represent the value -1.) The expected value of the term is obtained by summing all the probabilities of the results of even parity and substracting the results of odd parity. The correctly weighted sum of the expected values of each term gives the final result M 3 exp = 2.85 ± 0.02.
In the case of 4-qubits, the use of settings a i = σ x and a ′ i = σ y implies that the state that maximizes the quantum violation is |φ = 1/ √ 2(e iπ/4 |0000 + |1111 ). With these settings and this state, 5 experiments are performed, one for each term with different number of primes (2), with 8192 runs for each experiment. A result of M 4 exp = 4.81 ± 0.06 has been obtained.
In the case of 5-qubits, the use of settings a i = σ x and a ′ i = σ y implies that the state that maximizes the quantum violation is |φ = 1/ √ 2(|00000 + |11111 ). With these settings and this state, 3 experiments are performed, one for each term with different number of primes (3), with 8192 runs for each experiment. A result of M 5 exp = 4.05 ± 0.06 has been obtained. This is clearly a poor violation, which is still compatible with local realism. Improvement of the quantum computer is needed to obtain more accurate results.
The results obtained from the IBM quantum computer are subject to different kind of errors.  The stability of the quantum computer is still poor and the same experiments run at different times provide results that differ more than the expected behaviour of statistical fluctuations. As an example, one month after the original runs, the 3-qubit experiment has been run again to compare results. This time, a result of M 3 exp = 2.57 ± 0.02 has been obtained, clearly showing the previous point. An additional run has been done computing separately the four terms of (1), without assuming any symmetry, and a similar result is obtained, M 3 exp = 2.57 ± 0.02, showing that it is safe to assume the symmetry of party exchange.
We may get an estimation of the statistical error as a dispersion around the mean. We may, as well, treat the results as a multinomial distribution, using the expression δp = p(1 − p)/N , which for N=8192 gives δp = O(10 −2 ). The different Mermin inequalities for 3, 4 and 5 qubits require a different number of experiments to be done, which are considered as independent. We may then add in quadrature its errors, which is the figure we associate in the explicit results. In this sense, the 5-qubit result obtained in the present quantum computer does not have sufficient statistical significance to discard local realism.
Furthermore, some of the issues related to the elimination of loopholes can not be addressed. Experiments suffer from errors related to stability, loss of coherence and lack of full fidelity of the quantum gates. This is clearly seen as the violation of Mermin inequalities will deteriorate progressively as the numbers of qubits, and gates used in the experiment, increase. We may think of the experimental verification of Mermin inequalitites as a test of the overall fidelity of the whole Mermin circuits.

Conclusions
Experimental verification of Mermin inequalities for 3, 4 and 5 qubits has been tested on a 5 superconducting qubit IBM quantum computer. Results do show violation of local realism in all cases, with a clear degradation in quality as the number of qubits (and needed gates) increases. Nonetheless, this produces the first experimental violation of 4 and 5-qubit Mermin inequalities with superconducting qubits, though the statistical significance of the second one is still poor. still poor. It should be noted however that in the case of the 4-qubit inequality, the result shows generic non-locality but does not provide evidence for genuine four-particle non-locality, because this would only be implied by M 4 > 8. [14]. It can be argued that the measurements of Mermin polynomials for many qubits can be used as a figure of merit to assess the fidelity of a quantum computer.