Abstract

We propose an efficient algorithm for partitioning Pauli strings into subgroups, which can be simultaneously measured in a single quantum circuit. Our partitioning algorithm drastically reduces the total number of measurements in a variational quantum eigensolver for a quantum chemistry, one of the most promising applications of quantum computing. The algorithm is based on the Ising model optimization problem, which can be quickly solved using an Ising machine. We develop an algorithm that is applicable to problems with sizes larger than the maximum number of variables that an Ising machine can handle (nbit) through its iterative use. The algorithm has much better time complexity and solution optimality than other existing algorithms. We investigate the performance of the algorithm using the second-generation Digital Annealer, a high-performance Ising hardware, for up to 65535 Pauli strings using Hamiltonians of molecules and the full tomography of quantum states. We demonstrate a time complexity of O(N) for N ≤ nbit and O(N2) for N > nbit for the worst case, where N denotes the number of candidate Pauli strings and nbit = 8,192 in this study. The reduction factor, which is the number of Pauli strings divided by the number of obtained partitions, can be 200 at maximum.
1. Introduction
Quantum computing has the potential to outperform classical computing in computational time.1 In particular, among its several practical targets, there has been a major advancement in the areas of quantum chemistry.2 In the current noisy intermediate-scale quantum computing,3 variational quantum eigensolver (VQE) algorithms are extensively studied for quantum chemistry to calculate ground- and excited-state energies of chemicals,4,5 including small molecules,6,7 catalysts, and battery materials.8,9
VQE algorithms are designed to solve the Schrödinger equation,
| 1 |
using variational methods. To solve it using a quantum computer, the Hamiltonian H and wave function ψ are mapped to Ĥ and ψ̂, respectively, through a second quantization:
| 2 |
where ψ̂ can be obtained by a quantum computer. To calculate the ground-state energy, a parametrized quantum state ψ̂(θ) is created using a quantum computer. The parameters θ = {θ1, θ2, ...} are iteratively optimized using a classical computer to minimize the expectation value of the given Hamiltonian Ĥ:
| 3 |
To estimate the expectation value ⟨ψ̂(θ)|Ĥ|ψ̂(θ)⟩ using a quantum computer, the Hamiltonian is decomposed into some Pauli strings:
| 4 |
where Pi denotes the i-th Pauli
string and
denotes the corresponding weight
of Pi.
For the VQE algorithms, the number of Pauli strings scales as O(n4), where n denotes the number of qubits assigned to spin orbitals of a target molecule by a one-to-one correspondence, because the corresponding Hamiltonians only contain two-body interactions. A quite large n value (i.e., a large number of spin orbitals) leads to a large number of required measurements, which limits the ability of quantum computation in general. In principle, to obtain multidimensional information on a target quantum state, we have to prepare its several copies and obtain each one-dimensional information repeatedly through a basis-changing operation prior to each measurement. Furthermore, we need to measure a target quantum state multiple times for each one-dimensional information to obtain the expectation value with some desired precision because each measurement results in the projection of the state onto a measurement basis and we need its average value. This estimation process nature of the expectation value makes the overall algorithm time-consuming; this condition is especially true when the expectation values of Hamiltonians are subject to classical optimization as in the case of VQEs.
Some methods have been proposed to suppress an increase in the number of measurements.10−18 One of the main methods is the partitioning method, where Pauli strings are partitioned so that their expectation values can be measured simultaneously.10−14 In this method, a group of Pauli strings is divided into subgroups, and all the components of each subgroup are measured simultaneously using only one circuit (hereafter, such subgroups are called “partitions”). Notably, the partitioning method is also useful for simulating the time evolution of Hamiltonians in terms of reducing algorithmic errors induced via Trotter decomposition19 and a quantum phase-estimation algorithm with ancilla qubits.20 To maximize the effectiveness of the simultaneous measurement, the number of partitions should be minimized. However, minimizing the number of partitions is a NP-hard problem. To date, several algorithms have been proposed to address such problems.10−14 They are mainly based on either the maximum clique searching method11,14,21 or the graph coloring method.11−14 For the maximum clique searching method, two algorithms are mainly used: Boppana–Halldórsson algorithm22 and Bron–Kerbosch algorithm.23,24 Their time complexity and solution optimality, however, have a trade-off relation. For the Boppana–Halldórsson algorithm, the time complexity along the number of Pauli strings is a polynomial but the optimality of solutions is not guaranteed. The Bron–Kerbosch algorithm can guarantee the optimality but exhibits exponential time complexity. Regarding the graph coloring method, Verteletskyi et al.11,12 and Hamamura et al.13 tested the performance of the largest-first method, which has been proven to afford the best performance among various heuristic orderings. This method takes polynomial time with the number of Pauli strings but provides less optimal partitioning results than maximum clique searching algorithms with the Bron–Kerbosch algorithm14 when the number of Pauli strings exceeds ∼500. An algorithm-specific partitioning method proposes a partitioning scheme using the nature of the qubit-mapping methods of Hamiltonians in quantum chemistry.14 This partitioning method may not require long time, but the resultant reduction factor, which is the number of Pauli strings divided by the number of obtained partitions, is only 8 at maximum (when the Jordan–Wigner qubit-mapping method is used).
Such classical algorithms with polynomial time scaling can reduce the number of measurements for estimating the expectation values of Hamiltonians to some extent. However, we need to further reduce the number of measurements as far as possible for the following reason. As mentioned above, the estimation of expectation value of the given Hamiltonian is subject to classical optimization (i.e., the expectation value has to be measured per optimization step) and the number of the optimization steps sharply increases with increasing number of parameters. Therefore, the factor of how the number of measurements is reduced using the partitioning method must be evaluated. However, although considerable effort has been made to improve the reduction factor, it cannot reach the factor obtained using the Bron–Kerbosch algorithm (which requires exponential time). Therefore, we believe that an application-specific computer that operates on a different calculation principle from a conventional computer would be necessary for drastic improvement in both time complexity and the resultant reduction factor.
Another method to reduce the total number of measurements is the shadowing method, which is based on classical shadowing.15,16 The advantage of this method is that in some cases, a fewer number of required measurements can be realized compared with the partitioning method by efficiently determining the basis-changing operation per measurement.16 However, in the worst case, the method requires the same number of quantum circuits as that of the measurements, which may become an additional and non-negligible cost for hardware experiment. Moreover, to determine per-measurement basis-changing operations, the computational cost of Ω(nmeas) is required, where nmeas denotes the total number of measurements. Yen et al.17 discussed a combination of the shadowing and partitioning methods to further reduce the total number of measurements. From this point of view, it would also be of great help if the computational time for determining the necessary quantum circuits and the number of such circuits for the partitioning method could be considerably reduced.
In this paper, we propose a fast, effective, and versatile algorithm to address such partitioning problems with Ising machines. The proposed algorithm is based on the maximum clique searching method, and we transform maximum clique searching problems into quadratic unconstrained binary optimization (QUBO) problems, which are equivalent to the Ising model optimization problems.25 This approach allows us to use Ising machines to quickly solve the problems. Using Fujitsu’s second-generation Digital Annealer, a hardware architecture designed to efficiently solve QUBO problems,26 as an Ising machine, we demonstrate that the performance of our algorithm is much better in terms of time complexity and solution optimality by comparing it with existing algorithms (Boppana–Halldórsson algorithm and Bron–Kerbosch algorithm). In addition to the partitioning problem for VQE Hamiltonians, we tested our algorithm on a full tomography of one n-qubit quantum state (where the number of Pauli strings to be measured is 4n – 1) to benchmark the results to the theoretical ones.27 Our algorithm can be applied to the problems larger than the capacity of an Ising machine by using it repeatedly, as will be shown below.
This paper is organized as follows. Section 2 describes the theoretical background and general procedure of performing simultaneous measurements. Section 3 explains our new Ising model–based partitioning algorithm and how the Digital Annealer works. Section 4 describes the performance of the new algorithm in estimating the expectation values of multiple Pauli strings, comparing it with existing maximum clique searching algorithms. Section 5 summarizes this study and discusses future perspectives.
2. Simultaneous Measurements
In this section, we explain the technical background of simultaneous measurements and partitioning. In section 2.1, we describe the relation between the commutativity of Pauli strings and simultaneous measurements. In section 2.2, we present the general procedure of simultaneous measurements.
2.1. Theoretical Background
A simultaneous measurement is based on the fact that the expectation values of two Pauli strings P1 and P2 can be simultaneously estimated by applying an appropriate basis-changing operation if and only if they commute each other (i.e., P1P2 = P2P1).10 Generally, given a quantum state ρ, the expectation value of an observable M is Tr(Mρ). When the matrix B can diagonalize the matrix M so that Z{ij} = BMB–1, this condition leads to
| 5 |
where Z{ij} denotes the tensor matrix of Z and I:
| 6 |
| 7 |
where j denotes the qubit index beginning from 1 and ij ∈ {0, 1} for each j. Thus, we can estimate Tr(Mρ) by applying B to ρ as a basis-changing operation and performing a projective measurement of the qubits labeled with the sequence {j|ij = 1} along the computational basis (Z-basis).
Here, we suppose that ρ is an n-qubit state and B is a basis-changing operation. For any of 2n – 1 possible {ij} (excluding ij = 0 for all the j values), M{ij} exists, which satisfies
| 8 |
As shown in eq 5, eq 8 satisfies
| 9 |
From eq 8, the commutation relation between M{ij} and M{ij}, can be derived as
| 10 |
for any {ij},{ij}′. Therefore, for M{ij} and M{ij}, commute for any {ij},{ij}′ is the requirement for simultaneous measurements. Moreover, for any partition {M{ij}}, the existence of a basis-changing gate B that satisfies eq 9 has been proven in a previous study.10
The commutativity of Pauli strings has two settings.14 One is qubit-wise commutativity (QWC), which means that, for every qubit, corresponding Pauli operators commute each other. The other is general commutativity (GC), which means that Pauli strings commute as a whole, while each Pauli operator does not necessarily commute. In the GC setting, for some qubits, corresponding Pauli operators can be anticommuting. Two Pauli strings commute when the number of the anticommuting pairs of Pauli operators is even. When we apply QWC, the basis-changing gate B can be described as a tensor product of a single-qubit gate. Meanwhile, the resultant number of partitions is 3n for an n-qubit full tomography (each of the partitions contains one Pauli string described as a tensor product of X, Y, and Z). For estimating the expectation values of Hamiltonians for VQE, a previous study11 shows that the number of partitions is only three times less than the number of Pauli strings. By contrast, when we apply GC, B is described as entangled gates and the number of partitions is expected to be less than that for QWC. For n-qubit full tomography, when GC is applied, 4n – 1 Pauli strings can be divided into 2n + 1 partitions, each of which contains 2n – 1 Pauli strings.27 In this study, we used GC to investigate the maximum effect of simultaneous measurements.
2.2. General Procedure and Its Time Complexity
Figure 1 shows a scheme for measuring the expectation values of multiple Pauli strings using simultaneous measurement and partitioning. After enumerating the Pauli strings that are required to estimate the expectation values (step (1)), the commutativity of each pair of Pauli strings was checked (step (2)). Then, we created partitions where all Pauli strings commute (step (3)). Based on this, we determined the basis-changing gate B for each partition (step (4)), and finally, all the expectation values of the Pauli strings were estimated (step (5)). Using steps (2) and (3) presented in Figure 1, the number of circuits was reduced to the number of partitions.
Figure 1.

