Bioinspired Quantum Oracle Circuits for Biomolecular Solutions of the Maximum Cut Problem

Given an undirected, unweighted graph with n vertices and m edges, the maximum cut problem is to find a partition of the n vertices into disjoint subsets <inline-formula> <tex-math notation="LaTeX">${V}_{{1}}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">${V}_{{2}}$ </tex-math></inline-formula> such that the number of edges between them is as large as possible. Classically, it is an NP-complete problem, which has potential applications ranging from circuit layout design, statistical physics, computer vision, machine learning and network science to clustering. In this paper, we propose a biomolecular and a quantum algorithm to solve the maximum cut problem for any graph G. The quantum algorithm is inspired by the biomolecular algorithm and has a quadratic speedup over its classical counterparts, where the temporal and spatial complexities are reduced to, respectively, <inline-formula> <tex-math notation="LaTeX">${O}\text {(}\sqrt {{2}^{n}/{r}}\text {)}$ </tex-math></inline-formula> and <inline-formula> <tex-math notation="LaTeX">${O}\text {(}{m}^{{2}}\text {)}$ </tex-math></inline-formula>. With respect to oracle-related quantum algorithms for NP-complete problems, we identify our algorithm as optimal. Furthermore, to justify the feasibility of the proposed algorithm, we successfully solve a typical maximum cut problem for a graph with three vertices and two edges by carrying out experiments on IBM’s quantum simulator.

