Introduction

It has been reported that many researchers have been working tirelessly to build a fault-tolerant quantum computer and quantum algorithms for years. Recently, the development of quantum computing has been huge research attention. The main reason is the rise of the noisy intermediate-scale quantum (NISQ) computers1, which have 50–100 qubits, and its quantum error corrections are not yet implemented. They are developed using superconducting2 and trapped ion3,4 systems. Although the number of qubits is small and the fidelity of operations is not very high, programmable quantum computers have been made available, not only for researchers but also for public users. For instance, IBM released IBM Q Experience in 2016, Rigetti released Quantum Cloud Services in 2018, and IonQ is going to start Quantum Cloud Service in 2019. Software stacks for NISQ computers have also been extensively developed, for instance, Qiskit5 by IBM, Forest6 by Rigetti, and Cirq7 by Google. Researchers are looking for killer applications for NISQ. Quantum chemistry is one of the biggest targets2,8,9,10. Optimization problem11,12,13 and machine learning14,15,16,17 are also attractive applications. For finance, some algorithms have also been proposed18,19,20.

In this paper, we focus on variational quantum eigensolver (VQE), which is a quantum-classical hybrid algorithm proposed by Peruzzo et al.8 to compute eigenvalues and eigenvectors of matrices such as Hamiltonians. VQE has been applied in various fields such as quantum chemistry21 and is extensively being studied because NISQ computers can handle only short-depth circuits and it is necessary to combine them with classical computers. Such hybrid algorithms are relatively robust to noise compared with full-quantum algorithms. Interested readers should refer to a review by McArdle et al.22 for details of VQE.

VQE minimizes the expectation value of the input operator by varying the quantum state \(\left|\psi (\theta )\right\rangle\) with parameters θ. The expectation value of an operator A with parameters θ can be expressed as 〈Aθ = 〈ψ(θ)Aψ(θ)〉. In quantum chemistry, an operator A is usually a qubit Hamiltonian mapped from a fermionic Hamiltonian of molecules. A qubit Hamiltonian can be written as a linear combination of tensor products of Pauli operators including the identity operator; i.e., \(A=\mathop{\sum }\nolimits_{i = 1}^{n}{a}_{i}{P}_{i}\), where the tensor product of Pauli operators \({P}_{i}\in {\{{\sigma }^{x},{\sigma }^{y},{\sigma }^{z},I\}}^{\otimes N}\) is referred to as Pauli string. VQE minimizes the expectation value by applying optimization algorithms for classical computers as follows:

$$\mathop{\min }\limits_{\theta }{\langle A\rangle }_{\theta }=\mathop{\min }\limits_{\theta }\langle \psi (\theta )| A\psi (\theta )\rangle$$
(1)
$$\quad =\mathop{\min }\limits_{\theta }\mathop{\sum }\limits_{i = 1}^{n}{a}_{i}\langle \psi (\theta )| {P}_{i}\psi (\theta )\rangle .$$
(2)

Quantum computers can be used to evaluate the expectation values of Pauli strings 〈ψ(θ)Piψ(θ)〉.

Algorithms require a large number of executions of quantum circuits to evaluate the expectation values of observables. According to Wecker et al.23, “the required number of measurements is astronomically large for quantum chemistry applications to molecules”. VQE consists of three nested iterations:

  • Outer iteration: to update the parameters θ of quantum state \(\left|\psi (\theta )\right\rangle\),

  • Middle iteration: to evaluate the expectation value by calculating the weighted sum of Pauli strings, and

  • Inner iteration: to evaluate the expectation value of a Pauli string through sampling.

The inner iteration evaluates Pauli strings as an expectation value with multiple samples. This requires O(ϵ−2) samples for the statistical error ϵ. To reduce the inner iteration, Wang et al.24 proposed another theoretical approach.