Schematic of measuring the expectation values of multiple Pauli strings using simultaneous measurements.
To evaluate the overall performance of partitioning, the time complexity and solution optimality should be examined. The time complexity of step (2) is O(N2n), where N denotes the number of Pauli strings and n denotes the number of qubits. Conversely, the time complexity of step (3) strongly depends on the algorithm used for the partitioning.
Two partitioning algorithms are generally used for solving the maximum clique searching problem. The Boppana–Halldórsson algorithm22 uses a greedy method for creating each partition, which does not necessarily result in a maximum-size partition. It has a roughly quadratic time complexity with no guarantee of optimality, although its worst-case time complexity is not well studied. Meanwhile, the Bron–Kerbosch algorithm23,24 uses a rigorous method for creating each partition to obtain a maximum-size partition. It has an exponential time complexity of O(3n/3) for creating one partition as the worst case,24 but yields an optimal solution. More details of these algorithms are described in Appendix 1 in the Supporting Information.
3. Methods
In this section, we describe our proposed Pauli string partitioning methods. Section 3.1 introduces the proposed Ising model-based partitioning algorithm. Sections 3.2 and 3.3 describe the specific partitioning problems we address in this study and the settings of the Digital Annealer, respectively.
3.1. Ising Model-Based Partitioning Algorithm
The proposed algorithm is based on maximum clique searching.21 A partition with the maximum number of elements is created from the Pauli strings, and the process is repeated with the remaining Pauli strings until no other string remains, as shown in Figure 2. In this algorithm, we break down each partition-creating problem into a QUBO problem, which is equivalent to an Ising model problem25 and can be solved efficiently using an Ising machine. In this QUBO problem, each Pauli string is assigned a binary variable, and the value of the variables distinguishes whether the corresponding Pauli strings are included in a target partition.
Figure 2.