and let |E| = m.A cut {V 1 , V 2 } of G is defined as a partition of vertices into two disjoint subsets V 1 and V 2 .The size of the cut is the number of the edges between V 1 and V 2 .
which is also the maximum cut size for this graph.
In what follows, we assume that X = {x n • • • x 1 |x d ∈ {0, 1}, 1 ≤ d ≤ n} is a set of 2 n possible cuts.We further assume that x 0 d indicates that x d = 0, while x 1 d indicates that x d = 1.With this, each element in X is n bits long and represents one of the 2 n possible partitions of n vertices into two disjoint subsets V 1 and V 2 .Furthermore, if an x d = 1 in x n • • • x 1 ∈ X then this indicates that the d-th vertex in graph G is in V 1 .For the same partition, if x d = 0, then this indicates that the d-th vertex is in V 2 .
The fact that an edge (x k , x p ) ∈ V 1 × V 2 can be verified by formula (1).Similarly, the fact that an edge is not shared between V 1 and V 2 can also be verified by formula (1).
where ∧ stands for the logic AND, and ∨ stands for the logic OR operation.Formula (1) essentially outputs a 1 if x k and x p belong to different sets of vertices, i.e. either ( Formula (1) outputs a 0 if both x k and x p belong to the same set of vertices (either both to V 1 or both to V 2 ).

A. Related Works and Motivation
Quantum computing promises to solve certain hard problems more efficiently than classical algorithms.This holds especially for the case when the input size is too large for classical algorithms to process.Improvements over classical algorithms can be achieved via quantum interference, superposition and entanglement (e.g.[20], [21]).Some of the best known quantum algorithms that offer such a speedup are 1558-2639 © 2024 IEEE.Personal use is permitted, but republication/redistribution requires IEEE permission.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
quantum integer factorization [4] which runs exponentially faster than any known classical algorithm, and quantum search algorithm [5] that offers a generic square-root speedup over classical algorithms.It has been shown in [3] that classical algorithms would require (2 n ) queries where Grover's algorithm only requires O(2 n/2 ).Shor's algorithm is problemspecific.On the other hand, Grover's algorithm finds a wide range of applications as a subroutine in quantum algorithms, such as in [7], [8], [10], [12], and [15].And it also constitutes the general framework of the present algorithm.
While the opposite problem of finding a minimum cut in a graph is efficiently solvable by the Ford-Fulkerson algorithm [11], the maximum cut problem is known to be NP-hard.This means that there are no known polynomial-time classical algorithms for the problem for general graphs.The max-cut problem in planar graphs can be however solved on classical computers in polynomial time [13].As planar graphs constitute only a small subset of the graph family, it is vital to research on finding ways to solve the maximum cut problem efficiently for the general case.The present algorithm is such an approach as it works for graphs of arbitrary structure.
There exist classical approximation algorithms, the best of which runs in polynomial time and has an approximation ratio of ≈ 0.878 [9].In contrast to that, the algorithm presented in the present work is exact and deterministic, that is, its approximation ratio is 1.
Besides the results described in the present work, related research on the maximum cut problem has been reported.Moll et al. report using the variational quantum eigensolver (VQE) [22], which is a hybrid quantum-classical approach, to find an approximation to the maximum cut in a 5-qubit system.The authors use a perfect classical simulator to perform a test in which the reported probability that the solution is found is given as 95%.The maxcut problem was also used as the illustrative example in the seminal paper introducing the quantum approximate optimization algorithm (QAOA) [23].Like VQE, QAOA is a hybrid quantum-classical optimization algorithm, and, as its name suggests, it provides an approximation to the problem.The authors reported numerical results for the special cases of 2-regular and 3-regular graphs.For the 2-regular graphs, the algorithm can achieve an arbitrary level of precision by making a parameter p large enough.As discussed in [25], QAOA consists of p steps, where in each step a classical Hamiltonian, derived from the cost function, and a mixing Hamiltonian are applied.As pointed out in [25], with p increasing, parameter optimization becomes inefficient due to the curse of dimensionality.Hence, the success of QAOA depends on the ability to find optimal parameter settings.Meli at al. [24] propose a hybrid quantum-classical algorithms for the weighted maxcut problem, where the edges in the graph carry different weights.Experimentally, their algorithm outperforms the state-of-the-art QAOA algorithm on random fully-connected graphs.Hybrid methods are approximative and therefore they are benchmarked based on how good approximation ratio they provide.Our algorithm, on the other hand, is by design deterministic and provides the exact, correct result.
Essentially the difference between the above quantum approaches and ours is that the approaches are tailored using approximate quantum-classical computing which is suitable for the NISQ era of quantum computation [6], while our algorithm belongs to the class of fault-tolerant quantum methods, which are purely quantum methods that don't make use of classical optimization techniques.Fault-tolerant methods require much more resources than approximative hybrid NISQ methods.This is also a reason why we are unable to provide statistical results for a multitude of different graphs.The present algorithm gives a 100% probability of finding the solution and uses a perfect classical simulator of quantum systems on 15 qubits to obtain a solution for a 3-qubit problem.Due to state-of-the-art quantum hardware limitations, this is the largest example we could simulate.The algorithm is in principle extendable to the weighted maxcut problem, which we expect to tackle in further research.

B. Main Contributions and Novelty
In this work, we have devised a biomolecular and a quantum algorithm for the maximum cut problem for arbitrary undirected graphs.We show how certain quantum operations are inspired by biomolecular operations.We improve the system size of the quantum algorithm by a significant factor compared to the algorithm in [1].Our quantum algorithm has a quadratic speedup over comparable classical algorithms for the problem.

C. Overview of Registers Used in the Algorithm
In order to enable a better understanding of the presented algorithm, below we summarize the quantum registers used in it.
• x: each qubit in this register refers to a single vertex in the corresponding graph • aux: auxiliary single-qubit register used for phase inversion • r : auxiliary register used for storing the outcome of evaluating one of the conjunctive terms in equation (1).
Each single term requires one qubit, hence 2 qubits in total for each evaluation of the formula.With this, r i,1 refers to the first term, and r i,2 to the second term in evaluation i.
• s: auxiliary register storing the outcome of the disjunction in formula (1).A single qubit is used for each disjunction.
• z: auxiliary register used to store the outcomes of evaluating the operations in Fig. 5. Indices i and j in z i, j run over edges.

II. BIOMOLECULAR ALGORITHM FOR THE MAXIMUM CUT PROBLEM
In this section, we introduce the biomolecular operations necessary to carry out our biomolecular algorithm for the maximum cut problem.Then, we introduce the algorithm itself.

A. Biomolecular Operations
Biomolecular operations employed in this paper were originally introduced in [2].Below we present them briefly based on [10] for completeness.In the following definitions it is Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
assumed that experimental lab tubes X = {x n x n−1 . . .
1) Given a tube X and a strand x j , the operation Append_Tail appends x j onto the end of every element in X , and the operation Append_Head appends x j onto the front of every element in X .Formally: Append_Tail(X, x j ) = {x n x n−1 . . .x 1 x j }.Append_Head(X, x j ) = {x j x n x n−1 . . .x 1 }.This is achieved by means of denaturation and annealing.2) Given m tubes X 1 , . . ., X m , the Merge operation unifies their content: Merge(X 1 , . . ., X m ) = X 1 ∪. ..∪X m .This is achieved by pouring the contents of the tubes into a single tube.3) Given a tube X , the operation Amplify(X, {X i }) generates a number of identical copies X i of X and then discards X .This is achieved by polymerase chain reaction.4) Given a tube X and a strand x j , if x j = 1 then the Extract operation creates two new tubes +(X, . This is achieved by affinity chromatography.5) Given a tube X , the operation Detect(X ) returns a True if X ̸ = ∅.Otherwise, it returns a False.6) Given a tube X , the bio-molecular operation Read(X ) describes any element in X .Even if X includes many different elements, this operation can give an explicit description of exactly one of them.