Herein, we focus on how to reduce the number of measurements in the middle iteration. If Pauli strings are commutative, it implies that they are compatible; i.e., they are jointly measurable. McClean et al.25 suggested a grouping of jointly measurable Pauli strings by using sequential measurements and pointed out the covariance effect. Bravyi et al.26 introduced the notion of grouping based on a tensor product basis (TPB). Kandala et al.2 addressed the grouping of qubit Hamiltonians using TPB and analyzed the distribution of the standard error of its expectation value numerically. Incompatibility by TPB can be represented by a graph called Pauli graph. It has been known that the grouping of Pauli strings can be reduced to the coloring problem of the Pauli graph. Although the graph coloring problem is an NP-complete problem, we can apply heuristic algorithms to obtain groups of Pauli strings, e.g., the largest-degree-first coloring (LDFC) algorithm.

In this paper, we propose the use of entangled measurements in addition to TPB for the grouping of Pauli strings. Entangled measurements are measurements of entangled observables. Entangled observables are described by positive operator-valued measures that are not separable positive operator-valued measures27. The advantage of using entangled measurements is that it makes it possible to achieve a smaller number of groups; however, it is necessary to add extra CNOT gates to construct a measurement circuit corresponding to the group, which may affect the fidelity of the resulting expectation value. Therefore, we evaluate the properties of our grouping from both theoretical and experimental viewpoints. Furthermore, we also propose a sampling strategy to mitigate the covariance effect by a group of qubit Hamiltonians.

The contributions of this paper are as follows:

  1. 1.

    Grouping of Pauli strings with a part of entangled measurements.

  2. 2.

    Measurement strategy based on the sizes of groups to suppress the covariance effects.

  3. 3.

    Evaluation of the effect of the errors caused by additional CNOT gates.

  4. 4.

    Proof-of-concept demonstration of a simple Hamiltonian on real quantum computers.

Results

Evaluation of Pauli strings

Let us consider the evaluation of the expectation values of quantum observables. Target observables are mainly Hamiltonians. Such observables of the multipartite qubit systems can be written as a linear combination of the Pauli strings \(A=\mathop{\sum }\nolimits_{i = 1}^{n}{a}_{i}{P}_{i},\) where ai denotes a real number and Pi denotes an N-qubit Pauli string. When the observables are not for the qubit systems, the Jordan–Wigner transformation for fermions or the Jordan–Schwinger transformation for bosons can be used to map the qubit systems from other systems. Herein, we present the transformations for fermions in more detail. The second quantized fermionic Hamiltonian can be expressed as

$$H=\mathop{\sum }\limits_{ij}{h}_{ij}{c}_{i}^{\dagger }{c}_{j}+\frac{1}{2}\mathop{\sum }\limits_{ijkl}{h}_{ijkl}{c}_{i}^{\dagger }{c}_{j}^{\dagger }{c}_{l}{c}_{k},$$
(3)

where hij denotes kinetic and potential energy and hijkl denotes interaction. Herein, ci denotes an annihilation operator of the i-th fermion, and \({c}_{j}^{\dagger }\) denotes a creation operator of the j-th fermion. There are three well-known transformations from fermionic systems to qubit systems: the Jordan–Wigner transformation28, that was originally proposed for lattice systems, parity transformation, and Bravyi–Kitaev transformation29,30. Note that the difference between transformations can affect the results of grouping.

When one prepares a quantum state \(\left|\psi \right\rangle\) in a quantum computer, the expectation value of a quantum observable A can be expressed as 〈A〉 = 〈ψAψ〉. The expectation values of Pauli operators can be evaluated as follows. First, a measurement in the computational basis is available in a quantum computer. Then, by employing a single-qubit unitary rotation before the measurements, we can implement the measurements of other bases. Calculation \(\langle A\rangle =\mathop{\sum }\nolimits_{i = 1}^{n}{a}_{i}\langle {P}_{i}\rangle\) gives the expectation value of A.

Grouping Pauli strings with TPB

Some Pauli strings are simultaneously diagonalizable by using the tensor product of bases \(\{{\mathcal{X}},{\mathcal{Y}},{\mathcal{Z}}\}\) where \({\mathcal{X}}=\left\{\left|0\right\rangle \pm \left|1\right\rangle \right\}\), \({\mathcal{Y}}=\left\{\left|0\right\rangle \pm i\left|1\right\rangle \right\}\), and \({\mathcal{Z}}=\left\{\left|0\right\rangle ,\left|1\right\rangle \right\}\). Herein, the sets of bases are referred to as TPB sets. This implies that some Pauli strings that are simultaneously diagonalizable by using TPB are jointly measurable by TPB. This also implies that such Pauli strings can be grouped and we can obtain their expectation values at the same time.

