Deterministic Ansätze for the measurement-based variational quantum eigensolver

Measurement-based quantum computing (MBQC) is a promising approach to reducing circuit depth in noisy intermediate-scale quantum algorithms such as the variational quantum eigensolver (VQE). Unlike gate-based computing, MBQC employs local measurements on a preprepared resource state, offering a trade-off between circuit depth and qubit count. Ensuring determinism is crucial to MBQC, particularly in the VQE context, as a lack of flow in measurement patterns leads to evaluating the cost function at irrelevant locations. This study introduces MBVQE-ansätze that respect determinism and resemble the widely used problem-agnostic hardware-efficient VQE ansatz. We evaluate our approach using ideal simulations on the Schwinger Hamiltonian and XY-model and perform experiments on IBM hardware with an adaptive measurement capability. In our use case, we find that ensuring determinism works better via postselection than by adaptive measurements at the expense of increased sampling cost. Additionally, we propose an efficient MBQC-inspired method to prepare the resource state, specifically the cluster state, on hardware with heavy-hex connectivity, requiring a single measurement round, and implement this scheme on quantum computers with 27 and 127 qubits. We observe notable improvements for larger cluster states, although direct gate-based implementation achieves higher fidelity for smaller instances.


Introduction
The notion of quantum advantage is a highly intriguing application of quantum mechanics.Although it has been successfully showcased in computing prob-lems tailored to a particular hardware [1][2][3], attaining computational speedup for problems with practical applications remains an important challenge.On the one hand, we already have Shor's algorithm [4] and concepts from error-correction [5] to solve the factoring problem more efficiently than on any classical supercomputers, but such fault-tolerant schemes have stringent and potentially prohibitive requirements.On the other hand, quantum devices available today are noisy, have a limited number of qubits, and can only operate short quantum circuits on which we can endeavor to solve practical problems.Therefore, the greatest challenge for the foreseeable future is figuring out how to utilize noisy and intermediate-scale quantum (NISQ) hardware.
Hybrid quantum-classical algorithms and specifically the variational methods, which embed the problems into parameterized short-depth quantum circuits and employ the classical optimization routines to find the quantum circuits that best solve the problem at hand, have attracted significant interest [6][7][8][9].They address the problem of estimating the ground state energy of a quantum many-body Hamiltonian and have applications in quantum chemistry [9][10][11], highenergy physics [12][13][14], materials science [15], and classical optimization [16,17].Alongside the success, this approach suffers from a few challenges: in general, training variational quantum algorithms is NPhard [18] and the error-mitigation might require a superpolynomial number of samples even for logarithmically shallow circuits, threatening any possible quantum advantage [19].Even though a few methods have been proposed to ease the former problem [20][21][22][23][24], the latter looks more terminal.For significant classes of local Hamiltonians, any circuit aiming to prepare the ground state must have at least logarithmic depth [25][26][27], which poses the trade-off, one either resorts to inadequate approximation of the ground state, or the noise takes over the computation.In general, optimizing the depth of variational quantum algorithms is strongly QCMA-hard [28].
Here, we tackle the second problem.We propose a hardware-efficient protocol that borrows tools from measurement-based quantum computation [29,30], enjoys extremely shallow circuits [31], and is deterministic in measurement outcomes.It is well known that unlike dynamical languages, such as steps in the Turing machine or gates in the quantum circuit, in the measurement-based model, computation is performed just with local measurements on a many-body entangled state.While the circuit model of quantum computation defines its logical depth or computational time in terms of temporal gate sequences, MBQC allows a different temporal ordering and parallelization of universal logical gates.In this scheme, it is enough to achieve universality by analyzing the correlations that exist in many-body quantum states and, thus, is a very different, uniquely quantum way of thinking from all the dynamical computational models.Here, we study the possible advantages of this model of computation in variational algorithms.
Several variants of measurement-based variational quantum eigensolvers (MBVQE) have been recently proposed [32][33][34][35][36][37][38] (see also Appendix A for an overview of previous works).However, they are either of probabilistic nature [32], which causes exponential overhead or are not tailored to the current hardware capabilities requiring a high degree of qubit connectivity [34,35].Here, we propose a general MBVQE scheme relying on the notion of quantum information flow defined for the one-way model to guarantee determinism independent of each measurement outcome [39,40].Determinism is crucial to ensure that the variational steps in the classical training part converge even during the perfect noiseless simulations.It becomes even more pressing in the noisy regime when we have to incorporate current error-mitigation methods.From the deterministic models, we choose the specific ansatz architectures that are hardware efficient, and for two different examples, we study the trade-off between the size of the MB resource state translating into the number of parameters and the effectiveness of approximating the ground state.As a testbed, we run simulations for the Schwinger model and the XY -model and implement resource-conscious versions of our MBVQE ansatz of a four-qubit XY -Hamiltonian on an IBM quantum computer.We further study the efficacy of resourcestate preparation on the heavy-hex-connected IBM quantum machines.