Illustration of the partitioning process for two-qubit full tomography. An edge between two nodes denotes that the corresponding two Pauli strings commute. One partition is described as the node groups, with thick edges colored in orange. In this example, the 16 Pauli strings (including the identity Pauli string) can be divided into five groups.
Suppose that we create one maximum-size partition from the candidate Pauli string group {P1, ..., PN}. To map this problem to a QUBO problem, the cost function should be determined so that it is minimized when the number of Pauli strings in the target partition is maximized. The cost function can be defined as follows:
| 11 |
where x1, ..., xN ∈ {0,1} denotes the binary variables mapped to Pauli strings. xk = 1 means that the Pauli string Pk is included in a target partition; xk = 0 means otherwise. b1, ..., bN denote positive constants, and we set bi = 1 for all i. c1,1, ..., c1,N, c2,1, ..., cN,N denote nonnegative constants, satisfying ci,j = 0 if PiPj = PjPi; otherwise, ci,j = 1. m denotes a positive constant. In the right-hand of eq 11, the first term means that the cost function decreases as the number of Pauli strings in the target clique increases. The second term means that if pairs of Pauli strings that do not commute exist in a partition, then the cost function increases. The value of m must be selected to satisfy the condition that the contribution of the second term is zero when the global minimum of eq 11 is realized. m > 1 satisfies this condition for any case (for details, see Appendix 2 in the Supporting Information), and we set m = 2 in this study. When the cost function reaches the global minimum, the obtained subgroup of Pauli strings {Pi|xi = 1} can be considered the partition that has the largest number of elements in a Pauli string set of interest. The pedagogical example of this Ising model mapping is presented in Figure 3.
Figure 3.
Illustration of the mapping of partitioning problems to the Ising model (eq 11), where we set m = 2. Here, we are creating a maximum-size partition from {Z0Z1,X0X1,Y0Y1,Z1,Z0}. The result of this equation is minimized when {x1,x2,x3,x4,x5}={1, 1, 1, 0, 0},{1, 0, 0, 1, 1}, which reflect the maximum-size partitions.
When the number of variables {xi} is less than or equal to the number of variables that an Ising machine can handle (nbit), we can directly determine {xi}, which minimizes the target cost function using an Ising machine.26,28,29 In that case, the number of variables necessary for the Ising machine is the number of Pauli strings. Ising machines are designed to solve such Ising-type optimization problems by setting the initial values of {xi} first, finding more optimal values that decrease the target cost function and updating them iteratively. Although the computational principle is different in each problem, Ising machines are generally designed to solve these problems faster than conventional computers.
When the number of Pauli strings exceeds nbit, additional procedures are required. Given the Pauli string
group
, the partition
is created
using the following procedures
in our Ising model-based algorithm, as shown in Figure 4. (1) A subgroup
that comprises the first nbit elements
of
is defined,
and a partition
is created using
by solving the corresponding QUBO (eq 11) problem with an Ising
machine. (2)
is defined for each
, which denotes the number of Pauli strings
that satisfy PiPj = PjPi, and
is sorted in a descending order
of
. (3) A subgroup
is defined, such that
comprises the first nbit elements of the sorted {Pj}. (4) A partition
is created using
by solving the corresponding QUBO (eq 11) problem with the Ising
machine. In this case, the Ising machine is used twice (in creating
and then
) for a single
cycle of the partitioning
process. Procedures from (2) to (4) can be repeated r times to create an optimal partition, with
being
updated between procedures (2) and
(4). In this study, we set r = 1. The flowchart of
this algorithm is presented in Figure 5, and the overall partitioning algorithm is shown in Chart 1.
Figure 4.
Illustration of the partitioning procedure
when N > nbit (N = 20 and nbit = 8). (a) Determine
as the first nbit elements of
and
calculate
using
the Digital Annealer. (b) Calculate
for each
and then sort
in
a descending order of
. (c) Determine
as the first nbit elements of the sorted
and
calculate
using
the Digital Annealer. (d) Determine
and sort it in an ascending order of index j. Then, continue partitioning until
.
Figure 5.
Flowchart of partitioning with the Ising model-based algorithm. Ising machines are employed in the green-colored steps.
Chart 1. Ising Model-Based Algorithm.
We investigated the performance of this Ising model–based algorithm in terms of time complexity and solution optimality compared with those of the Boppana–Halldórsson and Bron–Kerbosch algorithms, both of which are also based on maximum clique searching. For the Boppana–Halldórsson and Bron–Kerbosch algorithms, we used NetworkX30 implemented in Python because both algorithms are implemented in it and it allows us to benchmark them easily.
3.2. Overview of the Digital Annealer and Its Settings
In this study, we used the Digital Annealer as an Ising machine for the following reasons. First, all the variables in the Digital Annealer are fully connected, which is preferable for the problems under consideration because for any variable xi, roughly N/2 variables xj exist that satisfy ci,j ≠ 0. Second, the Digital Annealer can rapidly search the 2nbit space (where nbit denotes the number of variables in the Digital Annealer) to obtain a (globally) minimum value of QUBO problems, such as eq 11. It is because of an efficient parallel trial scheme for a Markov chain Monte Carlo method combined with massive parallelization and a dynamic escaping function from local minima.31 The Digital Annealer can generally solve such QUBO problems much faster than simulated annealing conducted on a classical computer.31
All calculations using Digital Annealer were conducted under a computational environment prepared for research use. The second-generation Digital Annealer26 that we used herein allows us to tune the available number of variables up to 8,192. In this study, without further notice, all calculations using the Digital Annealer were conducted with nbit = 8,192. For each calculation, the number of Monte Carlo steps was fixed to 108.
3.3. Partitioning Problems
In this study, we set the partitioning problems of n-qubit full tomography (n = 1, ..., 8) and estimating the expectation values of Hamiltonians for VQE. For the VQE problems, we set the target molecules as H2, LiH, H2O, and CH4 in the STO-3G basis set and BeH2, H2O, N2, and NH3 in the 6-31G basis set. To create corresponding Hamiltonians, we set their molecular configurations by referring to ref (11) and used the Jordan–Wigner qubit-mapping method. For each molecule in the STO-3G basis set, we assumed a variable number of spatial orbitals in an active space, as summarized in Table 1. For each partitioning problem, we excluded the identity Pauli string ⊗j=1nI because it commutes with all other Pauli strings and its expectation value is always 1.
Table 1. Pauli String Set for VQE (Excluding Identity).
| molecules | basis set | qubit mapping | # of spatial orbitals | # of qubits | # of Pauli strings |
|---|---|---|---|---|---|
| H2 | STO-3G | Jordan–Wigner | 1 | 2 | 3 |
| H2 | STO-3G | Jordan–Wigner | 2 | 4 | 14 |
| LiH | STO-3G | Jordan–Wigner | 3 | 6 | 117 |
| LiH | STO-3G | Jordan–Wigner | 4 | 8 | 192 |
| LiH | STO-3G | Jordan–Wigner | 5 | 10 | 275 |
| LiH | SLO-3G | Jordan–Wigner | 6 | 12 | 630 |
| H2O | STO-3G | Jordan–Wigner | 4 | 8 | 220 |
| H2O | SLO-3G | Jordan–Wigner | 5 | 10 | 311 |
| H2O | STO-3G | Jordan–Wigner | 6 | 12 | 740 |
| H2O | STO-3G | Jordan–Wigner | 7 | 14 | 1389 |
| CH4 | STO-3G | Jordan–Wigner | 4 | 8 | 240 |
| CH4 | STO-3G | Jordan–Wigner | 5 | 10 | 591 |
| CH4 | STO-3G | Jordan–Wigner | 6 | 12 | 1518 |
| CH4 | STO-3G | Jordan–Wigner | 7 | 14 | 3005 |
| CH4 | STO-3G | Jordan–Wigner | 8 | 16 | 5236 |
| CH4 | STO-3G | Jordan–Wigner | 9 | 18 | 8479 |
| BeH2 | 6-31G | Jordan–Wigner | 13 | 26 | 9203 |
| H2O | 6-31G | Jordan–Wigner | 13 | 26 | 12731 |
| N2 | 6-31G | Jordan–Wigner | 18 | 36 | 34622 |
| NH3 | 6-31G | Jordan–Wigner | 15 | 30 | 52805 |
For the full-tomography Pauli string set, we performed indexing of Pauli strings in the ascending order of ∑i=1np(i)4n+1–i, where p(i) = 0 if the Pauli operator of ith qubit is I and, similarly, 1 if X, 2 if Y, and 3 if Z. For estimating the expectation values of Hamiltonians for VQE, we performed indexing of Pauli strings along with the OpenFermion ordering.11,32
4. Results and Discussions
4.1. Time Complexity and Solution Optimality when N ≤ nbit
In this section, we discuss the time complexity and solution optimality for Pauli string partitioning problems when the number of Pauli strings N subject to partitioning does not exceed nbit. Figure 6 shows the plots of algorithm runtime t against the number of Pauli strings N using the three algorithms, with their regression curves in the form of t = aNb. The time complexity on N for the Ising model–based algorithm within the range of N ≤ nbit = 8192 was estimated as N0.52. This condition contrasts with N2.57 for the Boppana–Halldórsson algorithm and N5.41 for the Bron–Kerbosch algorithm. These results suggest that the Ising model–based algorithm is the most scalable algorithm among the three in terms of time complexity. As shown in Figure 6, with the processing ability of our laptop resources, the Ising model–based algorithm showed better performance than the Bron–Kerbosch algorithm when N ≥ 300 and the Boppana–Halldórsson algorithm when N ≥ 2000. Although the runtime performances of the Boppana–Halldórsson and Bron–Kerbosch algorithms depend on how much computer resources one can utilize, the threshold number of Pauli strings Nth exists, such that the Ising model-based algorithm shows the best performance when N > Nth.
Figure 6.
Plot of the runtime along the number of observables obtained using the Ising model-based algorithm (orange), Boppana–Halldórsson algorithm (blue), and Bron–Kerbosch algorithm (green). (a) Plotted in the linear axis, (b) plotted in the logarithmic axis. The regression curve for each algorithm is in the t = aNb form. The regression curve for the Ising model–based algorithm is determined based on the data plots for N < 8192.
We investigated the performance guarantee for the time complexity for the Ising model-based algorithm. Each Monte Carlo step in a Digital–Annealer calculation takes the same amount of time.31 Thus, the time for creating one partition is constant in our setting, where the number of Monte Carlo steps per Digital–Annealer calculation is constant. Figure 7 shows that the overall runtime t of Algorithm 1 in Chart 1 depends almost linearly on the resultant number of partitions. Here, creating one partition takes 4 to 5 s. With the introduction of τ, which denotes the average runtime for one Digital–Annealer calculation, the Ising model-based algorithm runtime is written as
| 12 |
where F denotes the reduction factor,14 which is the value defined as the number of Pauli strings N divided by the resultant number of partitions. The observed dependence t ∝ N0.52 reflects that the dependence of F on N is F ∝ N0.48. However, it also reflects the specific characteristic of partitioning problems, i.e., the Pauli strings for VQE observables and full tomography. This dependence of F cannot apply to all types of partitioning problems. The performance guarantee can be investigated by assuming that F = 1 as the worst case. With its application to eq 12, the worst-case time complexity can be confirmed as O(N), which still has a lower dimension than those of the Bron–Kerbosch and Boppana–Halldórsson algorithms.
Figure 7.