We introduce the Pauli graph G = (V, E) of an observable A = ∑iaiPi as follows: nodes V correspond to Pauli strings Pi and edge (u, v) E spans if Pauli strings u and v are not jointly measurable by TPB. Further, a coloring of the Pauli graph gives groups of the Pauli strings that are jointly measurable. For instance, Qiskit5 adopts the LDFC algorithm, which first sorts the nodes in descending order of degree and then assigns the smallest color number not used by its colored neighbors. The details of the Pauli graph and LDFC algorithm are presented in Appendix A of the Supplementary Information. It executes fast for practical graphs of interest, and the number of the resulting groups is close to the lower bound by the max clique of the Pauli graph (see Table 1 for details).

Table 1 Comparison of the numbers of groups.

Grouping with TPB and entangled measurements

Measurements by TPB are separable measurements. We propose taking advantage of entangled measurements. We introduce a new grouping approach for Pauli strings that uses not only TPB but also entangled measurements such as Bell measurements to reduce the number of measurements.

For instance, the expectation values of σxσx, σyσy, and σzσz cannot be obtained simultaneously from TPB measurements. It requires three types of measurements to compute the expectation values of σxσx, σyσy, and σzσz; however, these Pauli strings can be measured jointly using Bell measurement (see the Methods section for details).

Simultaneous diagonalization provides a joint measurement using entangled observables. The incompatibility of Pauli strings can be checked by parity of the number of different Pauli operators σx, σy, and σz. It is possible to construct an extended Pauli graph based on this incompatibility and calculate the number of groups using the LDFC algorithm, which we refer to as “ALL” in the subsequent sections. We will calculate the number of groups using all measurements and LDFC later (Table 1). However, the computational cost of the circuit construction and the circuit depth increase according to the size of entanglements. Therefore, it may not be practical for NISQ computers to use all measurements due to the fidelity of operations of NISQ computers, especially multi-qubit operations.

To mitigate the drawback, we propose another approach that involves the use of a part of the entanglement of the observables. It consists of two phases: choosing a set of entangled observables and grouping of Pauli strings with TPB and the set of entangled observables.

The first phase is to choose entangled measurements (e.g., Bell measurements and omega measurements31). We would present details of the Bell measurements in the Method section and present other two-qubit entangled measurements in Appendix B of the Supplementary Information. One constructs quantum circuits corresponding to the entangled measurements. This task can be done by using simultaneous diagonalization as a preprocessing technique. We can alternatively use other methods based on Clifford gates, which was proposed recently32,33,34. Because quantum circuits can be generated in advance in this phase, therefore, the cost of circuit construction in the next phase can be reduced.

The second phase is to construct groups of Pauli strings using TPB and the entangled measurements chosen in the first phase. It is possible to construct a Pauli graph in the same way as using TPB-based methods and sort the nodes in descending order of degree. Then, the nodes can be merged if they are jointly measurable by using TPB and the entangled measurements. It is noteworthy that this joint measurability depends on merge history. If one merges nodes, it is necessary to use the entangled measurement at particular positions of Pauli strings, and after that, it is not possible to change the measurement. The merged nodes correspond to groups of measurements, and one can construct quantum circuits corresponding to the groups and perform the measurements. We refer to the grouping that involves the use of TPB and Bell measurements as “TPB+Bell”, and the grouping with TPB and all two-qubit measurements as “TPB+2Q”. Refer to the Methods section for details of the grouping algorithm.

Entanglement of observables could be considered as a resource of a joint measurement. In experiments with NISQ computers, available entangled measurements are limited because of multi-qubit gate errors that may occur. Therefore, we need to consider algorithms with available measurements. For instance, if one uses two-qubit entangled measurements, only one entangler (e.g., CNOT gate) is required for each of the qubits. Our proposed method requires constant depth measurement circuits for fixed entangled measurements. The advantage of our approach is that we can adjust the depth of the additional circuits for entangled measurements by considering errors due to multi-qubit gates.