Variational Quantum Eigensolver
The Variational Quantum Eigensolver (VQE) is a quantum-classical hybrid algorithm that approximates the lowest eigenvalue and its corresponding eigenvector of a given hermitian operator, typically the Hamiltonian of the investigated quantum system [9].The basic idea of VQE is to generate quantum states using a parametrized quantum circuit, the so-called ansatz, and classically optimize the parame-ters θ such that the generated state |ψ(θ)⟩ minimizes the cost function C(θ), which is the expectation value of the Hamiltonian H, where E gs is the exact groundstate energy.Gradients of θ can be efficiently measured directly from the quantum device using the parameter shift rule [41,42], making them accessible for gradientbased optimizers.Various quantum ansätze, such as the problem-agnostic hardware-efficient ansatz [43], annealer-inspired QAOA [44], or the adaptively growing ADAPT-VQE [22] have been proposed and extensively explored.The quantum chemistry community, in particular, has contributed numerous probleminspired ansätze [45], many derived from the extensive literature on classical variational methods [46,47].Although there are known roadblocks to the productive use of VQE, such as the high counts of associated quantum measurements [48] or vanishing gradients (referred to as Barren plateaus) [49], VQEs remain the primary workhorse of quantum algorithms in the NISQ era.

Measurement-based quantum computing
In MBQC, computation is carried out on a highly entangled resource state by local measurements only.
A graph state |G⟩ corresponds to a graph G = (V, E), consisting of a set of vertices V and edges E, in the following manner: Prepare |V | qubits in the |+⟩ state and associate them each to a vertex in G. Then apply the CZ gate between two qubits if the corresponding graph vertices are connected: Graph states can equivalently be defined by means of the stabilizer formalism.A graph state |G⟩ corresponding to a graph G = (V, E) is a unique eigenstate with the eigenvalue +1 to the following local Pauli stabilizers, Here each stabilizer operator is written for a vertex i ∈ V and consists of the Pauli-X gate on a vertex i and Pauli-Z gates acting on the graph-neighbors of i, denoted by the set N (i).The most standard resource state for MBQC is a so-called cluster state; its associated graph is a regular two-dimensional grid.To harness universal quantum computation, the cluster resource state is paired with measurements in Pauli bases and particular measurement bases in X − Y plane, parameterized by an angle θ, |θ ± ⟩ := |0⟩±e iθ |1⟩ √ 2 [29], which we denote sometimes as R(θ).Specific measurement patterns on snippets of the cluster state correspond to implementing quantum gates.See Fig. 1 for measurement patterns implementing an arbitrary single-qubit rotation and the CNOT gate.Typically, these patterns consist of input qubits, initialized to an arbitrary quantum state, output qubits, and qubits in between, depending on the pattern that is implemented.After measuring all qubits but the output qubits, the output qubits are modified to be equivalent to the input qubits with the intended gates applied.Due to the intrinsic randomness of quantum measurement outcomes, the output qubits generally carry additional random byproduct operators.The unique feature of MBQC is the ability to account for these byproducts and obtain a deterministic output state on the fly.
To nurture an intuition of the MBQC framework, i.e., which operations are implemented with R(θ) basis measurements and how determinism is ensured, let us discuss a simple example that starts with a threequbit, one-dimensional cluster state as a resource, comprising qubits q 1 , q 2 , q 3 , where the input qubit q 1 is initialized in an arbitrary state Measuring q 1 in R(θ) basis disentangles q 1 from the rest of the graph and yields one of the two possible subnormalized post-measurement states: where , where H is the Hadamard gate and P (θ) is equivalent to rotation about the Z-axis up to a global phase P (θ) = e −iθ/2 U z (θ).In other words, by projecting q 1 on |θ + ⟩ 1 , we effectively apply gates HP (θ) to the input state.Iterating this step and measuring q 2 in R(θ ′ ) basis, we get the output qubit q 3 to be HP (θ ′ )HP (θ) |ψ in ⟩ for two '+' outcomes on q 1 and q 2 , but additional Pauli-Z gates for other outcomes.
To obtain a deterministic post-measurement state, we need to account for the random byproducts.First, we take care of the ones appearing in G + 2 and G − 2 .To this end, we use the relation between the measurement |θ ± ⟩, Along with the graph stabilizer equation , we can shift that additional Z 1 gate onto the yet unmeasured qubits, This indicates that G − 2 is equivalent to G + 2 up to local Pauli byproducts.All Pauli-Z byproducts that appear during measurements can be commuted similarly to the neighboring unmeasured qubits, introducing Pauli-X byproducts.On the other hand, these new Pauli-X byproducts can be accounted for through adaptive measurements as X θ ′ ± θ ′ ± X = −θ ′ ± −θ ′ ± , thus, the measurement basis has to be adapted from R(θ ′ ) to R(−θ ′ ).
To summarize, projections onto the negative eigenstates introduce Z byproducts that can be accounted for by commuting them onto neighboring unmeasured qubits of the resource state.This introduces Z and X byproducts (specified by the stabilizers of the resource state) that can be, in the case of Z byproducts, shifted further employing the stabilizer rules, and in the case of X byproducts, compensated with adaptive measurements by swapping measurement bases θ ′ and −θ ′ on the respective qubit.Byproducts acting on the output qubits can be corrected efficiently through classical post-processing.For a graphical illustration of these rules, see Fig. 2. Note that adaptive measurements introduce a temporal and causal measurement order and a geometric condition for a "correctable" measurement pattern, known as the flow in MBQC literature [40].