Plot of the partitioning runtime along the resultant number of partitions using the Ising model-based algorithm.
Next, we discuss the solution optimality of each algorithm. We evaluated it using the reduction factor F; a large reduction factor means a high solution optimality. Figure 8 shows the reduction factor for each partitioning problem. When the number of Pauli strings is small (<20), the reduction factors are similar among the algorithms. By contrast, when the number of Pauli strings increases, the resultant reduction factors of the Ising model-based algorithm and Bron–Kerbosch algorithm become larger than that of the Boppana–Halldórsson algorithm. This result is obtained because of the characteristics of the three algorithms. The Ising model-based algorithm and Bron–Kerbosch algorithm maximize the number of elements of a partition-per-partition creation process, whereas the Boppana–Halldórsson algorithm does not always maximize the number of elements of one partition because it incorporates the greedy approach. This point can be observed in Figure 9; for the Boppana–Halldórsson algorithm, the number of elements of each partition is smaller than that for the other algorithms. Notably, for n-qubit full tomography for n ≥ 4, the resultant reduction factor F is less than 2n + 1, which is proven to be the maximum value.27 The results show that the maximum reduction factor has not yet been obtained even via our method. This is probably because a partition that is chosen in the one partition-creating process is not always the ideal one that realizes the maximum effect. Each partition-creating process affects the subsequent partition-creating processes, and the remaining Pauli string groups may often have only partitions with less than 2n – 1 Pauli strings.
Figure 8.
Bar plot of the reduction factor F (defined in the main text) using the Ising model-based algorithm (orange), Boppana–Halldórsson algorithm (blue), and Bron–Kerbosch algorithm (green). For the Ising model-based algorithm, we set nbit = 8192. For the Boppana–Halldórsson and Bron–Kerbosch algorithms, some results are not shown because they are assumed to take more than 10 h.
Figure 9.