Standard error caused by the grouping of Pauli strings

McClean et al.25 discussed covariance effects and showed that the additional covariance caused as a result of grouping may require more measurements. However, Kandala et al.2 numerically verified that the grouping with TPB has fewer errors than the no-grouping strategy for some molecules. It is noteworthy that the square of the error is in inverse proportion to the number of samples. We show mathematically that if the number of samples in each group is in proportion to the size of the group, the standard error of a grouping is smaller than that of no-grouping in Appendix C of the Supplementary Information, where the total numbers of samples for the grouping and no-grouping strategies are the same.

Number of groups

We applied four types of grouping methods (one with TPB; one with TPB and Bell measurements; one with TPB and all two-qubit entangled measurements; and one with all measurements) to the following molecules: LiH, BeH2, H2O, NH3, and HCl. We also computed the maximal clique sizes of Pauli graphs for TPB by applying the MCQD algorithm35. We ran MCQD on Intel Xeon E5-2690 CPU with a 1-hour time limit and were able to observe the maximum cliques for all Pauli graphs except NH3 Parity and Bravyi–Kitaev. Note that the Hamiltonians of the molecules are presented as ancillary files in a previous study26.

We present a comparison of the numbers of groups in Table 1. The clique sizes with ‘*’ are the maximum. JW and BK are Jordan–Wigner and Bravyi–Kitaev transformations, respectively. TPB, TPB+Bell, TPB+2Q, and ALL denote the groupings using TPB, TPB and Bell measurements, TPB and all two-qubit entangled measurements, and all measurements, respectively. The grouping with TPB yielded several groups that are slightly larger than the clique sizes of the Pauli graphs. It should be noted that the grouping with TPB cannot yield fewer numbers of groups than the clique size because it is based on a coloring algorithm (see Eq. 64.136). On the other hand, the groupings using entangled measurements (TPB+Bell, TPB+2Q, and ALL) achieved fewer numbers than the clique sizes. The grouping with TPB and two-qubit entangled measurements (TPB+2Q) does not always result in a fewer number of groups than those obtained by grouping with TPB and Bell measurements (TPB+Bell). This implies that our heuristic algorithm cannot take full advantage of more choices of measurements. We also observed that the grouping with all measurements (ALL) does not always result in the smallest number of groups among all methods. This implies that LDFC cannot be used to obtain good solutions for the extended Pauli graphs. The number of groups depends on the type of transformations as well as the grouping methods used. For instance, for Jordan–Wigner transformation, TPB+Bell results in a smaller number of groups for most molecules than groupings using TPB and TPB+2Q.

We observed that the entangled measurements are effective in reducing the number of measurements of Pauli strings. However, there exist various errors in using NISQ computers, especially the two-qubit gate error that is generally much larger than a one-qubit error. In the next section, we discuss the effects of additional CNOT gates introduced in entangled measurements.

Effect of additional CNOT gates

Entangled measurements require additional two-qubit gates. We evaluate the effect of additional CNOT gates for a Bell measurement in one of the simplest models, two-qubit antiferromagnetic Heisenberg model, whose Hamiltonian can be expressed as

$$H={\sigma }^{x}{\sigma }^{x}+{\sigma }^{y}{\sigma }^{y}+{\sigma }^{z}{\sigma }^{z}.$$
(4)