The flow condition in MBQC
The flow condition was derived in Ref. [40] to characterize measurement patterns that can be executed deterministically by means of the byproduct corrections discussed in Section 2.2.With the graph state as a resource and R(θ) basis measurements, determinism is ensured whenever the temporal measurement order, defined by the adaptive measurements, has a distinct flow without collisions.For intuitive understanding, let us study measurement patterns where the flow is missing (Fig. 2A) and present (Fig. 2B).In these examples, orange qubits are the output qubits, and blue qubits are measured layer by layer with the temporal order depicted by the arrow.Green and red overlapping circles indicate the measurement results of the R(θ) measurement.Thus, pictorially, the measurement pattern can be executed deterministically if it is possible to make all overlapping circles green.X byproducts can be corrected via an adaptive measurement step defining a casual and temporal measurement order.Whether these byproducts can be corrected in MBVQE, depends on the selected decoration scheme.A: Ref. [32] introduced an edgewise decoration scheme.Horizontally aligned qubits can be measured simultaneously.Here, two measurement orders coincide in the middle ansatz qubit and break the flow condition -correcting for one byproduct introduces another on the other side.We cannot obtain deterministic outcomes.B: A deterministic decoration is obtained by layering the ansatz-graphs and connecting them vertically.Every Z byproduct can be corrected with the stabilizer of the neighboring qubit in the subsequent measurement layer.
In Fig. 2A, two measurement orders coincide at the middle output qubit, which may cause a conflict in the byproduct correction.I.e., if only one of the qubits connected to the middle output qubit was projected onto the untargeted eigenstate |θ − ⟩, there is no way to account for this without causing an undesired phase kickback on the other side.For certain measurement outcomes in Fig. 2A, it is not possible to deterministically obtain a post-measurement state ψ( ⃗ θ) that does not depend on the signs of parameters ±θ i .To be more precise, if the original resource state in Fig. 2A is denoted by |G 11 ⟩, and after measuring qubits 4 and 5 we project on the outcomes |θ − ⟩ 4 and |θ + ⟩ 5 , respectively, we have the equality with the case when we project on the outcomes |θ + ⟩ 4 and |θ − ⟩ 5 , On the other hand, if we project on the outcomes |θ + ⟩ 4 and |θ + ⟩ 5 , we have the equality with the case when we project on the outcomes |θ − ⟩ 4 and |θ − ⟩ 5 , While the random byproduct on the left (l), middle (m), and right (r) qubits can be corrected in all the cases by classical post-processing, the postmeasurement states are not necessarily equal in the two cases present in Eqs.(8,9).Consequently, any such protocol, including patterns without a flow, would require a postselection to obtain the "all-green" results, generally requiring an exponential sampling overhead.
The pattern in Fig. 2B has a distinct measurement order and, thus, a flow.|θ − ⟩ i outcomes on any blue qubits can always be compensated by the neighboring qubit in the upper measurement layer without introducing inequivalent possible post-measurement state parametrization.

Measurement-based VQE
Ferguson et al. [32] presented two methods for transferring the gate-based VQE to MBQC.The first method involves translating the parametrized gatebased circuit into MBQC measurement patterns using the universal MBQC patterns introduced by Raussendorf et al. [29].While this approach may be suitable for platforms exclusively supporting MBQC, as anticipated for photonic quantum computers, it may be less appealing when evaluating the depth reduction performance of MBQC on gate-based machines.Certain "cheap" operations in the gate-based implementation, like single qubit rotations, require considerably many qubits and adaptive measurements to implement with MBQC.
The second MBVQE method introduced in Ref. [32] is a more "MBQC-native" approach, which forms the foundation of our work and inspired many other [33][34][35][36][37].To illustrate, let us assume that we want to study an n-qubit Hamiltonian using MBVQE.In this method, we select n output-qubits, a graph state, to act as the host for the parametrized n-qubit postmeasurement state.These qubits are called ansatz qubits.We have the flexibility to choose a specific graph structure of the ansatz qubits, aligning it with, for instance, known symmetries of the Hamiltonian or the qubit-connectivity of the hardware.To introduce parametrization, we attach additional qubits called decoration qubits to the ansatz qubits, all together forming a large graph state.These decoration qubits are measured in varied bases R(θ i ), introducing a variational parameter θ i per decoration qubit.Once all k decoration qubits are measured, the state of the ansatz qubits depends on k variational parameters.These parameters can be optimized classically, following the standard approach utilized in VQE.
A further freedom of design in this scheme is how these decoration qubits are attached to the ansatz qubits and how many.

MBVQE with edge-wise decoration
In Ref. [32], the authors decided on an edge-wise decoration strategy in the context of a problem-specific MBVQE ansatz for studying perturbed instances of the toric code.The ansatz qubits are chosen as the local-Clifford (LC) equivalent graph state of the noisefree toric code's ground state.Since the perturbative terms weaken the ground state's entanglement, decorations should allow tweaking the correlation strength of the ansatz qubits.Inspired by this idea, the edgewise decoration suggests attaching four qubits to each edge in the ansatz-graph, with each of the two qubits from the added four, allocated to a vertex in an original graph (see Fig. 2A).While this MBVQE ansatz shows a favorable expressivity with respect to specific Hamiltonians [32], it is vital to acknowledge that this edge-wise decoration scheme is impractical whenever the ansatz graph state has a degree higher than one.Attaching multiple edge-wise decorations to a single ansatz vertex breaks the flow condition, prohibiting deterministic computation.