B. Biomolecular Algorithm
In the following, we present a molecular algorithm, Algorithm 1, to solve the maximum cut problem for an undirected unweighted graph G with n vertices and m edges.The first parameter is an empty tube X 0 that is regarded as the input tube.Each tube T, P in the algorithm is initially empty and is regarded as an auxiliary storage.Note that in the following code, bits x a and x b encode vertices v a and v b for an edge e j = (v a , v b ) in G. Auxiliary bits s j , 1 ≤ j ≤ m store the result of evaluating formula 1.Since there are 4 possible input combinations, s j store the corresponding 4 outputs.s 0 j indicates that the corresponding edge Algorithm 1 proceeds as follows.Each execution of steps 1-2 appends the value 1 for x n as the first bit of every element in a set T 1 and the value 0 as the first bit of every element in a set T 2 .Hence, After that, the contents of T 1 and T 2 are discarded, i.e., T 1 = T 2 = ∅.Next, in each execution of step 5, two ideantical copies T 1 and T 2 of tube X 0 are created and then the content of X 0 is discarded, resulting in X 0 = ∅.In each step 6, the value 1 is appended for x d onto the end of x n . . .x d+1 for every element in T 1 .And similarly, each execution of step 7 appends the value 0 for x d onto the end of x n . . .x d+1 for every element in T 2 .After that, the two tubes T 1 and T 2 are merged in step 8 to X 0 = T 1 ∪ T 2 , and Algorithm 1 Overview of the Biomolecular Algorithm for the Maximum Cut Problem Data: In steps 10-19, we evaluate formula 1 for j-th edge e j = (v a , v b ).Upon each execution of step 11, tube P 1 contains those DNA strands that have x a = 1, while tube P 3 contains those DNA strands that have X a = 0.The contents of X 0 is discarded.Upon each execution of step 12, tube P 2 contains those DNA strands that have x a = 1 and x b = 1, while tube P 4 contains those DNA strands that have X a = 1 and x b = 0. Tube P 1 = ∅.Similarly, upon each execution of step 13, tube P 6 contains those DNA strands that have x a = 0 and x b = 1, while tube P 8 contains those DNA strands that have x a = 0 and x b = 0. Tube P 3 = ∅.Next, in steps 14-17 the value 1 is appended for s j onto the head of every element in P 6 and P 4 .Similarly, the value 0 is appended for S j onto the head of every element in P 8 and P 2 .This indicates that the molecular solutions in tubes P 4 and P 6 contain those partitions for which the j-th edge is either in Likewise, the molecular solutions in tubes P 2 and P 8 contain those partitions for which the j-th edge is neither in Next, step 22 is used to judge the influence of s i+1 on the number of 1s in tubes X j+1 and X j at iteration (i, j).Upon each execution of this step, tubes X O N j+1 and X j are formed from X j .Therefore, X O N j+1 has s i+1 = 1 and X j has s i+1 = 0.This means that at iteration (i, j) s i+1 records single 1s in tube X O N j+1 and 0s in X j .Next, in step 23, the Merge operation is used to pour the content of tube X O N j+1 into tube X j+1 .This implies that at iteration (i, j), s i+1 records single 1s in tube X j+1 .From iteration (i, j − 1) through (m − 1, 0) similar processing is used to compute the influence of s i+1 through s m on the number of 1s.Therefore, after each operation has been completed, the DNA strands in tube X i for 0 ≤ i ≤ m have i 1s and contain i edges.
In steps 26-30 molecular solutions representing a maximum-sized cut are read out.If there are DNA strands in tube X c , a "true" is returned.In this case, the solution is read out and the algorithm terminates.