Herein, we set the coupling constant to be 1 for simplicity. These Pauli strings cannot be grouped by using TPB but can be grouped by using a Bell measurement. We compute the expectation value with the ground state using a noise model in Qiskit Aer and readout error mitigation37 in Qiskit Ignis. We assigned 2000 samples to each group of no-grouping (three groups) and 6000 samples to a group of the grouping obtained by using a Bell measurement (one group). We assume that the one-qubit readout errors are p(10) = 0.01 and p(01) = 0.1, and the one-qubit depolarizing error is 0.001. We simulated the expectation value of the Hamiltonian by varying the two-qubit depolarizing error. See Table 2 for the results. The row “No-grouping (raw)” denotes the expectation values with the standard error, where we did not apply the readout error mitigation. On the other hand, “No-grouping (mit)” denotes the results obtained when the readout error mitigation was applied. The rows of “Bell (raw)” and “Bell (mit)” show the results of the grouping of a Bell measurement with and without the readout error mitigation, respectively. We observed that the grouping with a Bell measurement achieved comparable expectation value with less standard error compared with no-grouping up to two-qubit error 0.010. The grouping with a Bell measurement resulted in worse expectation values with two-qubit error more than 0.010 owing to the extra CNOT gate introduced by using the Bell measurement. It should be noted that we implemented our program with Qiskit Terra 0.7.2, Qiskit Aer 0.1.1, Qiskit Ignis 0.1.0, and Qiskit Aqua 0.4.1.

Table 2 Simulation results of the expectation values and standard errors of the two-qubit antiferromagnetic Heisenberg model.

We also evaluated additional CNOT gate effects using real quantum computers, IBM Q Tokyo and IBM Q Poughkeepsie (Table 3). Note that both have 20 qubits. We picked out the pair of qubits with the best fidelity based on the property data of the devices when we executed the circuits. The properties of the devices, including connectivity and error distributions, can be found in the literature38. We observed that the grouping obtained using the Bell measurement achieved comparable expectation value with less standard error compared with the no-grouping type. These experiments suggest that readout error has a significant influence (more than the additional two-qubit error).

Table 3 Experiment on the additional qubit gates using IBM Q Tokyo and IBM Q Poughkeepsie.

VQE with entangled measurements

We incorporate the grouping with Bell measurements into VQE to calculate the ground state energy of the two-qubit antiferromagnetic Heisenberg model (4), and we use the no-grouping as the baseline. We compared the number of circuits to be converged. We used Ry trial wave function with depth 1 as the variational form and the simultaneous perturbation stochastic approximation (SPSA)39 as the optimizer. We executed VQE algorithm with 40 iteration steps. We applied the readout error mitigation and calibrated the mitigation data every 10 iteration steps of VQE. We fixed the number of executions of quantum circuits to 8192 samples, i.e., the maximum number for a job of the IBM Q systems as of July 2019. See Fig. 1 for the results. The horizontal axis and the vertical axis represent the number of quantum circuits used and expectation values of the Hamiltonian, respectively. VQE with a Bell measurement used one circuit for each iteration, whereas VQE without grouping used three circuits for each iteration. We plotted the standard error as well as the expectation values, but the error bar is small enough to be overshadowed by point. We observed that VQE with a Bell measurement required fewer circuits than VQE with no-grouping to converge. We will present more results and discuss them in Appendix D of the Supplementary Information.

Fig. 1: Comparison of VQE experiments with two different groupings.
figure 1

Panels (a) and (b) denote the results of VQE experiments with no-grouping and one with the grouping using a Bell measurement, respectively. The horizontal and the vertical axes represent the number of quantum circuits used and expectation values of the Heisenberg Hamiltonian, respectively. The graph legends (plus and minus) are used to minimize the expectation value in the SPSA algorithm. The black dashed line and the green one denote the exact ground state energy and the final result of the VQE experiment, respectively.

Discussion

In this paper, we presented the efficient evaluation of Pauli strings with a part of entangled measurements. We propose reducing the number of groups of Pauli strings that are jointly measurable by using both TPB and a part of entangled measurements. It is remarkable that grouping by using TPB and Bell measurements (TPB+Bell) produces as few number of groups as the grouping obtained by using all measurements (ALL) for some molecules with the Jordan–Wigner transformation as shown in Table 1 as the depth of the additional CNOT gates required for TPB+Bell is constant, 1. Jordan–Wigner transformation has an even number of Pauli σx and σy for the fermion Hamiltonian. This even structure does not appear in Bravyi–Kitaev and parity transformations. This property might be fit for the Bell measurement, which is a joint measurement of σxσx, σyσy, and σzσz. It should be noted that grouping using all measurements were obtained by applying LDFC to the extended Pauli graph; thus, the solutions may be suboptimal, and they can be improved by using more sophisticated coloring algorithms. We also showed that if the number of samples in each group is in proportion to the size of the group, the standard error obtained with grouping is always equal to or smaller than that with no-grouping.