Deterministic MBVQE with node-wise decoration
In the context of MBVQE, a stringent treatment of random byproducts is essential when starting from a highly entangled graph state as a resource since the number of non-equalizable measurement outcomes grows exponentially with the number of flowinfringing qubits.This, naturally, makes postselection impractical with realistic problem sizes.To address this, we propose a decoration scheme that guarantees a flow in all cases.
To this end, we take a "copy" of the ansatz graph G 0 = (V 0 , E 0 ), and call it the first decoration layer graph In an iterative way, we can then define the l-th decoration layer, where we add the l-th copy of G 0 and connect its vertices with the ones in the layer (l − 1).See Fig. 2B for a simple 3-qubit example with 3 decoration layers.Similar measurement patterns have been considered in Refs.[36,37].This approach allows the correction of any Z byproducts by leveraging the stabilizer of the neighboring qubit in the above layer, starting the measurements from the bottom layer.We call such a decoration scheme nodewise decoration.This decoration scheme differs from the edge-wise one in resource theoretic requirements: the edge-wise scheme maintains a planar graph, while the node-wise scheme requires an additional dimension to the ansatz graph.In Fig. 2B, our ansatz graph is linear, demanding the preparation of a regular 2D cluster state as the resource state.For a 2D ansatz graph, a three-dimensional cluster state becomes necessary, which can be used as a resource for fault-tolerant MBQC [54][55][56].
Since we aim to explore the depth-reduction capabilities of MBVQE compared to gate-based VQE, we choose resource states that can be efficiently prepared on current (superconducting) NISQ devices without the need for SWAP gates.Thus, we limit to MBVQE-patterns that can be generated from a twodimensional cluster state.The gate-based equivalent circuit resulting from such patterns (see Fig. 3) resembles a typical hardware-efficient entangler ansatz often used in NISQ applications [6,43].As entangler circuits typically contain nearest-neighbor interactions only, we demand that the resource-state preparation is efficient and preferably constant in gate-depth to justify an MB implementation on GB platforms for gate-depth reduction.
While the cluster state topology is naturally given on some platforms like Google's Sycamore-chip [1] with 2D-lattice qubit connectivity, other platforms may have sparser connectivity as IBM's quantum chips that exhibit a heavy-hex lattice [57].A naive implementation of the cluster state on such a device would require the usage of many SWAP gates.Fortunately, there are already known techniques to modify graph states with Pauli measurements and local unitaries [50,58].In Appendix B, we demonstrate a measurement pattern that generates cluster states from heavy-hex graph states with Pauli measurements only.
4 Results and Experiments

Simulation of the XY -and Schwinger models
We simulate the performance of the introduced MB-VQE ansatz with two physical Hamiltonians, the Schwinger model [59,60], where σ ± n = 1 2 (X n ± iY n ), and the perturbed XYmodel, as test beds.An arbitrary Euler rotation is additionally applied to the output qubits, effectively implementing a basis change of both Hamiltonians.
To study the efficacy of the final Euler rotations, we additionally test the MBVQE ansatz without them for H XY .We vary the size of both Hamiltonians from 4 to 10 qubits and employ 1 to 9 node-wise decoration layers.We execute the identical configuration ten times, generating the plots shown in Figs.(4B-4C), which display the average relative error between the approximate and the exact ground state, with the curve width representing the variance across the runs.
The L-BFGS-B optimizer [61] paired with gradient estimates from finite differences are used to optimize the variational parameters.Generally, the ground state is well approximated when dealing with small Hamiltonians.A linear increase in the number of layers improves the estimates but does not yield accurate solutions for larger Hamiltonians.This outcome was anticipated, as our ansatz emulates the hardware-efficient ansatz, exhibiting the same limitations.
The Schwinger model is examined at µ = −0.7,critical in the second order [13,62], and at µ = 4, situated far from the critical point, in all cases with J = w = 1.The uncritical scenario is easier to approximate; the quality of the estimated ground state energy deteriorates around 9 qubits.This deterioration is already evident for the 6-qubit Hamiltonian in the critical case.See Fig. 4B.
Our hardware-efficient MBVQE ansatz demonstrates relatively better performance regarding the relative error than the entangler ansatz employed in Ref. [32].In their approach, the relative error decreases below 0.2 only using 8 decoration layers [32], whereas our ansatz achieves a significantly lower relative error of less than 10 −5 already with two decoration layers.
Fig. 4C illustrates the results obtained from analyzing the XY -Hamiltonian.The Pauli-Z perturbation term remains constant across all sites, with a fixed value d = 0.01.Choosing g = 1 corresponds to the transverse field Hamiltonian, while g = 0 marks the critical point.In the case of the uncritical setting, where the ground state is a product state, we can achieve high levels of accuracy for larger Hamiltonians.However, as the system size increases, it becomes increasingly challenging to disentangle our initially highly entangled resource state with small numbers of decoration layers.For the critical XY -model, the results are similar to those of the Schwinger model.The accuracy of the estimates improves with an increasing number of decoration layers, but an additional number of layers accessible in the simulations is insufficient to reach the ground state accurately.