C. Time and Space Complexity
The maximum cut problem for any undirected, unweighted graph G with n vertices and m edges can be solved with O(n + m 2 ) biomolecular operations, O(2 n ) DNA strands, O(m) tubes and the longest DNA strand of O(n + m) base pairs.This analysis follows directly from the structure of Algorithm 1.

III. BIOINSPIRED QUANTUM ALGORITHM FOR THE
MAXIMUM CUT PROBLEM In this section, we present our quantum algorithm that was inspired by the biomolecular algorithm described in Section II.

A. Deciding to Which Cut an Edge Belongs
After completion of steps 10-19 in Algorithm 1, tube P 2 contains those DNA strands that have x a = x b = 1 and s j = 0, tube P 4 contains those DNA strands that have x a = 1, x b = 0 and s j = 1, tube P 6 includes those DNA strands that have x a = 0, x b = 1 and s j = 1 and tube P 8 consists of those DNA strands that have x a = x b = 0 and s j = 0. Hence, the bioinspired truth table generated from these steps at the same iteration is the same as the truth table for formula 1.
We use auxiliary bits r j,1 and r j,2 , where 1 ≤ j ≤ m, to store the result of evaluating the first term x k ∧ x p and the second term x k ∧x p of formula 1.Further auxiliary bits s j , 1 ≤ j ≤ m are used to store the result of evaluating r j,1 ∨ r j,2 in formula 1.As assumed previously, s 1 j indicates that j-th edge Flowchart in Fig. 2 shows the procedure for determining to which cut an edge belongs step-by-step.

B. Computing Number of Edges in a Cut
In order to compute the number of edges in each cut, we introduce auxiliary Boolean variables z i+1, j and z i+1, j+1 , 1 ≤ i ≤ m, 0 ≤ j ≤ i.All the variables are initialized to 0. z i+1, j+1 stores the number of edges in a cut after determining the influence of bits (x k , x p ) encoding the (i + 1)-th edge (v k , v p ) on the number of edges (this corresponds to the number of 1s).Hence, z i+1, j+1 = 1 indicates that there are j + 1 edges in the cut.Likewise, z i+1, j stores the number of edges in a cut after determining the influence of bits (x k , x p ) encoding the (i + 1)-th edge (v k , v p ) on the number of edges.z i+1, j = 1 indicates that there are j edges in the cut.
In the molecular Algorithm 1, upon each execution of step 22 at iteration (i = 0, j = 0), the extract operation forms tubes X O N j+1 and X j from tube X j .This indicates that X O N j+1 has s 1 = 1 and X j has s 1 = 0. Therefore, s 1 records single 1s in tube X O N j+1 and zero 1s in tube X j .Then, upon each execution of step 23 at iteration (i = 0, j = 0), the merge operation is used to pour the content of tube X O N 1 into tube X 1 .This implies that at this iteration s 1 records single 1s in X 1 .Therefore, incrementing the number of 1s in each solution is to satisfy the following bioinspired Boolean formula: Preserving the number of 1s is to satisfy the following bioinspired Boolean formula Next, the extract operation and the merge operation at each execution of steps 22-23 at iterations other than (i = 0, j = 0) is to determine the influence of auxiliary bit s i+1 on the number of 1s.The biological operations indicate that increasing the number of 1s in a cut corresponds to satisfying the condition that the cut currently has to have j 1s and s i+1 = 1.The bioinspired Boolean formula for increasing the number of 1s in a cut is The biological operations also indicate that preserving the number of 1s in a cut is to satisfy that the cut currently has j 1s and s i+1 = 0.The bioinspired Boolean formula for preserving the number of 1s in a cut is Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.A flowchart on the calculation of the number of edges in a cut is given in Fig. 3. Recall that the number of edges corresponds to the number of 1s.Boolean variable z 1,1 in S 1 stores the result of implementing formula (2).If z 1,1 = 1, the number of edges is incremented so that the number of edges in each cut with the first edge (v a , v b ) is 1.In S 2 , variable z 1,0 stores the result of implementing formula (3).If z 1,0 = 1, then the number of edges is preserved so that the number of edges in each cut with two vertices v a and v b of the first edge (v a , v b ) is 0. S 3 sets the index of the first loop variable to 1. S 4 checks the condition if i is smaller than m.If so, S 5 is executed, otherwise the procedure of counting the number of edges is terminated.In S 5 , the index variable j of the second loop is set to the value of i. S 6 checks if j ≥ 0. If so, S 7 is executed.Otherwise, the next executed instruction is S 10 .In S 7 , Boolean variable z i, j stores the number of edges in a cut after determining the influence of the i-th edge on the number of 1s (edges).z i, j = 1 indicates that there are j edges in the cut.Boolean variable z i+1, j+1 stores the number of edges in a cut after determining the influence of s i+1 on the number of edges.z i+1, j+1 = 1 indicates that there are j + 1 edges in the cut.
In S 8 , Boolean variable z i, j stores the number of edges in a cut after determining the influence of the i-th edge on the number of edges.z i, j = 1 indicates that there are j edges in the cut.Variable z i+1, j stores the number of edges in a cut after determining the influence of s i+1 on the number of edges.z i+1, j = 1 indicates that there are j edges in the cut.S 9 decrements the value of the index variable j in the second loop.Execute repeatedly S 6 through S 9 until S 6 results in a False.Then, S 10 increments the value of the index variable i in the first loop.Loop over S 4 through S 10 until a False in obtained in S 4 .When this happens, S 11 is executed and the procedure terminates.The total cost for Fig. 3