We discuss the connectivity of qubits of NISQ computers. There are two types of NISQ computers: one has full connectivity (e.g., trapped ion systems) and the other has limited connectivity such as nearest neighbor connectivity (e.g., superconducting systems). It might be difficult to realize a quantum circuit corresponding to entangled measurements for devices with limited connectivity of qubits. There are two strategies to apply our proposed method for such a case: (1) one limits the grouping algorithm to adapt the connectivity or (2) one changes the initial layout of the qubits. For the latter, our proposed method using two-qubit measurements needs one nonlocal gate per two qubits and then low connectivity. For example, a one-dimensional lattice is sufficient to map the measurement circuits.

Public quantum computers are available as cloud service today. The computation time is bounded by job time, and we refer to it as job bound. The time needed for a job to be completed is equal to the sum of waiting and execution time. The execution time can be regarded as the execution time of the circuits included in the job. In other words, execution time is roughly proportional to the total number of circuits to be executed. Therefore, reducing the number of circuits in grouping contributes to the improvement of execution time.

In the present study, we implement the entangled measurements using the Heisenberg picture in the software layer. There are other possible candidates for implementing joint measurements. The entangled measurements can be implemented in the hardware layer40, called joint readout. The joint readout may make our proposal more accurate and precise. Direct or indirect sequential measurements also provide joint measurements.

To accelerate the iterations of VQE, several approaches have been discussed. An efficient partitioning using mean-field approach was proposed by Izmaylov et al.41 It requires feedforward measurements, which are not implemented in the current devices. However, once the feedforward is implemented, we may achieve better efficiency when it is used in combination with our proposed methods. A sequential minimal optimization method42 reduces the outer iteration. The proposed method converges faster than previous optimizers and uses no hyperparameter. Fermionic representability conditions can be used to reduce the middle iterations43. Some efficiency improvements that do not relate to iterations were studied44,45,46,47,48. Our proposed method can be used together with them.

Let us briefly review the history of the grouping based on TPB. Kandala et al.2 used the grouping by TPB in their experiments on some molecules. Qiskit5 presented the implementation of a coloring-based grouping algorithm of the Pauli graph in June 2018, which was released as QISKit ACQUA 0.1.0. The grouping by TPB was also implemented in the OpenFermion49 v0.9.0 (December 2018) and PyQuil6 2.2 (January 2019). Verteletskyi et al.50 systematically studied the heuristic algorithms for grouping using the TPB.

Recently, many studies to enhance the evaluation of observables have been presented32,33,34,51,52,53,54,55. Entangled measurements have been used either implicitly or explicitly in some studies32,33,34,53,54,55. In contrast to these studies that use all measurements, we employ TPB and a part of entangled measurements. Jena et al.32 showed that grouping of Pauli strings is NP-hard in general qudit system. They discussed the case when the available gate set is limited to Clifford gates or single-qudit Clifford gates, whereas we discuss the case where available measurements are limited. The diagonalization by Clifford operators corresponds to all measurements, and the diagonalization by using single-qubit Clifford corresponds to TPB. Yen et al.33 proposed a conversion method from groups of commuting Pauli strings into TPB using unitary transformations. Their unitary transformations were discussed in the Schrödinger picture, but they used all measurements in the Heisenberg picture and proposed efficient circuit construction using Clifford gates. Gokhale et al.34 used entangled measurements to measure commuting Pauli strings and developed a circuit synthesis tool for joint measurement based on the stabilizer. Furthermore, their results have been demonstrated experimentally in computing the ground state energy of deuteron on the IBM Q Tokyo. Crawford et al.53 proposed taking into account coefficients of Pauli strings for the grouping to mitigate the covariance effect, whereas we propose an adjustment of the number of samples while taking into account the sizes of groups. A linear reduction of the number of groups from O(N4) to O(N3) for molecular Hamiltonians has been proven in different ways54,55. Izmaylov et al.51 and Huggins et al.52 developed different methods that are not based on a joint measurement of the Pauli strings. Jiang et al.56 used a Bell measurement on a system and an ancilla to implement a symmetric informationally complete POVM, whereas our proposal uses a Bell measurement on systems.