XY -model on IBM hardware
After discussing the optimal performance of the MB-VQE entangler ansatz, our next objective is to gain a better understanding of its applicability on current gate-based quantum computers.Hardware experiments were carried out on the IBM platform, successfully executing quantum simulations with up to 127 qubits, recently shown in Ref. [63].While adaptive measurements, or dynamic circuits as they are called within the Qiskit environment [64], are available, we found that in our use case they did not work as well as using a postselection strategy (of course, neglecting the sampling overhead) -future improve- In the scaling study, we vary the number of ansatz qubits corresponding to the problem dimension and the number of appended decoration layers, resulting in an n × l cluster state.Each decoration qubit introduces a variational parameter θi.In addition to the variational decoration layer, we permit arbitrary local unitaries on the ansatz qubits following the measurement of the decoration qubits.B: The Jordan-Wigner transformed Schwinger model is examined for two to five fermions (corresponding to four to ten qubits) with J = w = 1.We investigate the Hamiltonian ground-state problem in two scenarios: an uncritical case (µ = 4, left) and a critical or close to critical setting (µ = −0.7,right).The relative errors of the approximate ground state energies compared to the exact solutions are plotted against the problem size in qubits.Line thickness indicates the variance from executing the same MBQVE circuit 10 times, while the color represents the number of applied node-wise decoration layers.Increasing the layer count improves accuracy, but the scaling accessible in the current simulations is insufficient for the exact ground state recovery, in general.We could recover the exact ground state in the 4-qubit scenario for both settings, but it becomes more difficult for higher qubit counts, although the estimate is more accurate in the uncritical case.ments in the dynamical control of the hardware will change this.Another challenge lies in the effective preparation of the resource state at the start.To address these concerns, we executed experiments using a measurement pattern that can be implemented on a heavy-hex lattice without requiring SWAP gates.Furthermore, this pattern is designed to be shallow regarding decoration layers and contains only up to one adaptive measurement.
In order to accommodate the current hardware capacities, we propose a tree-ansatz in Fig. 5A.Following the general correction scheme of the measurement byproducts in Section 2.2, the only adaptive measurement we need to perform is that caused by a measurement outcome on the "parent-qubit" measured in R(θ 1 ) basis.We found that using more adaptive measurements leads to significantly higher degree of noise in all our use cases.Measurement outcomes of the remaining qubits can be treated by a classical postprocessing of the measurement results on the output qubits.
We test the tree-ansatz for the periodic 4-qubit XY -model, Note that, we introduce a minus sign in front of H X compared to the conventional XY -Hamiltonian.However, our Hamiltonian is equivalent up to local unitaries to the conventional XY -Hamiltonian, since We choose the H XY Hamiltonian, as for any g, it is straightforward to derive the expectation value for our ansatz, and minimize it for θ 2 = θ 3 = π 2 .To say it otherwise, with our choice of the ansatz and the Hamiltonian, A B C Figure 5: A: We analyze the 4-qubit XY model using the depicted MBVQE-tree-ansatz on IBM hardware, employing a single variational parameter.This ansatz is suitable for larger values of g.The MBVQE procedure is performed twice, once using dynamic circuits (i.e., adaptive measurements) and once with postselection.Both error-mitigated estimates align closely with simulated data, falling within the expected error margin.B: Clifford data regression is conducted for dynamic circuits (left panels) and postselection (right panels) using Y measurements (top) and X measurements (bottom).We applied linear regression to the Clifford points and estimated the quality of the fits.Our analysis reveals that the mean-squared error (MSE) of the non-Clifford data points in relation to the fit is smaller for postselection.However, the fit fails to capture the error behavior of the Y expectation value in the dynamic circuits.C: CDR successfully mitigates hardware noise, with the expected observation that errors in Y for the dynamic circuits are not captured.The error margins of the postselection method are more accurate.Combining data from the top and bottom, according to the Hamiltonian, and finding the minimizing parameters results in Plot A.
the measurements on the mid-layer qubits are always fixed in the Pauli-Y basis.As a result, we are able to test dynamic circuits only varying one parameter, θ 1 without demanding implementation of gradient optimization for other bases, which could possibly lead to additional error accumulation.In our hardware experiments, we chose to adapt the measurement basis of θ 2 = ± π 2 depending on the outcome of the first measurement.
As an alternative approach to compare with, we use a postselection strategy, in which we only select those events for which the first qubit is projected on the |θ + ⟩ 1 .Then, there is no need for any corrections in the second layer.Since for our choice of the ansatz and the Hamiltonian, we only need to implement Pauli-Y measurements on the middle layer, we could effectively achieve the postselection with the classical post-processing, reducing the number of circuit runs.Furthermore, we use a combination of randomized compiling [65], dynamical decoupling [66] and Clifford data regression (CDR) [67] (c.f.Appendix C for more details) as error mitigation strategies.We ran our experiments on ibm_algiers (27 qubits) using a total budget of 100 000 shots to estimate each expectation value.
We perform a scan over the parameter range θ 1 ∈ [0, π] using 20 points in total, measuring the expectation values of H X and H Y (c.f.Eq. ( 13)) separately.From these 20 data points, we use the Clifford points θ 1 = 0, π/2 and π as mitigation points.The measured values are different from the ideal classically simulated points due to noise in the circuit.In Fig. 5B, we plot the measured values vs. the ideal values, comparing the postselection strategy with the dynamic circuits for the H X and H Y expectation values.Under the assumption of a global noise channel, there should be a linear relationship between the measured and ideal values [67].As can be seen in Fig. 5B, this model works considerably better for the postselection strategy than for the dynamic circuits -the mean-squared error of the recorded non-Clifford data points with respect to the CDR fit is larger for data points gathered from dynamic circuits.We perform linear fits using the mitigation data and use them to mitigate the measured expectation values.
In Fig. 5C, we show the expectation values H X (upper panel) and H Y (lower panel).As can be seen, the mitigated values are in very good agreement with the ideal, simulated values.From the data shown in Fig. 5C we calculate the estimated groundstate energy of the Hamiltonian in Eq. (13) by adding the data of H X and H Y with the correct factors, see Fig. 5A for results.