Number of Pauli strings of each partition as a result of partitioning 275 Pauli strings (LiH as a basis set of STO-3G and five spatial orbitals in the active space).
4.2. Time Complexity and Solution Optimality when N > nbit
Section 4.1 presents the excellent partitioning performance of the Ising model-based algorithm for N ≤ nbit. However, in quantum chemical calculations, N may exceed nbit. In this section, we examine the performance of the Ising model-based algorithm when N > nbit.
We discuss the solution optimality first. We have shown the performance of the Ising model-based algorithm when nbit = 8192 and N > 8192 in Figures 6 and 8. The runtimes required using the Ising model-based algorithm are within 1.5 h and remain much shorter than those required in the Boppana–Halldórsson algorithm even when N > 8,192 (Figure 6), and a much better solution optimality (i.e., larger reduction factor F) is realized. We demonstrated that F ≈ 200 when solving the partitioning problem of N = 34,622 (Figure 8). This result strongly suggests that the extension of the Ising model-based algorithm to the cases of N > nbit is effective.
However, solution optimality and time complexity for the case of N > nbit are anticipated to be quantitatively different from those for the case of N ≤ nbit. In the following subsection, we will discuss their differences in detail.
4.2.1. Solution Optimality
When N > nbit, a natural assumption is that the performance of the Ising model-based algorithm degrades as N increases with respect to nbit. To confirm this, we compared the Ising model-based algorithm performance in the cases of nbit = 8192 and nbit = 1024, as shown in Table 2. The number of partitions is larger when nbit = 1024, which leads to the decrease in the reduction factor F. This finding suggests that the size of nbit indeed affects the performance.
Table 2. Partitioning Performance of the Ising Model-Based Algorithm (nbit = 8192 Mode and nbit = 1024 Mode) and Boppana–Halldórsson Algorithm in the Case of N > 8192a.
| Ising
model-based algorithm (nbit = 8192) |
Ising model-based algorithm (nbit = 1024) |
Boppana-Halklórsson algorithm |
||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| problem type | molecule | # of spatial orbitals | basis set | # of qubits | # of Pauli strings | D | # of partitions | reduction factor | # of DA calculations | calculation time | D | # of partitions | reduction factor | # of DA calculations | calculation time | # of partitions | reduction factor | calculation time |
| VQE | CH4 | 9 | STO-3G | 18 | 8479 | 1.04 | 132 | 64.2 | 134 | 598.7 | 8.28 | 136 | 62.3 | 222 | 903.6 | 203 | 41.8 | 15795.2 |
| VQE | BeH2 | 13 | 6-31G | 26 | 9203 | 1.12 | 93 | 99.0 | 96 | 421.0 | 8.99 | 97 | 94.9 | 156 | 637.1 | 176 | 52.3 | 24525.9 |
| VQE | H2O | 13 | 6-31G | 26 | 12731 | 1.56 | 134 | 95.0 | 153 | 711.3 | 12.43 | 139 | 91.6 | 234 | 953.4 | N/A | N/A | N/A |
| VQE | N2 | 18 | 6-31G | 36 | 34622 | 4.23 | 173 | 200.1 | 245 | 1153.3 | 33.81 | 198 | 174.9 | 356 | 1450.2 | N/A | N/A | N/A |
| VQE | NH3 | 15 | 6-31G | 30 | 52805 | 6.45 | 372 | 141.9 | 586 | 2915.0 | 51.57 | 471 | 112.1 | 892 | 3635.9 | N/A | N/A | N/A |
| full tomography | 7 | 16383 | 2.00 | 261 | 62.8 | 338 | 1601.0 | 16.00 | 268 | 61.1 | 470 | 1906.0 | N/A | N/A | N/A | |||
| full tomography | 8 | 65335 | 8.00 | 609 | 107.6 | 985 | 5027.1 | 64.00 | 661 | 99.1 | 1246 | 5073.7 | N/A | N/A | N/A | |||
For each problem and each Ising model-based algorithm mode, the relative problem dimension D (defined in the main text), number of resultant partitions, reduction factor, number of Digital–Annealer calculations, and calculation time are shown.
Figure 10 shows
the number of elements of each partition
(k = 1, ..., 100) for
some of the partitioning results for N > 8192
with
the conditions of nbit = 8192 and nbit = 1024. For nbit = 1024, the resultant number of elements of each partition
is
substantially smaller than that for nbit = 8192, especially when a partition with
>200 elements. This condition can be a direct cause of the increasing
number of partitions. However, executing two Digital–Annealer
calculations (one to determine
and another to determine
) is more effective than executing one Digital–Annealer
calculation to determine
and then regarding it as
because the number of elements of
is
larger than that of
for each k (Figure 10). Furthermore,
the ratio of the number of elements of
to
that of
is
greater in the case of nbit = 1024 than
in the case of nbit = 8192 (Figure 11). This finding
suggests that the effect of two Digital–Annealer
calculations is greater when the size of N with respect
to nbit is larger.
Figure 10.
Bar plots of the number
of elements of
and the number of elements of
(as defined in Algorithm 1 in Chart 1) per partitioning
step k (in a range of 1 ≤ k ≤ 100) for partitioning problems of (a) CH4 in
STO-3G basis set (8 spatial orbitals), (b) H2O in 6-31G
basis set (13 spatial orbitals), (c) N2 in 6-31G basis
set (18 spatial orbitals), (d) NH3 in 6-31G basis set (15
spatial orbitals), and (e) eight-qubit full tomography.
Figure 11.
Bar plots of the number of elements of
divided
by that of
(as
defined in Algorithm 1 in Chart 1) per partitioning
step k (in a range of 1 ≤ k ≤ 50) for partitioning problems of (a) N2 in the
6-31G basis set (18 spatial orbitals), (b) NH3 in the 6-31G
basis set (15 spatial orbitals), and (c) eight-qubit full tomography.
To further investigate how the relation between N and nbit influences its performance, a convenient step is to introduce a parameter D, which denotes the relative dimension of the partitioning problem against nbit. We define D as
| 13 |
We first investigated the performance of the Ising model-based algorithm for the partitioning problems of N > 8192 with various D (by varying nbit ∈ {8192, 4096, 2048, 1536, 1024, 768, 512, 384, 256, 192} on solving the same partitioning problem). Figure 12 shows the logarithmic plots of the resultant reduction factor FD along D. The reduction factor FD slightly decreases with increasing D for all the N values. Therefore, we can expect that the reduction factor is maximum under the D = 1 (N ≤ nbit) condition.
Figure 12.
Plots of the reduction factor F as a function of the relative problem dimension D for the partitioning problems of (a) N ≤ 8192 and (b) N > 8192.
Then, we investigated the performance of the Ising model-based algorithm when N ≤ 8192, with D ≥ 1, including D = 1. For these calculations, we set nbit ∈ {8192, 4096, 2048, 1536, 1024, 512, 256, 192, 128, 96, 64, 48}. The reduction factor FD decreases as D increases, but its ratio to F1, that is,
| 14 |
is not less than 0.9 until D ≈ 10. As d increases above ∼10, we observed that pD substantially decreases. When D is sufficiently large, the dependence of pD on d is denoted by O(D–1) (see Appendix 3 in the Supporting Information).
These results show that although the Ising model-based algorithm is effective even when N > nbit, the larger nbit provides better optimality for partitioning the problems with N > nbit.
4.2.2. Time Complexity
Next, we discuss the time complexity. As described in Figure 6, the partitioning runtime t for N > 8192 shows some deviations from the extrapolated regression curve (t = aN0.52), which is determined from the runtime data for N ≤ 8192. When N > nbit, the partitioning runtimes would be longer owing to the following factors: (i) a greater number of resultant partitions leads to more Digital–Annealer calculation step and (ii) two Digital–Annealer calculations are required to create a single partition as long as the number of remaining Pauli strings exceeds nbit. The algorithm runtime tD for a relative dimension D is described as
| 15 |
where s denotes the ratio of the number of partitions whose creations require two Digital–Annealer calculations to that of all partitions and τD denotes the average time for one Digital–Annealer calculation. From eqs 12, 14 and 15, tD can be rewritten as
| 16 |
As described in eq 16, three contributions (τD/τ1, 1 + s, and pD–1) are made to the deviation of tD from t1. Among them, within the range of our simulation (N ≤ 65535), the difference between the actual and estimated runtimes from the extrapolated regression curve (in the case of nbit = 8192) is mainly contributed by 1 + s, that is, up to 1.6. pD, which is expected to be ≤1.1 because D ≤ 8 and τD/τ1 is ∼1. However, when a partitioning problem with an even larger number of Pauli strings N is assumed to be solved, the contribution of 1 + s is O(1) because s ≤ 1 by definition. Similarly, τD/τ1 = O(1). The contribution of pD–1 becomes the main factor of time complexity, which evolves as O(N) (Figure 13 and Appendix 3). Therefore, with the assumption of tD=1 ∝ N0.52, even when N > 8192, the time complexity for N > 8192 is estimated as N1.52.
Figure 13.

