After Google reported its realization of quantum supremacy, Solving the classical problems with quantum computing is becoming a valuable research topic. Switching function minimization is an important problem in Electronic Design Automation (EDA) and logic synthesis, most of the solutions are based on heuristic algorithms with a classical computer, it is a good practice to solve this problem with a quantum processer. In this paper, we introduce a new hybrid classic quantum algorithm using Grover’s algorithm and symmetric functions to minimize small Disjoint Sum of Product (DSOP) and Sum of Product (SOP) for Boolean switching functions. Our method is based on graph partitions for arbitrary graphs to regular graphs, which can be solved by a Grover-based quantum searching algorithm we proposed. The Oracle for this quantum algorithm is built from Boolean symmetric functions and implemented with Lattice diagrams. It is shown analytically and verified by simulations on a quantum simulator that our methods can find all solutions to these problems.

^{k} nodes,

Solving these problems with classical computers, even parallel computers, seems to not lead to interesting results and even not much has been published in recent years on these topics. However, future quantum computers give a promise. With the fast development of quantum circuits, several researchers focus on creating quantum algorithms for problems in Graph Theory [

Our paper proposes new quantum algorithms to find disjoint partitions of arbitrary graphs to E-regular graphs. E-regular graph is a regular graph in which all vertices have the same degree [

Two types of problems can be formulated for E-regular graph partition.

Our hybrid quantum/classical algorithm in to solve the second type of problems can be applied to various some problems in minimizing switch circuit. The main innovative idea of our paper is to represent Graph Theory problems as collections of symmetric functions in which variables correspond to edges of the graph and nodes to certain constraints on them. Symmetric functions can be realized efficiently in multi-level circuits called lattices. Although our small examples below use for simplicity DSOP realizations of symmetric functions, it is important that for large functions the presented oracles should use optimized lattices [

The principle of the proposed methodology is to find some subsets of edges that satisfy various types of constraints related to symmetry. Many problems can be formulated as clustering, partitioning or covering with applications in logic synthesis and Machine Learning. Although we refer for details to our previous works [

This paper is organized as follows. Section 2 presents Boolean Symmetric functions and their efficient realization in quantum circuits for Grover oracles. In Section 3 we present two quantum algorithms based on Grover. Section 4 only briefly outlines Grover’s Algorithm that is well-known. those in which every node has at least one adjacent edge. Two problems are solved for E-regular graphs. Section 5 covers problems in Boolean Minimization.

Grover’s algorithm is another function block in our hybrid algorithm. It is a quantum searching algorithm invented by Grover in 1996, In our algorithm the constraints are formulated with symmetric function blocks and the Grover’s algorithm is used as a solver to find the solutions for different problems. For problems with single solution Grover’s algorithm finds an input variable vector with high probability to satisfy the black-box Boolean function of the oracle,

The input searching space of Grover’s algorithm is created by

Oracle function in Grover’s algorithm should identify the target from input searching space, so it is problem-specific. There are many papers about Grover’s algorithm, but most of them do not pay attention to circuit complexity [

In this section, the Boolean symmetric functions, Lattice diagrams are presented, the quantum layout of Lattice diagrams is shown in the end, this is the core part of symmetric blocks in our oracle.

Let ^{n}

_{i} of ^{2}. By ^{0} to S^{n}. These symmetric indices can be combined as a multiple index symmetric functions, for instance S^{1} + S^{3} = S^{1} ^{3} = S^{1,3}.

There exist several classical structures to realize Boolean symmetric functions [

As we mentioned, Lattice Diagrams can use either Shannon or Davio expansions. If every cell in a Lattice Diagram has a uniform expansion, then we name that Lattice by the expansion. Thus

Let _{1}. Here _{1} replaced by 0, _{1} replaced by 1, _{2}_{0} ⊕ _{1} the Boolean difference of f for _{1}. Shannon expansion with respect to variable _{1} is:

Positive Davio expansion [_{1} is:

Negative Davio with respect to variable _{1} is:

The constants of the single-output lattice can be changed for different symmetric functions, more details and examples about constants and symmetric functions will be discussed in the next example. For multi-output lattices, the constants are determined by a specific symmetric function. This lattice has the capability to generate all symmetric functions by adding simple functions such as OR or EXOR on outputs. Given a Boolean function Q (

We can find in this equation that every constant W, X, Y, Z is multiplied by a term that is a symmetric function. For example, ^{1,3} (a, b, c). By selecting different coefficient values, the required symmetric function will be achieved at the output of this lattice. The sequence of coefficient constants W, X, Y, Z at the bottom of lattice is called a _{0} = 1,

In this matrix every row represents the “Davio cofactors” in Davio Lattice, every column represents symmetric functions from S^{0} to S^{3}. For example, the row [0 1 0 1] means the related symmetric function of cofactor X is S^{1,3}. Here we define the concept of

In Davio Lattice, each cofactor is associated with a group of symmetric indices, by selecting different order of cofactors we can get all symmetric function indices. For example, if we need function S^{1}, we can set X and Z to 1, and remaining cofactors to 0. In Davio Lattice all terms are connected with XOR gate, so the equation Q (a, b, c) becomes 0 ^{1,3}^{3} ^{1}. Symmetric functions with related binary vectors [W, X, Y, Z] are the following: S^{0} = [1, 1, 1, 1] , S^{1} = [0, 1, 0, 1] , S^{2} = [0, 0, 1, 1] , S^{3} = [0, 0, 0, 1].

Davio gate can be naturally mapped into a 3-inputs Toffoli gate, as shown in ^{2}(

The _{d} is a graph whose node set consists of all binary vectors of length

Instead of the binary vector, generator of graphs can also use any multi-valued vectors to create a new generalization of a hypercube graph, which we define here as a generalized hypercube.

Let us denote a clique with _{n}.

The n-cube or n-dimensional generalized hypercube Q_{n} is defined recursively in terms of Cartesian product of two graphs as follows:

The n-cube also can be defined as a graph whose node set V_{n} consists of n-dimensional vectors, where two adjacent vertices differ only in exactly one coordinate. Vectors could be _{2} = {0, 1}. Hypercube in _{3} = K_{2} _{2} _{2}. Generalized hypercube from _{2} = K_{3} _{3}. Generalized hypercube from _{2} = {0, 1} _{2} _{3} for a mixture of a binary and ternary vector. To illustrate, let us assume that nodes in graph from ^{0}B^{01} + A^{1}B^{12} = A^{0}B^{01} ^{1}B^{12}.

All our graph partitioning methods use the quantum Grover’s algorithm. With the benefit of Grover’s algorithm, quantum components of our algorithms gain a quadratic speed up comparing with the standard algorithm for these problems. Symmetric functions in Grover oracles are realized as in Section 2, but below a standard although less efficient realization is used for simplicity.

This first our oracle is designed for finding all disjoint partitions of an arbitrary undirected graph to regular graphs. In regular graphs, the degree of every node should be the same, we transform this condition into a Boolean equation and use this equation as a constraint to search all satisfied subsets of vertices in the graph. The E-Regular graphs are found for every value of E separately.

Consider the graph G(V, E) in _{1}, e_{2}, e_{3}, e_{4}, e_{5}, e_{6}, e_{7}, e_{8}, e_{9}}. We want to find all complete partitionings to loops (closed path). Therefore every node has one incoming edge and one outcoming edge, which leads to node with 2-symmetric function S^{2}. We look for all partitions to cycles. Let e_{i} where _{i} belongs in a selected regular graph, then e_{i} = 1; otherwise e_{i} = 0. Thus the equations for nodes are as in

Node function | Symmetric | |
---|---|---|

A | F_{A} = e_{1}e_{3}̅_{5}̅_{6} + e_{1}e_{5}̅_{3}̅_{6} + e_{1}e_{6}̅_{5}̅_{3} + e_{3}e_{5}̅_{1}̅_{6} + e_{3}e_{6}̅_{1}̅_{5} + e_{5}e_{6}̅_{1}̅_{3} |
S^{2}(e_{1}, e_{3}, e_{5}, e_{6}) |

B | F_{B} = e_{1}e_{2} |
S^{2}(e_{1}, e_{2}) |

C | F_{C} = e_{3}e_{4}̅_{2} + e_{3}̅_{4}e_{2} + ̅_{3}e_{4}e_{2} |
S^{2}(e_{2}, e_{3}, e_{4}) |

D | F_{D} = e_{6}e_{7}̅_{8} + e_{6}̅_{7}e_{8} + ̅_{6}e_{7}e_{8} |
S^{2}(e_{6}, e_{7}, e_{8}) |

E | F_{E} = e_{4}e_{5}̅_{7}̅_{9} + e_{4}e_{9}̅_{7}̅_{5} + e_{9}e_{5}̅_{7}̅_{4} + e_{7}e_{9}̅_{5}̅_{4} + e_{4}e_{7}̅_{5}̅_{9} + e_{5}e_{7}̅_{4}̅_{9} |
S^{2}(e_{4}, e_{5}, e_{7}, e_{9}) |

F | F_{F} = e_{8}e_{9} |
S^{2}(e_{8}, e_{9}). |

In this example we got two solutions, one is (e_{1}, e_{2}, e_{4}, e_{9}, e_{8}, e_{6}) which is a cycle {A, B, C, E, F, D}, another solution is (e_{1}, e_{2}, e_{3}, e_{7}, e_{8}, e_{9}), this one is two ternary hypercubes (cycles) {A, B, C} and {D, E, F}. To find all complete partitionings we create an oracle that is using a logic AND of node functions for all nodes of the graph. If we want to calculate the solutions with the best costs we need to add a sub-oracle composed from the quantum counter and comparator and we need to repeat calling Grover with modified oracles.

In our oracle, besides the symmetric function blocks, we also use a quantum counter and comparator to save the quantum cost [_{2}(

These results were simulated and verified by us using the Qiskit quantum simulator.

In partial hypercube partitioning, we find all subsets of nodes that are sub-hypercubes (cliques) but we allow also to exist nodes that do not belong to any sub-hypercube. Thus for graph from _{X} additional function S^{0} of all its adjacent edges. For instance, now we have F_{C} = e_{3}e_{4}̅_{2} + e_{3}̅_{4}e_{2} + ̅_{3}e_{4}e_{2} + (̅_{3} ̅_{4} ̅_{2}).

By the property of Lattice structure, the symmetric block is a highly modular design in our algorithm, by adding a specific symmetric function, we can extend symmetric function of the block without generating a new Lattice diagram.

Partial Hypercube Partitioning is used to minimize Boolean functions. Normally, SOP minimization is reduced to finding the set of all prime implicants (primes) and next solving the set-covering problem to cover all true minterms with set of primes of the lowest cost. We follow the approach to find DSOP first. For instance in one variant our hybrid algorithm solves the DSOP minimization by finding partitions to large product implicants first and follows with partitions to smaller products. The result is not optimal but we obtain the quadratic speedup to a quantum component of this problem. DSOP can be transformed to SOP equations by enlarging each product implicant to the cheapest prime implicant. This is done by removing subsets of literals from these products, similar as it is done in [

Given is a Boolean function:

Since our quantum algorithm does not fetch data from the input Boolean function directly, we need to use a classical computer for preprocessing and post-processing the data for the quantum Grover’s algorithm.

Based on the input function F(a, b, c, d), a compatibility graph is created by a classical computer, every true minterm in F(a, b, c, d) is a node in this graph, minterm ^{2}).

Node (related minterms) | Edges connected to this node |
---|---|

n1 |
e1 |

n2 |
e1, e2, e4, e5 |

n3 |
e2, e3, e5, e7 |

n4 |
e3 |

n5 |
e8 |

n6 |
e4, e6, e8, e9 |

n7 |
e6, e7, e9, e10 |

n8 |
e10 |

After the compatibility graph is created, the hypercube partition quantum algorithm is applied to find all disjoint implicants of F(a, b, c, d). In this case either the complete or the partial hypercube partition can be applied to solve this example, here we choose partial hypercube partition for illustration.

The indices of symmetric function used in our oracle are defined as (

To find a better solution, both indices can be changed during the multiple calls of Grover’s algorithm. After the result is returned in the first searching, it would be saved in a classical computer, then the classical computer removes this solution from searching space by disabling the related edges at the input of the quantum algorithm. In the next round, the classical computer modifies the first index

The results of each searching round are saved in the classical computer. When the whole searching process is finished, the DSOP/SOP of this function can be derived by performing a supercube calculation on sets of nodes, as explained below.

In ^{0,1} for all nodes. The result of this run is represented in a vector, like (1010000101), which means the edges e1, e3, e8, e10 are selected. With these edges, the classical computer traces back which nodes are selected. In this example the resulting sets of nodes are (n1, n2), (n3, n4), (n5, n6), (n7, n8). After transforming these pairs to the corresponding minterms, for pair (n1, n2) the minterms are

In the second run, because the degree of majority nodes is 3 (0 is illegal for index ^{3,0}, the related minterms are:

or DSOP:

This example, to minimize function G(a, b, c, d) from ^{0,3}. Under this constraint, there are multiple solutions that can be found, the edges between nodes m1, m2, m4, m5 are selected as a possible solution for illustration. The result of the first search is ^{0,3}, there is no result found. This is the case that index

We developed a hybrid classical/quantum algorithm that uses the Grover’s algorithm in its quantum part. Various quantum oracles constructed here are all based on symmetric Boolean functions that can be efficiently realized in oracles. Our method is applied here to solve two types of hypercube graph partition problems and two types of Boolean function minimization problems. The SOP minimization problem finds multiple applications in classical logic synthesis and PLA (Programmable Logic Array), PAL (Programmable Array Logic), FPGA (Field-Program Gate Array) design. The second, the DSOP minimization problem, is used in classical design as the first step of SOP minimization. DSOP minimization is also used as the first step of ESOP minimization. ESOP minimization is applied in classical logic for synthesis of arithmetic and testing circuits. More importantly ESOP logic is the fundament of minimizing arbitrary quantum functions realized with Inverter, Feynman, and multi-qubit Toffoli gates. Grover’s algorithm gives quadratic speedup when compared to classical counterparts, thus giving promise to future minimization of large functions, also in Machine Learning.

The hybrid algorithm presented above illustrates how several abstract decision and optimization problems can be reduced to Graph Theory problems base on symmetric function. These problems include graph coloring, graph covering, maximum cliques, shortest path, longest path, Traveling Salesman, and domination. Similar methods can be applied to minimization of Exclusive Sum of Product (ESOP) and factorized ESOP expressions. In these problems the concept of compatibility of certain Boolean functions is fundamental and serves to define various partitioning problems to symmetric functions, such as those presented in Sections 1 to 5. Edges are created for pairs of compatible nodes. In addition please note that many interesting and practical problems can be also reduced to some of these Graph Theory problems. For instance, Sudoku Puzzle can be reduced to a graph coloring problem. We believe that there are other fascinating problems in Graph Theory and Topology that would get more efficient solutions with the power of quantum computing.

As far as we know there are no quantum algorithms yet for graph partitionings as defined here. There are also no classical algorithms for the problems formulated and solved in Section 3. There are no quantum algorithms that would solve classical DSOP and SOP minimization as presented in Section 5. These problems, like clique covering and similar, are all NP-hard [