Cluster state preparation on IBM hardware
In anticipation of advancements in adaptive measurements and decreasing readout errors, we develop a strategy to generate cluster states from heavy-hex graph states without the need for SWAP gates.To engineer this pattern, we leverage the graphical rules of Pauli measurements, which transform each "honeycomb" into a cluster square up to local byproduct gates, which can be corrected based on the measurement results on the auxiliary qubits.One drawback of this approach is the number of lost qubits.
To assess the effectiveness of measurement-based resource generation, we perform experiments on a 27and a 127-qubit quantum computer.Using the Pauli measurement-based preparation technique, we generate a 2 × 3 cluster state on the 27-qubit machine and a 4 × 7 cluster state on the 127-qubit machine.As a point of comparison, we also generate these cluster states using a naive gate-based preparation method.Subsequently, we measure the stabilizers of the generated cluster states.The commuting stabilizer terms were grouped such that the observables to measure are reduced to two [68].
It should be noted that the measurement-based method induces local unitaries that modify the stabilizer of the state, which could be corrected using dynamic circuits.However, to avoid readout errors in such adaptive measurements, we refrained from correcting these unitaries to avoid additional sources of noise.Instead, we adjusted the stabilizers to be measured accordingly.For cluster qubits with an even number of neighbors, the additional unitaries are a combination from {I, Z}; both either commute with the graph stabilizer or introduce a minus sign that can be eliminated with classical post-processing.On the other hand, qubits with an odd number of neighbors could have additional Clifford gates from the set {I, Z, √ ±iZ}.These √ ±iZ gates commute with Z but transform X to ±Y .Consequently, we performed measurements in the Y basis for such qubits whenever appropriate.The plots display the expectation values of the cluster state stabilizer over 10,000 samples, with the median over all terms indicated by a star.Each method is evaluated once with readout mitigation and once with additional randomization and dynamic decoupling, the latter marked by an asterisk.Top:

MB
In the case of the 2 × 3 cluster state, the GB method exhibits higher fidelity.This can be attributed to the absolute CNOT count, which is higher in the MB case, although the gate depth is smaller.Furthermore, the GB compiler can select the best-performing six qubits from the 27-qubit chip, while MB utilizes the entire chip.Bottom: The impact of depth reduction becomes evident for larger examples, such as the 4 × 7 cluster implemented on the 127-qubit machine.
In GB, most expectation values collapse to 0, revealing total randomness.In contrast, MB shows significant signals, although still far away from the expected value of 1.
We used the sampler primitive provided in ibm-runtime to conduct our experiments.
The sampler has a built-in feature to correct read-out errors using matrix-free measurement mitigation as implemented in the M3 package [69].Furthermore, we implemented each experiment twice, once without additional modifications and another time using randomized compiling [65] and dynamic decoupling techniques [66].The results show that these methods indeed reduce the scattering of data points, particularly in measurement-based implementations.We ran the 27-qubit experiment on ibmq_ehingen and the 125qubit experiment on ibm_nazca.In all experiments, we used a total budget of 10 000 shots to measure each of the two observables that had to be estimated to calculate the expectation values of all stabilizers.
We show the measured expectation value of each stabilizer state in Fig. 6.In the case of the small sixqubit example, the naive gate-based method proved to be more effective.This can be attributed to the internal compiler selecting the best-performing 6 qubits out of the available 27 in the direct implementation.In contrast, the measurement-based method requires the use of the entire chip, even though some qubits may be unreliable due to bad calibration of two-qubit gates.Additionally, although there is a clear advantage in terms of CNOT depth (defined as the CNOT count of the longest path in the compiled circuit as a directed acyclic graph) for the measurement-based method with a depth of 3 compared to 11 in the gatebased implementation, the total count of CNOT gates required in the circuit is 22 for the measurementbased method and 16 for the gate-based implementation.However, the benefits of the measurementbased method become apparent in a larger example, such as creating a 4 × 7 cluster state using 125 qubits.In this case, we are able to obtain the cluster state with a CNOT depth of 5 and a total CNOT count of 142.In comparison, the gate-based implementation results in a CNOT depth of 69 and a total CNOT count of 186.Although the stabilizer measurement in the measurement-based implementation still exhibits significant noise in most terms, we observe modest signals, especially with randomization and dynamic decoupling.In such cases, despite the overall resource state still being noisy and potentially impractical for MBQC, there is value in transitioning to the MBQCbased state preparation scheme.