C. Bioinspired Quantum Circuits for Calculating to Which Cut an Egde Belongs
We use auxiliary quantum bits |r j,1 ⟩ and |r j,2 ⟩, where 1 ≤ j ≤ m to respectively store the result of evaluating the two disjunctions in equation 1.The initial state of each auxiliary quantum bit r j,k is set to |0⟩.We further use auxiliary quantum bits |s j ⟩ to respectively store the result of evaluating |r j,1 ⟩ ∨ |r j,2 ⟩ in equation 1.The initial state of each |s j ⟩ is set to |1⟩.The quantum circuit in Fig. 4 determines whether an edge belongs to a cut or not.

D. Bioinspired Quantum Circuits for Computing the Number of Edges
The bioinspired circuits in instructions S 1 , S 2 , S 7 and S 8 of Fig. 3 for counting the number of 1s in a cut are respectively The outcomes of the operations in (6) are stored in auxiliary qubits |z i+1, j ⟩ and |z i+1,i+1 ⟩, where 0 ≤ i ≤ m − 1, 0 ≤ j ≤ i.Each of these qubits is initially prepared in the state |0⟩.We assume that |z i+1,i+1 ⟩ store the number of edges in a cut after determining the influence of Boolean variable s i+1 that increases the number of 1s.We also assume that |z i+1, j ⟩ store the number of edges in a cut after determining the influence of Boolean variable s i+1 that preserves the number of 1s.
In the quantum circuit INO in Fig. 5, a CNOT gate with target qubit |z 0 1,1 ⟩ and control qubit |s 1 ⟩ implements the formula z 1,1 ← s 1 in (6) and copies the value of qubit |s 1 ⟩ to |z 1,1 ⟩.Next, in the quantum circuit PNO in Fig. 5, a NOT gate on |s 1 ⟩ and a CNOT gate with target qubit |z 0 1,0 ⟩ and control qubit |s 1 ⟩ implement the formula z 1,0 ← s 1 in (6) and copy the value of |s 1 ⟩ to |z 1,0 ⟩.Then, another NOT gate restores |s 1 ⟩ to its original state.In the quantum circuit CIO of Fig. 5, a CCNOT gate with target qubit |z 0 i+1, j+1 ⟩ and two control qubits |z i, j ⟩ and |s i+1 ⟩ implements the formula z i+1, j+1 ← s i+1 ∧ z i, j in (6).Next, in the quantum circuit CPO in Fig. 5, a NOT gate on qubit |s i+1 ⟩ and a CCNOT gate with target qubit |z 0 i+1, j ⟩ and two control qubits |z i, j ⟩ and |s i+1 ⟩ implement the last operation in (6).Then, another NOT gate restores qubit |s i+1 ⟩ to its original state.