Methods

Entangled measurements

Herein, we introduce entangled measurements. Entanglement is a specific property of quantum theory and an essential concept in quantum information science and technology. Entanglement is originally defined for quantum states. Bell states are one of the maximally entangled states. Bell states can be defined as follows:

$$\left|{\Phi }^{\pm }\right\rangle =\frac{1}{\sqrt{2}}\left|00\right\rangle \pm \frac{1}{\sqrt{2}}\left|11\right\rangle ,\left|{\Psi }^{\pm }\right\rangle =\frac{1}{\sqrt{2}}\left|01\right\rangle \pm \frac{1}{\sqrt{2}}\left|10\right\rangle .$$

Entanglement of states can be extended to observables. As entanglement of states can be detected by the violation of Bell-CHSH inequality57,58, an entanglement of observables can be detected by the violation of the dual Bell-CHSH inequality27. Measurements of entangled observables are referred to as entangled measurements. Let us introduce examples of entangled measurements. The first example of entangled measurements is Bell measurements defined as the projective measurements on Bell states. The Bell measurements are used in the quantum teleportation protocol59. A remarkable property of the Bell measurement is that expectation values of σx σx, σy σy, and σz σz can be calculated from the result of the Bell measurement. This property is based on the following fact:

$$\begin{array}{ccc}{\sigma }^{x}\otimes {\sigma }^{x}&=&\left|{\Psi }^{+}\right\rangle \left\langle {\Psi }^{+}\right|+\left|{\Phi }^{+}\right\rangle \left\langle {\Phi }^{+}\right|-\left|{\Psi }^{-}\right\rangle \left\langle {\Psi }^{-}\right|-\left|{\Phi }^{-}\right\rangle \left\langle {\Phi }^{-}\right|,\\ {\sigma }^{y}\otimes {\sigma }^{y}&=&\left|{\Psi }^{+}\right\rangle \left\langle {\Psi }^{+}\right|+\left|{\Phi }^{-}\right\rangle \left\langle {\Phi }^{-}\right|-\left|{\Phi }^{+}\right\rangle \left\langle {\Phi }^{+}\right|-\left|{\Psi }^{-}\right\rangle \left\langle {\Psi }^{-}\right|,\\ {\sigma }^{z}\otimes {\sigma }^{z}&=&\left|{\Phi }^{+}\right\rangle \left\langle {\Phi }^{+}\right|+\left|{\Phi }^{-}\right\rangle \left\langle {\Phi }^{-}\right|-\left|{\Psi }^{+}\right\rangle \left\langle {\Psi }^{+}\right|-\left|{\Psi }^{-}\right\rangle \left\langle {\Psi }^{-}\right|.\end{array}$$

CNOT and Hadamard gates are needed to implement the Bell measurement on a quantum computer. The quantum circuit is shown in Fig. 2. We will describe other useful entangled measurements in Appendix B of the Supplementary Information.

Fig. 2: Quantum circuit of the Bell measurement.
figure 2

This is an inverse process of creating Bell states.

Grouping algorithm

We propose a heuristic algorithm of grouping Pauli strings using TPB and a part of entangled measurements greedily. We first make a Pauli graph as the grouping with TPB does and then merge nodes with high degrees if they are jointly measurable by given entangled measurements. To check whether a pair of Pauli strings is compatible, we generate permutations of qubit positions and check if any of the entangled measurements can be applied to the position. The number of resulting groups depends on the order of measurements to be applied in Algorithm 1. We let E = {Bell, TPB} for ‘TPB+Bell’ and E = {Bell, Omega-XX, Omega-YY, Omega-ZZ, Chi, TPB} for ‘TPB+2Q’ in our experiments. See Algorithms 1 and 2 for details of the algorithm and Appendix B of the Supplementary Information for the definitions of the omega and chi measurements.

figure a
figure b