Conclusions and Outlook
In this work, we focus on one of the most popular hybrid quantum-classical algorithms, the variational quantum eigensolver (VQE), in the measurementbased setting (MB).The MBVQE approach has recently gained a lot of attention.In our work, we put a particular focus on the importance of determinism when performing MBVQE, which we identify with the notion of flow in a resource state.For the cases where the flow is absent, we argue either for the inevitable exponential computational overhead caused by postselection, or for the impossibility of convergence of the classical optimizer even in the perfect noiseless simulations.The issue becomes even more drastic if we need to use, for example, the read-out error mitigation.
As a next step, we propose a new MBVQE protocol featuring a resource state that respects determinism and resembles the widely used problem-agnostic hardware-efficient VQE ansatz.Moreover, our ansatz can be prepared "hardware efficiently" on NISQ devices, such that it reduces the circuit-depth requirements by respecting the native qubit connectivity of hardware and avoids additional SWAP operations.We evaluate our approach using ideal simulations on the Schwinger Hamiltonian and XY -model of an increasing number of qubits.As a result, we obtain MBQC patterns that implement an instance of the entangler ansatz that gets more expressive by increasing the number of decoration layers in the proposed resource state.Additionally, we use IBM hardware, which allows for the mid-circuit measurements to test our results.Here, we propose a tree-shaped decoration scheme for the 4-qubit XY -Model with a single adaptive measurement step and compare its performance in the case when determinism is ensured by post-selection (so no mid-circuit measurements).In this particular scenario we find that the post-selection works significantly better, since the adaptive measurement steps induce additional hardware noise.
Finally, we propose an efficient MBQC-inspired method to prepare the resource state, specifically the cluster state, on hardware with heavy-hex connectivity, requiring just a single measurement round.We implemented this scheme on quantum computers with 27 and 127 qubits and observed notable improvements for larger cluster states, although direct gate-based implementation achieved higher fidelity for smaller instances.
From our analysis, we conclude that the MBVQE approach offers a fruitful test bed to characterize the expressivity of ansatz in VQE applications.As expected from the theory of MBQC, the MBVQE also offers a trade-off between different hardware requirements: e.g., a qubit count and gate-depth.Thus, depending on the architecture and bottlenecks of available near-term hardware, one can choose between the gate-based and MB-based approaches.
Recent announcements of next-generation quantum hardware, such as IBM Heron with native CZ gates [70], are promising for resource preparation in MBQC.It is also interesting to explore how such modular quantum hardware with classical interconnects behaves regarding resource state generation.The effectiveness of MB approaches ultimately depends on the accuracy of adaptive measurements.Improvements in this area are anticipated on the path towards faulttolerant quantum computing.Until these advancements materialize, it is worth exploring and adopting error-mitigation methods specific to MBQC [71].In our experiments, we choose to implement the left graph since it can be directly executed on the IBM device.Right: By preparing the heavy-hex graph state and measuring the blue qubits in the illustrated bases, it is possible to generate a cluster state without the need for SWAP gates.However, it's important to note that the measurement outcomes of Pauli measurements on graph states are not graph states but rather local unitary equivalents.Despite this, these "byproduct" operators can be efficiently computed from the measurement outcomes of the auxiliary qubits and accounted for in subsequent calculations due to Gottesman-Knill theorem.
Table 1: The commutation relations play an essential role in simulating post-measurement states of multiple Pauli measurements on a graph state, as the resulting state is a graph state up to local Clifford operations.These additional operations alter successive measurements but in an efficiently simulable manner.The precise form of these operators and the table can be found in [50].We opted to include the commutation relations in the appendix due to the presence of typos in the highlighted equations of the original source.

Figure 1 :
Figure 1: A: A 5-qubit measurement pattern that implements an arbitrary single-qubit rotation Ux(ξ)Uz(η)Ux(ζ) from a linear graph state, and B: a 4-qubit pattern that performs a CNOT gate.Successive measurements of the blue qubits in the illustrated basis implement the desired quantum operation on the orange output qubit.

Figure 2 :
Figure2: A graphical representation of MBQC and byproduct corrections.Orange qubits are called ansatz qubits in the MBVQE-context and are also the output qubits.The blue qubits are measured in varied bases R(θi).Measurements results are depicted with overlapping green and red circles, indicating a projection onto the positive or negative eigenstate, respectively.These eigenstates are related via Pauli-Z operations which commute through the resource state via the graph state stabilizers.X byproducts can be corrected via an adaptive measurement step defining a casual and temporal measurement order.Whether these byproducts can be corrected in MBVQE, depends on the selected decoration scheme.A: Ref.[32] introduced an edgewise decoration scheme.Horizontally aligned qubits can be measured simultaneously.Here, two measurement orders coincide in the middle ansatz qubit and break the flow condition -correcting for one byproduct introduces another on the other side.We cannot obtain deterministic outcomes.B: A deterministic decoration is obtained by layering the ansatz-graphs and connecting them vertically.Every Z byproduct can be corrected with the stabilizer of the neighboring qubit in the subsequent measurement layer.

Figure 3 :
Figure3: The effective quantum circuit that is deterministically implemented when all byproducts are corrected that may occur during measurements for the depicted MBVQEansatz.Increasing the number of decoration layers is equivalent to increasing the gate-depth.