E. Putting the Algorithm Together
The pieces of our quantum algorithm described above need to be put together and combined with Grover's algorithm for amplification of solutions.This is shown by the pseudo-code in Algorithm 2. The input to the algorithm are: number of vertices n, number of edges m in graph G, and the maximum number of edges among the 2 n possible cuts.We note that R in line (24) of the algorithm is the number of maximum cuts.R can be determined by the quantum counting algorithm [3].
In Algorithm 2 the initial state is The first register (|1⟩) is a standard auxilliary register used in Grover's routine for both the oracle and the diffusion operator.We will refer to it as aux.
Grover's search algorithm consists of two steps: phase inversion, and diffusion.The starting point of the Grover algorithm is a quantum system in a uniform superposition, and an auxiliary qubit in the state |1⟩.The auxiliary qubit is set into this state by applying to it the quantum NOT gate, followed by the Hadamard gate.For example, in Fig. 7, our primary quantum system consists of the work qubits x_reg i , while the auxiliary qubit is aux.In each iteration of Grover's algorithm, we calculate the location of the maximum cut using the sequence of operations starting from the first EIIAC block to the second EIIAC_dg block.The purpose of this calculation is to invert the phase of the maximum cut for the graph in Fig. 1.The phase inversion is applied to the aux qubit.This operation effectively inverts the phase of the quantum state corresponding to the maximum cut.In the example case, it is the states |010⟩ and |101⟩.After phase inversion, we apply the diffusion operator to the work qubits.This is usually done in five steps: (1) a block of NOT gates on all qubits, (2) followed by a block of Hadamard gates on all qubits, (3) followed by a CCZ gate with one of the qubits being the target and the other two qubits being the controls, (4) followed by a block of Hadamard gates on all qubits, (5) followed by a block of NOT gates on all qubits.Essentially, the diffusion operator flips the amplitudes of all states by the mean of amplitudes.This way, the desired solution's amplitude is amplified in each iteration.
The number of iterations is specified by the formula given in Section V.

IV. COMPLEXITY ASSESSMENT
The maximum cut problem is known to be NP-hard, i.e. no polynomial-time algorithms are known for general graphs.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
For planar graphs, finding a maximum cut can be solved exactly in polynomial time [13].For other types of graphs, approximations are usually used.However, even so there is no polynomial time approximation scheme arbitrarily close to the exact solution [17].For this reason, every known approximation algorithm will never give an exact solution.The quantum approach proposed in this work doesn't run in polynomial time, however it provides a quadratic speedup over classical algorithms, which is due to Grover's routine having the complexity of O(2 n/2 ).This algorithm can be used for arbitrary type of graph without limitations.The proper execution of the algorithm assumes that the parameter t, which stipulates the maximum possible number of edges in a cut, is known.Due to the application of Grover's algorithm, one must also know the number of solutions upfront.This can be achieved by using the quantum counting algorithm [3].The probability of success is dictated by Grover's algorithm and is at least 1/2.The success probability gets below 1/2 for M > N /2 [19], where M is the number of solutions and N is the size of the search space, i.e. 2 n for n qubits.It is noteworthy that in principle the probability of success of Grover's algorithm can be made arbitrarily high [18] or higher by using partial diffusion [19], so that one is not limited to the lower bound of 1/2.This version of the algorithm is an improvement over the quantum algorithm by Chang et al. [1].It reduces the number of qubits from 5m  + n to m 2 + 5m + n + 1, where n is the number of vertices, and m is the number of edges.This analysis follows closely the structure of Algorithm 2. The main factor m 2 comes from the double loop in steps 11-20.
In [1], we had a quadruple loop that required a much higher number of resources.The difference can be also observed in a more direct way by comparing the respective logic formulas that form the basis of each of the two algorithms.In [1], the formula used was while in this work, through supplementation with other minor functions, it is reduced to just the first part

V. EXPERIMENTAL VALIDATION
We have coded [16] and executed our algorithm on IBM Quantum qasm simulator for the example graph given in Fig. 1.The statistical outcome is shown in Fig. 6.The maximum cut V 1 = {v 1 , v 3 }, V 2 = {v 2 } (or vice versa) is measured with a probability greater than 1/2.
The circuit was executed using IBM Quantum Qiskit platform.For the experiment, we used the noiseless qasmsimulator with 1024 shots and a generic noisy simulator.The average runtime for the noiseless simulator was 25.4 ms, while the average runtime for the noisy simulator was 3 s.This is due to the fact that the noisy simulator requires a transpilation procedure prior to the execution, where the gates are translated into native gates of the noisy simulator.The native gates are: x, sx, rz, id, and cx.The average qubit properties were as   follows: T1: 0.00015735 µs, T2: 0.00015063 µs, frequency: 5279379335.4190855Hz.The average gate durations and average errors are given in Table I.These properties contribute to the undesired superposition factors (see Fig. 6 right) that are not present in the noiseless execution.Fig. 7 shows the circuit used to produce the outcomes in Fig. 6.The gates applied before the first occurrentce of EIIAC circuit belong to the initialization step.The circuit is run once only in accordance with the formula π 4 2 n R , where R = 2 since the maximum cut sets are counted twice, as indicated in Fig. 6.The single run consists of a block of two IEEAC circuits, one for each edge, followed by a CNOT gate that flips the phase of the oracle qubit aux for the case where aux = 1.After the CNOT gate, all the gates inserted after the initialization step must be uncomputed to free qubits for eventual further runs in the case such runs are specified by the formula π 4 2 n R .And lastly, we have a diffusion block that amplifies the solution in each iteration/run of the Grover routine.