Plots of pD–1 as a function of the relative problem dimension D for the partitioning problems of N ≤ 8192.
Next, we discuss the worst-case time complexity. Even when assuming t1 = O(N) as the worst case, we can confirm that tD = O(N2), which still has a lower complexity than the observed time complexity of the Boppana–Halldórsson algorithm. Moreover, when the overall partitioning procedure depicted in Figure 1 is considered, a notable detail is observed that if a sufficiently large nbit is available for large N, then the partitioning procedure (3) may not be the most rate-limiting step in the overall procedure of measuring the expectation values of multiple Pauli strings (Figure 1) because the commutativity evaluation step (2) of Pauli strings (Figure 1) has a higher dimension of the time complexity of O(N2n).
We can consider several additional strategies to improve
the partitioning
method for future studies. For example, setting different
by sorting
along
different orders11 potentially results
in a more optimal
than along the OpenFermion order, for obtaining
with
more elements. Moreover, repeating
the partitioning steps from (2) to (4) r times can
increase the number of elements of
. However,
the number of elements in a partition
cannot exceed nbit when using the Ising
model-based algorithm, which would be the theoretical limit of the
algorithm. In addition, enabling a larger nbit than 8192 with the future development of annealing machines would
ensure a shorter algorithm runtime by reducing the contributions of
1 + s and pD–1, whereas
it potentially increases t1 by increasing
τ1.
5. Conclusions and Future Perspective
Herein, we propose a method for the partitioning of Pauli strings. We transfer the portioning to Ising optimization and solve it using an Ising machine. Compared with conventional algorithms (the Boppana–Halldórsson and Bron–Kerbosch algorithms), our Ising model-based algorithm shows advantages in terms of solution optimality and time complexity as the number of Pauli strings increases. Therefore, we believe the proposed method to be one of the most useful methods for solving the partitioning problem, especially when large quantum systems become available in the future. Moreover, the proposed method is versatile for any sort of quantum algorithms.
To effectively perform such simultaneous measurements, the implementation of basis-changing gate sets B (as denoted in step (4) in Figure 1) is necessary. When GC is applied for partitioning, constituting B is known to be a nontrivial problem.14 In addition, such gate sets B include two-qubit entangling gates (e.g., CNOT), which is likely to be noisier than single-qubit gates. In this context, the reduction of the number of two-qubit gates in B is an important problem. A universal method for constituting B is available in ref (14). Another strategy is to tune the partitioning process to suppress the number of entangling gates.13 To make this strategy compatible with the Ising model-based algorithm, we may need to tune the coefficients ci,j to circumvent too many entangling gates, which will be the subject of future works.
Acknowledgments
The authors thank Yoshinori Tomita, Toshiyuki Miyazawa, and Kazuya Takemoto for support for the utilization of the Digital Annealer and fruitful discussions.
Supporting Information Available
The Supporting Information is available free of charge at https://pubs.acs.org/doi/10.1021/acs.jpca.2c06453.
Author Contributions
T.K. developed the algorithm and performed the numerical calculations, analysis, and writing of the manuscript. All the members contributed to the discussions, analysis, and writing of the manuscript. H.O. and S.S. supervised the project.
The authors declare no competing financial interest.
This paper was published ASAP on January 18, 2023, with data missing from Table 2. The corrected version was reposted on February 2, 2023.
Special Issue
Published as part of The Journal of Physical Chemistry virtual special issue “Physical Chemistry of Quantum Information Science”.
Supplementary Material
References
- Nielsen M. A.; Chuang I.. Quantum computation and quantum information; Cambridge University Press: Cambridge, MA, U.S.A., 2010. [Google Scholar]
- McArdle S.; Endo S.; Aspuru-Guzik A.; Benjamin S. C.; Yuan X. Quantum Computational Chemistry. Rev. Mod. Phys. 2020, 92, 015003. 10.1103/RevModPhys.92.015003. [DOI] [Google Scholar]
- Preskill J. Quantum computing in the NISQ era and beyond. Quantum 2018, 2, 79. 10.22331/q-2018-08-06-79. [DOI] [Google Scholar]
- Peruzzo A.; McClean J.; Shadbolt P.; Yung M.-H.; Zhou X.-Q.; Love P. J.; Aspuru-Guzik A.; O’Brien J. L. A variational eigenvalue solver on a photonic quantum processor. Nat. Commun. 2014, 5, 4213. 10.1038/ncomms5213. [DOI] [PMC free article] [PubMed] [Google Scholar]
- McClean J. R.; Romero J.; Babbush R.; Aspuru-Guzik A. The theory of Variational Hybrid Quantum-Classical Algorithms. New J. Phys. 2016, 18, 023023. 10.1088/1367-2630/18/2/023023. [DOI] [Google Scholar]
- O’Malley P. J. J.; Babbush R.; Kivlichan I. D.; Romero J.; McClean J. R.; Barends R.; Kelly J.; Roushan P.; Tranter A.; Ding N.; et al. Scalable Quantum Simulation of Molecular Energies. Phys. Rev. X 2016, 6, 031007. 10.1103/PhysRevX.6.031007. [DOI] [Google Scholar]
- Kandala A.; Mezzacapo A.; Temme K.; Takita M.; Brink M.; Chow J. M.; Gambetta J. M. Hardware-efficient Variational Quantum Eigensolver for Small Molecules and Quantum Magnets. Nature 2017, 549, 242. 10.1038/nature23879. [DOI] [PubMed] [Google Scholar]
- Paudel H. P.; Syamlal M.; Crawford S. E.; Lee Y.-L.; Shugayev R. A.; Lu P.; Ohodnicki P. R.; Mollot D.; Duan Y. Quantum Computing and Simulations for Energy Applications: Review and Perspective. ACS Eng. Au 2022, 2, 151. 10.1021/acsengineeringau.1c00033. [DOI] [Google Scholar]
- Rice J. E.; Gujarati T. P.; Motta M.; Takeshita T. Y.; Lee E.; Latone J. A.; Garcia J. M. Quantum Computation of Dominant Products in Lithium-Sulfur Batteries. J. Chem. Phys. 2021, 154, 134115. 10.1063/5.0044068. [DOI] [PubMed] [Google Scholar]
- Jena A.; Genin S.; Mosca M. Pauli Partitioning with Respect to Gate Sets. arXiv:1907.07859 [quant-ph] 2019, 10.48550/arXiv.1907.07859. [DOI] [Google Scholar]
- Verteletskyi V.; Yen T.-C.; Izmaylov A. F. Measurement optimization in the variational quantum eigensolver using a minimum clique cover. J. Chem. Phys. 2020, 152, 124114. 10.1063/1.5141458. [DOI] [PubMed] [Google Scholar]
- Yen T.-C.; Verteletskyi V.; Izmaylov A. F. Measuring All Compatible Operators in One Series of Single-Qubit Measurements Using Unitary Transformations. J. Chem. Theory Comput. 2020, 16, 2400–2409. 10.1021/acs.jctc.0c00008. [DOI] [PubMed] [Google Scholar]
- Hamamura I.; Imamichi T. Efficient evaluation of quantum observables using entangled measurements. npj Quantum Inf. 2020, 6, 56. 10.1038/s41534-020-0284-2. [DOI] [Google Scholar]
- Gokhale P.; Angiuli O.; Ding Y.; Gui K.; Tomesh T.; Suchara M.; Martonosi M.; Chong F. T. O(N3) Measurement Cost for Variational Quantum Eigensolver on Molecular Hamiltonians. IEEE Trans. Quantum Eng. 2020, 1, 1–24. 10.1109/TQE.2020.3035814. [DOI] [Google Scholar]
- Huang H.-Y.; Kueng R.; Preskill J. Predicting Many Properties of a Quantum System from Very Few Measurements. Nat. Phys. 2020, 16, 1050–1057. 10.1038/s41567-020-0932-7. [DOI] [Google Scholar]
- Huang H.-Y.; Kueng R.; Preskill J. Efficient Estimation of Pauli Observables by Derandomization. Phys. Rev. Lett. 2021, 127, 030503. 10.1103/PhysRevLett.127.030503. [DOI] [PubMed] [Google Scholar]
- Yen T.-C.; Ganeshram A.; Izmaylov A.-F Deterministic improvements of quantum measurements with grouping of compatible operators, non-local transformations, and covariance estimates. arXiv:2201.01471 [quant-ph] 2022, 10.48550/arXiv.2201.01471. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kübler J. M.; Arrasmith A.; Cincio L.; Coles P. J. An Adaptive Optimizer for Measurement-Frugal Variational Algorithms. Quantum 2020, 4, 263. 10.22331/q-2020-05-11-263. [DOI] [Google Scholar]
- Gui K.; Tomesh T.; Gokhale P.; Shi Y.; Chong F. T.; Marnotosi M.; Suchara M. Term Grouping and Travelling Salesperson for Digital Quantum Simulation. arXiv:2001.05983 [quant-ph] 2021, 10.48550/arXiv.2001.05983. [DOI] [Google Scholar]
- Izmaylov A.-F.; Yen T.-C.; Lang R. A.; Verteletskyi V. Unitary Partitioning Approach to the Measurement Problem in the Variational Quantum Eigensolver Method. J. Chem. Theory Comput. 2020, 16, 190–195. 10.1021/acs.jctc.9b00791. [DOI] [PubMed] [Google Scholar]
- Östergård P. R. J. A fast algorithm for the maximum clique problem. Discrete Appl. Math. 2002, 120, 197–207. 10.1016/S0166-218X(01)00290-6. [DOI] [Google Scholar]
- Boppana R.; Halldórsson M. Approximating Maximum Independent Sets by Excluding Subgraphs. BIT Numerical Math. 1992, 32, 180–196. 10.1007/BF01994876. [DOI] [Google Scholar]
- Bron C.; Kerbosch J. Algorithm 457: finding all cliques of an undirected graph. Commun. ACM 1973, 16, 575–577. 10.1145/362342.362367. [DOI] [Google Scholar]
- Tomita E.; Tanaka A.; Takahashi H. The worst-case time complexity for generating all maximal cliques and computational experiments. Theoretical Comput. Sci. 2006, 363, 28–42. 10.1016/j.tcs.2006.06.015. [DOI] [Google Scholar]
- Lucas A. Ising formulations of many NP problems. Front. Phys. 2014, 2, 5. 10.3389/fphy.2014.00005. [DOI] [Google Scholar]
- Matsubara S.; Takatsu M.; Miyazawa T.; Shibasaki T.; Watanabe Y.; Takemoto K.; Tamura H.. Digital Annealer for High-Speed Solving of Combinatorial optimization Problems and Its Applications. 25th Asia and South Pacific Design Automation Conference (ASP-DAC), Beijing, China, January 13–16, 2020; ASP-DAC, 2020; pp 667–672. 10.1109/ASP-DAC47756.2020.904510. [DOI] [Google Scholar]
- Lawrence J.; Brukner C.; Zeilinger A. Mutually unbiased binary observable sets on N qubits. Phys. Rev. A 2002, 65, 032320. 10.1103/PhysRevA.65.032320. [DOI] [Google Scholar]
- Johnson M. W.; Amin M. H. S.; Gildert S.; Lanting T.; Hamze F.; Dickson N.; Harris R.; Berkley A. J.; Johansson J.; Bunyk P.; et al. Quantum annealing with manufactured spins. Nature 2011, 473, 194–198. 10.1038/nature10012. [DOI] [PubMed] [Google Scholar]
- Yamaoka M.; Yoshimura C.; Hayashi M.; Okuyama T.; Aoki H.; Mizuno H. A 20k-spin Ising chip to solve combinatorial optimization problems with CMOS annealing. IEEE J. Solid-State Circuits 2016, 51 (1), 303–309. [Google Scholar]
- NetworkX Home Page. https://networkx.org/ (accessed 03-03-2022).
- Aramon M.; Rosenberg G.; Valiante E.; Miyazawa T.; Tamura H.; Katzgraber H. G. Physics-inspired optimization for quadratic unconstrained problems using a Digital Annealer. Front. Phys. 2019, 7, 48. 10.3389/fphy.2019.00048. [DOI] [Google Scholar]
- OpenFermion Home Page. https://quantumai.google/openfermion/ (accessed 03-03-2022).
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.