Figure 4 :
Figure4: A: In the scaling study, we vary the number of ansatz qubits corresponding to the problem dimension and the number of appended decoration layers, resulting in an n × l cluster state.Each decoration qubit introduces a variational parameter θi.In addition to the variational decoration layer, we permit arbitrary local unitaries on the ansatz qubits following the measurement of the decoration qubits.B: The Jordan-Wigner transformed Schwinger model is examined for two to five fermions (corresponding to four to ten qubits) with J = w = 1.We investigate the Hamiltonian ground-state problem in two scenarios: an uncritical case (µ = 4, left) and a critical or close to critical setting (µ = −0.7,right).The relative errors of the approximate ground state energies compared to the exact solutions are plotted against the problem size in qubits.Line thickness indicates the variance from executing the same MBQVE circuit 10 times, while the color represents the number of applied node-wise decoration layers.Increasing the layer count improves accuracy, but the scaling accessible in the current simulations is insufficient for the exact ground state recovery, in general.We could recover the exact ground state in the 4-qubit scenario for both settings, but it becomes more difficult for higher qubit counts, although the estimate is more accurate in the uncritical case.C: This figure is analogous to Fig.4B, showing the results for the linear XY -model with an external Pauli-Z perturbation of d = 0.01 with problem sizes varied from four to ten qubits.We investigate two cases: the anisotropic case (g = 1, left), equivalent to the Ising model, and the isotropic case (g = 0, right).The observed trends are consistent with those in the previous figure, indicating that increased layering leads to improved approximations.Notably, the left case exposes a limitation of the ansatz, as disentangling a linear chain necessitates multiple layers of decorations.This can be avoided by modifying the ansatz qubits.D: The same XY -model Hamiltonians are examined, but local U 3(ζ, η, ξ) rotations on the ansatz qubits are omitted.This results in a slight quality decline, as the decoration layers are exhausted for implementing the local rotations.
Figure4: A: In the scaling study, we vary the number of ansatz qubits corresponding to the problem dimension and the number of appended decoration layers, resulting in an n × l cluster state.Each decoration qubit introduces a variational parameter θi.In addition to the variational decoration layer, we permit arbitrary local unitaries on the ansatz qubits following the measurement of the decoration qubits.B: The Jordan-Wigner transformed Schwinger model is examined for two to five fermions (corresponding to four to ten qubits) with J = w = 1.We investigate the Hamiltonian ground-state problem in two scenarios: an uncritical case (µ = 4, left) and a critical or close to critical setting (µ = −0.7,right).The relative errors of the approximate ground state energies compared to the exact solutions are plotted against the problem size in qubits.Line thickness indicates the variance from executing the same MBQVE circuit 10 times, while the color represents the number of applied node-wise decoration layers.Increasing the layer count improves accuracy, but the scaling accessible in the current simulations is insufficient for the exact ground state recovery, in general.We could recover the exact ground state in the 4-qubit scenario for both settings, but it becomes more difficult for higher qubit counts, although the estimate is more accurate in the uncritical case.C: This figure is analogous to Fig.4B, showing the results for the linear XY -model with an external Pauli-Z perturbation of d = 0.01 with problem sizes varied from four to ten qubits.We investigate two cases: the anisotropic case (g = 1, left), equivalent to the Ising model, and the isotropic case (g = 0, right).The observed trends are consistent with those in the previous figure, indicating that increased layering leads to improved approximations.Notably, the left case exposes a limitation of the ansatz, as disentangling a linear chain necessitates multiple layers of decorations.This can be avoided by modifying the ansatz qubits.D: The same XY -model Hamiltonians are examined, but local U 3(ζ, η, ξ) rotations on the ansatz qubits are omitted.This results in a slight quality decline, as the decoration layers are exhausted for implementing the local rotations.

1 Figure 6 :
Figure 6:  The performance of the measurement-based (MB) cluster state preparation is compared to the regular gatebased (GB) implementation, which requires high SWAP gate counts on the IBM hardware with heavy-hex connectivity.The plots display the expectation values of the cluster state stabilizer over 10,000 samples, with the median over all terms indicated by a star.Each method is evaluated once with readout mitigation and once with additional randomization and dynamic decoupling, the latter marked by an asterisk.Top: In the case of the 2 × 3 cluster state, the GB method exhibits higher fidelity.This can be attributed to the absolute CNOT count, which is higher in the MB case, although the gate depth is smaller.Furthermore, the GB compiler can select the best-performing six qubits from the 27-qubit chip, while MB utilizes the entire chip.Bottom: The impact of depth reduction becomes evident for larger examples, such as the 4 × 7 cluster implemented on the 127-qubit machine.In GB, most expectation values collapse to 0, revealing total randomness.In contrast, MB shows significant signals, although still far away from the expected value of 1.

Figure 7 :
Figure 7: Left: Graph states linked through local complementation are local Clifford equivalent.In our experiments, we choose to implement the left graph since it can be directly executed on the IBM device.Right: By preparing the heavy-hex graph state and measuring the blue qubits in the illustrated bases, it is possible to generate a cluster state without the need for SWAP gates.However, it's important to note that the measurement outcomes of Pauli measurements on graph states are not graph states but rather local unitary equivalents.Despite this, these "byproduct" operators can be efficiently computed from the measurement outcomes of the auxiliary qubits and accounted for in subsequent calculations due to Gottesman-Knill theorem.