VI. CONCLUSION
In the present paper, we have devised both a biomolecular and a a quantum algorithm for the max-cut problem and Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
have shown how a quantum algorithm can be inspired by biomolecular operations.
The quantum algorithm offers a quadratic speedup over its classical, exact counterparts.We have further successfully executed an instance of the proposed quantum algorithm using IBM's Qiskit SDK [14].This version of the algorithm is an improvement over the quantum algorithm by Chang et al. [1].It reduces the number of qubits from 5m  + n to m 2 + 5m + n + 1, where n is the number of vertices, and m is the number of edges.
for c = m to 1 do 27 if Detect(X c ) then 28 Read(X c ) and terminate algorithm 29 end 30 end Having executed steps 4-9,

Fig. 2 .
Fig. 2. Flowchart for deciding to which cut an edge belongs.

Fig. 3 .
Fig. 3. Flowchart for calculating the number of edges in a cut.
is 2 CNOT gates, m(m + 1) AND gates and m(m + 1)/2 NOT gates.This is the cost of counting the number of edges for each cut.

Fig. 4 .
Fig. 4. Quantum circuit EIIAC is used to implement bioinspired Boolean circuits from S 3 through S 5 in Fig. 2 and to determine if k -th edge (v a , v b ) is in a cut or not.

Fig. 5 .
Fig. 5. Top left: Increasing the number of 1s for the influence of s 1 in each cut using the quantum circuit INO.Top right: Preserving the number of 1s for the influence of s 1 in each cut using the quantum circuit PNO.Bottom left: Increasing the number of 1s for the influence of s i+1 in each cut using the quantum circuit CIO.Bottom right: Preserving the number of 1s for the influence of s i+1 in each cut using the quantum circuit CPO.

Algorithm 2 3 Apply EIIAC to e 4 end 5 if t > 0 then 6 Apply
Overview of the Quantum Algorithm for the Maximum Cut Problem Data: quantum system in state |ψ 0 ⟩ Result: a maximum cut 1 Apply Hadamard gates to |aux⟩ and |x⟩ to set the auxiliary register into superposition and to generate the search space over register |x⟩; 2 for edge e = 1 to m do INO to implement z 1,1 ← s 1 7 end 8 if t < m then 9 Apply PNO to implement z 1,0 ← s 1 10 end 11 for i = 1 to m − 1 do 12 for j = i down to 0 do 13 if j + 1 <= t and m − i + j = t then 14 Apply CIO to implement z i+1, j+1 ← s i+1 ∧ z i, j 15 end 16 if j <= t and m − i + j − 1 = t then 17 Apply CPO to implement z i+1, j ← s i+1 ∧ z i, j on control |z m,t ⟩ and target |aux⟩ to label the cuts with the largest number of edges; 22 Reverse the operations from row 20 down to 2 to restore auxiliary qubits to original state; 23 Apply diffusion operator; 24 Repeat rows 2 through 23 at most 2 n R times.; 25 Measure to obtain a solution with a probability ≥ 1 2 .

Fig. 6 .
Fig. 6.The maximum cut found for the example graph in Fig.1.Note that both 010 and 101 indicate equivalent maximum cuts.Hence, the maximum cut for Fig.1 is obtained with probability 1. Left: Output from an exact simulator.Right: output from a noisy simulator.

Fig. 7 .
Fig. 7.The circuit for the example graph in Fig.1.

TABLE I COMPARISON
OF AVERAGE GATE DURATIONS AND ERRORS