CN112949862B - Novel reversible circuit synthesis method based on ESOP (extreme likelihood operation) representation model - Google Patents
Novel reversible circuit synthesis method based on ESOP (extreme likelihood operation) representation model Download PDFInfo
- Publication number
- CN112949862B CN112949862B CN202110189441.0A CN202110189441A CN112949862B CN 112949862 B CN112949862 B CN 112949862B CN 202110189441 A CN202110189441 A CN 202110189441A CN 112949862 B CN112949862 B CN 112949862B
- Authority
- CN
- China
- Prior art keywords
- function
- node
- esop
- ordered
- variable
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Condensed Matter Physics & Semiconductors (AREA)
- Computational Mathematics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Complex Calculations (AREA)
Abstract
The invention provides a novel reversible circuit comprehensive method based on an ESOP (extreme case operation) representation model, and relates to the technical field of reversible circuit and quantum circuit comprehensive design; the method comprises the steps of firstly, representing a multi-output Boolean function F by using SFDD, and identifying linear variables of each output function of the F; dividing the distribution linear variable for each output function by using a weighted bipartite graph, detecting the independence of the linear variable by using the SFDD, and sequencing the output functions of the distribution linear variable to determine the sequence of the integrated output functions; and according to the sequencing result, based on an MPMCT gate library, adopting ESOP to represent a model comprehensive reversible circuit. The invention solves the problem that the quantum bit number of the circuit obtained by the comprehensive reversible circuit based on the ESOP representation model is relatively high, and aims to reduce the quantum bit number of the circuit obtained by the comprehensive reversible circuit based on the ESOP representation model.
Description
Technical Field
The invention relates to the technical field of reversible circuits and quantum circuit comprehensive design, in particular to a novel reversible circuit comprehensive method based on an ESOP (extreme case operation protocol) representation model.
Background
From the quantum computing application of the reversible logic, the reversible circuit has 2 technical indexes for measuring the quality, one is the quantum cost, and the other is the quantum digit. Reducing the quantum cost of a reversible circuit helps to reduce the fault-tolerant cost of its quantum circuit implementation. However, since qubits are a very precious hardware resource under current quantum processes, reducing the number of qubits is more conducive to the physical implementation of reversible circuits under current quantum processes.
The comprehensive reversible circuit based on the functional representation model and the ESOP (Exclusive-Sum-Of-Products) representation model can obtain a circuit with relatively less quantum bit number, and therefore, the comprehensive reversible circuit has more attention and application. For an irreversible Boolean function with n input numbers and m output numbers, the lower bound of the reversible realization of the required quantum bit number is max (n, m), and the upper bound is n + m. The comprehensive reversible circuit based on the functional representation model can follow the upper bound and the lower bound of the quantum digit, so that the quantum digit of the obtained circuit is relatively less, but the quantum cost is higher. Although the quantum cost of the circuit obtained by synthesizing the reversible circuit based on the ESOP representation model is relatively low, the obtained quantum bit number is relatively high because the quantum bit number only meets the upper bound constraint.
In summary, in order to promote the physical implementation of the reversible circuit under the current quantum process, it is necessary to find a new reversible circuit synthesis method based on the ESOP representation model, so as to reduce the quantum number of the obtained circuit while obtaining relatively low quantum cost.
Disclosure of Invention
The invention aims to provide a novel reversible circuit synthesis method based on an ESOP representation model, which can reuse the existing circuit lines in a circuit by identifying the linear variables of a function, thereby solving the problems in the prior art.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
a novel reversible circuit synthesis method based on ESOP representation model comprises the following steps:
s1, using the shared function decision graph SFDD to represent the multiple output boolean function F: {0,1}n→{0,1}mWhere n input variables form the set X ═ { X ═ X1,x2,…,xnF, m output functions form a set F ═ F1,f2,…,fm}; identifying each output function F of the multiple output Boolean function F according to the drawn SFDD graph G and the linear variable identification rulejLinear variable x ofiTo obtain a set of output functionsAnd linear variable setAnd FLVAnd XLVThe relationship betweenI.e. XLVIs at least FLVLinear variable of one of the functions, similarly, FLVContains at least one linear variable and the variable belongs to XLV;
The linear variable identification rule is specifically as follows:
given an SFDD graph G representing a multiple-output Boolean function F, an output function F is represented in the graph GjIs assumed by its root nodeTo node vkOf (2) aDominates the active pathway for the longest, andto vkThere is no path between other nodes in the level of graph G, then when the path isUsing the variable xiLabeled node viWhen it is a linear node, xiIs fjA linear variable of (d);
for multiple output function F ═ F1,f2,…,fmH, each output function fjAll can use one FDD representation, assuming the representation fjThe root node of FDD is recorded asIn the SFDD graph G, the root nodeAnd is prepared fromReachable nodes and corresponding edges constitute the representation function fjThe FDD of (1); the SFDD graph G is divided into n +1 layers, node vkThe layer uses lev (v)k) Denotes, lev (v)k) Not less than 1; in the SFDD graph G, each node is labeled with one variable of the function F except for the terminal nodes at level n +1 which represent either constant 0 or constant 1, assuming that node vkUsing variable xiMarking, then node vkThe layers located in graph G also use lev (x)i) Denotes, lev (v)k)=lev(xi) (ii) a If node vkIs node vjOne of the sub-nodes of (1), lev (v)k)>lev(vj) And node vjAnd node vkThere is a directed edge between e (v) and usej,vk) Representing; for root nodeAnd one is composed ofReachable node vkAnd a set of nodesIf it isIs thatThe sub-nodes of (a) are,is thatSub-node (1 ≤ i ≤ l-1), vkIs thatThe child node of (1), then the root nodeAnd vkAnd an edgeAndform a strip ofTo vkThe path of (1) is recorded asIf it is usedIs thatThe 0-branch sub-node of (1),is that0 branch sub-node (1. ltoreq. i. ltoreq.l-1), vkIs that0 branch of, thenIs an active pathway; if it is notOr alsoTo vkIs the only path ofIs the dominant active pathway; if the path is to beElongation to vkA sub-node v oftNew path afterIs not an active pathway, or is notTo vtIs the only path ofIs the longest dominant active pathway;for a node viIf its 1-branch child node is a terminal node representing constant 1And said node viTo the terminal nodeIf the edge of (1) is not a complementary edge, it is called viIs a linear node;
s2, using the weighted bipartite graph to combine the linear variablesIs allocated to at most a function setTo obtain an ordered function setWith ordered sets of variables|FA|=|XA|,FAAnd XAThere is a one-to-one mapping relationship between them;
s3, using SFDD graph G representing function F, the ordered function set obtained in step S2The function of (1) is related toChecking the independence of intermediate variables to determine ordered function setsMiddle functionThe order in which they are combined is,obtaining an updated ordered function setAnd updated set of ordered linear variables|FL|=|XL|,FLAnd XLThe relationship between them is still one-to-one mapping;
s4, according to the ordered function set obtained in the step S3And ordered set of linear variablesBased on the MPMCT gate library, an ESOP representation model is adopted to synthesize a reversible circuit.
Preferably, step S2 specifically includes:
combining the SFDD graph G representing the multiple-output Boolean function F, the set F obtained in step S1LV、XLVAnd relationshipsDrawing a bipartite graph, wherein the set XLVOf (1)And set FLVFunction of (1)Are all vertices in the bipartite graph; if it is notIs thatLinear variable of (2), then vertex in bipartite graphAnd vertexA side is arranged between the two edges; if it is notIs marked withRoot node of FDDThe weight of the edge is n, otherwise the weight isObtaining an ordered function set by using a Hungarian algorithm calculationWith ordered sets of variables|FA|=|XA|。
Preferably, step S3 specifically includes:
from the SFDD graph G representing the function F, first according toAscending pair of FAFunction of (1) and XAIf there are multiple root nodesAt the same level in graph G, according toDescending order pair of FACorresponding function in (1) and XAThe respective variable in (1) is ordered;
order setCollection ofFor each oneCarrying out global independence check; i.e. if setThe function of the representation is independent ofThen orderWherein' \\ is a set difference operation;
for each oneLocal independence check was performed: if setThe function of the representation is independent ofRespectively to be provided withAndappending to ordered set FbAnd XbAnd at the tail of Up to FAAll of the functions in (1) depend on XAOne variable of (1);
for each oneMake an association with XAConditional independence check of medium variables: if in ordered set FAIs located inA function afterSatisfy the requirement ofDepend onAnd isThen order
Let Fb=Fb∪FA,Xb=Xb∪XA;FL=Fd∪Fb,XL=Xd∪XbObtaining an ordered set FLAnd XL。
Preferably, in step S4, the model synthesis reversible circuit is represented by an ESOP:
n circuit lines are added, and the input variable set X of the multi-output boolean function F is used as { X }1,x2,…,xnMarking variables in the circuit lines, and calling the n circuit lines as input variable lines;
② ifThen the set F \ F is first alignedLESOP simplification is carried out on the expressed function to obtain the simplest ESOP expansion, and then | F \ F is addedLThe I auxiliary circuit line maps the product term in ESOP expansion into the cascade of MPMCT gates and uses the I F/F respectivelyLThe | F \ F is stored by | auxiliary circuit lineLThe calculation results of | functions;
③ ordered function setEach function inFirstly, ESOP simplification is carried out to obtain the simplest ESOP expansion, and thenEach of the ESOP product terms of (a) is mapped to a cascade of MPMCT gates and is referred to using the reference numeralThe input variable line of (2) stores the calculation result of the product term, and finally the label is usedInput variable line save functionThe calculation result of (2).
The invention has the beneficial effects that:
the invention discloses a novel reversible circuit synthesis method based on an ESOP (extreme case resolution) representation model, which can reduce the quantum digit of a circuit obtained by synthesizing a reversible circuit based on the ESOP representation model. For function F with n variables and m outputs, the existing reversible circuit synthesis method based on ESOP representation modelThe quantum digit of the obtained circuit is n + m, and the quantum digit of the circuit obtained by the reversible circuit synthesis method based on the functional representation model follows the lower bound and the upper bound of the quantum digit: max (n, m) and n + m. The quantum digit of the circuit obtained by the method is n + m-FL|(0≤|FLMin (n, m)) and follows the upper and lower bound constraints of quantum digit, compared with the existing reversible circuit synthesis method based on ESOP representation model, the quantum digit of the circuit is reduced by | FL|。
Drawings
Fig. 1 is a schematic diagram of an FDD node provided in embodiment 1;
FIG. 2 is a SFDD representing the function mod5d2_17 in the embodiment in example 1;
FIG. 3 is a linear variable distribution diagram in a specific implementation of example 1;
fig. 4 is a reversible circuit resulting from the synthesis of the function mod5d2_17 in the embodiment of example 1.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the invention, are intended for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
The embodiment provides a novel reversible circuit synthesis method based on an ESOP representation model, which comprises the following steps:
s1, using a shared function decision diagram SFDD to represent a multi-output Boolean function F: {0,1}n→{0,1}mWhere n input variables form the set X ═ { X ═ X1,x2,…,xnF, m output functions form a set F ═ F1,f2,…,fm}; identifying each output function F of the multiple output Boolean function F according to the drawn SFDD graph G and the linear variable identification rulejLinear variable x ofiTo obtain a set of output functionsAnd linear variable setAnd FLVAnd XLVThe relationship betweenNamely XLVIs at least FLVLinear variable of one of the functions, similarly, FLVContains at least one linear variable and the variable belongs to XLV;
The linear variable identification rule in the above steps is specifically as follows:
given an SFDD graph G representing a multiple-output Boolean function F, an output function F is represented in the graph GjFDD, assuming a root node from the FDDTo node vkOf (2) aDominates the active pathway for the longest, andto lev (v) in FIG. Gk) No path exists between other nodes in the layer, then when the path isUsing the variable xiWhen the marked nodes are linear nodes, xiIs fjIs used as a linear variable.
The concepts and terms involved in the above linear variable recognition rules are explained in detail as follows:
the function decision graph FDD is a directed acyclic graph G ═ (V, E).Is a set of nodes, where ^ t and ^ tTerminal nodes, v, representing constants 0 and 1, respectivelykAre non-terminal nodes, each having 2 sub-nodes (a 0-branch sub-node and a 1-branch sub-node). E ═ EiI is more than or equal to 1 and less than or equal to E is taken as an edge set, if v iskIs vjSub-node of (v) thenjAnd vkDirected edge usage e (v) betweenj,vk)=vj→vkAnd (4) showing. Node vkThe edge between its 0-branch sub-node uses a dashed line segment, and the edge between its 1-branch sub-node uses a real line segment.
For n variables X ═ X1,x2,…,xnF {0,1} ofn→ 0,1, the FDD representation is obtained by applying a positive or negative Davio decomposition to n variables in sequence, with one root node. The FDD is divided into n +1 layers, the root node is positioned at the 1 st layer, the terminal node is positioned at the n +1 st layer, and the node vkThe layer uses lev (v)k) And (4) showing. Except for the terminal nodes at the n +1 th level, the nodes at each level are labeled with a variable, assuming vkUsing xjMarking, then vkLayers located in FDD also use lev (x)j) Shows that lev (x) is clearly evidentj)=lev(vk). If v iskIs vjThe child node of (c) has lev (v)j)<lev(vk). Node vkCan represent a function using f (v)k) And (4) representing, namely a node function. For the terminal nodes, there are: f (t) is 0,
FIG. 1 shows a schematic diagram of a FDD node, as can be seen from FIG. 1, node v1There are 2 sub-nodes v2And v3(v2Or v3May be a terminal node), v2Is 0 branch child node, v3Is a 1-branch sub-node. Node v1Using variable x1And (4) marking. The hollow circle on an edge indicates that the edge is a complementary edge, and the meaning of the hollow circle is a function represented by a node of the end point of the edgeAnd (6) taking the inverse. For FIG. 1, assume x1Is a positive Davio decomposition, then
Multi-output boolean function F: {0,1}n→{0,1}mThe n (input) variables form a set X ═ X1,x2,…,xnF, m output functions form a set F ═ F1,f2,…,fm}. If an output function can be expressed asOrAnd the function g is independent of the variable xiThen call xiIs fjIs used as a linear variable.
For a multiple output Boolean function F, each output function FjAll can use one FDD representation, assuming the representation fjThe root node of FDD is recorded asIf the same variables all adopt the same decomposition type when constructing the FDDs of m output functions, the m FDDs form the SFDD representing the function F by sharing the subgraph and have m root nodesIn SFDD, the root nodeAnd is composed ofReachable nodes and corresponding edges constitute the representation function fjThe FDD of (1). Since the function F has n variables, its SFDD is divided into n +1 layers, and the terminal nodes are located at the n +1 th layer, except that it is possible that not all the root nodes are located at the 1 st layer.
There are two arbitrary nodes vjAnd vkAnd a set of nodesSuppose lev (v)j)<lev(vk) I.e. vkIn SFDD at vjAnd by node vjReachable node vk. If it isIs vjThe sub-nodes of (a) are,is thatSub-node (1 ≤ i ≤ l-1), vkIs thatIs a sub-node of, then node vj、And vkAnd an edgeAndform a strip consisting of vjTo vkThe path of (1) is recorded asIf it is usedIs vjThe 0-branch sub-node of (1),is that0 branch of (1 ≦ i ≦ l-1), vkIs that0 branch of (3), thenIs an active pathway; if it is usedOr vjTo vkIs the only path ofIs the dominant active pathway. For the representation fjRoot node of FDDAnd one is composed ofReachable node vkKnown path of travelIs dominant in the active pathway, if the pathway isAddition of vkIs assumed to be vt) And an edge e (v)k,vt) New pathIs not an active pathway, or is notTo vtIs called the unique pathThe longest dominant active pathway.
For node viIf its 1-branch child node is a terminal node representing constant 1And v isiTo the terminal nodeIf the edge of (1) is not a complementary edge, it is called viAre linear nodes.
S2, distributing linear variables for output functions containing the linear variables by using a weighted bipartite graph
Combining the variables using a weighted bipartite graphIs assigned to at most a function setTo obtain an ordered function setWith ordered sets of variables|FA|=|XA|,FAAnd XAThere is a one-to-one mapping relationship between them.
Distributing linear variables to output functions to obtain an ordered set FAAnd XAThe method specifically comprises the following steps:
combining the SFDD graph G representing the multi-output Boolean function F, and obtaining the function set F from the step S1LVVariable set XLVAnd relationshipsDrawing a bipartite graph and a function set FLVFunction of (1)And set of variables XLVOf (1)The vertices in the bipartite graph are all; if variableIs a function ofLinear variable of (2), then vertex in bipartite graphAnd vertexA side is arranged between the two edges; if it is notIs marked withRoot node of FDDThe weight of the edge is n, otherwise the weight isMixing XLVIs assigned to at most FLVThe problem of one of the functions can be considered as a maximum weighted binary matching problem. Solving the problem using a Hungarian algorithm to solve the allocation problem, resulting in an ordered set of functionsWith ordered sets of variables|FA|=|XA|。
And S3, utilizing the SFDD to carry out variable independence check on the output functions of the distributed linear variables, and determining the sequence of the output functions.
Using SFDD graph G representing function F, forThe function of (1) is related toChecking for independence of intermediate variables, determiningThe order of the medium functions is integrated to obtain an ordered function setAnd ordered variable sets|FL|=|XL|,FLAnd XLThe relationship between them is still a one-to-one mapping.
The order in which the decision output functions are integrated, i.e. the ordered set F, is given belowLAnd XLThe steps of (1):
first, using SFDD graph G representing function F, the method followsAscending pair of FAFunction of (1) and XAIf there are multiple root nodesAt the same level in graph G, according toDescending order pair of FACorresponding function in (1) and XAThe respective variable in (1) is ordered;
For each onePerforming a global independence check: i.e. if setThe function of the representation is independent ofThen orderWhere "\\" is a set difference operation.
For each oneLocal independence check was performed: i.e. if setThe function of the representation is independent ofRespectively to be provided withAndappending to an ordered setFbAnd XbAnd at the tail ofUp to FAAll of the functions in (1) depend on XAOne variable in (c).
For eachMake an association with XAConditional independence check of medium variables: if in ordered set FAIs located inA function afterSatisfy the requirements ofDepend onAnd isThen order
Seventhly, firstly make Fb=Fb∪FA,Xb=Xb∪XA(ii) a Then order FL=Fd∪Fb,XL=Xd∪XbTo obtain an ordered set FLAnd XL。
And S4, according to the sequencing result, based on an MPMCT (Mixed-polar Multiple Control Toffoli) door library, adopting ESOP to represent the model comprehensive reversible circuit.
Adding n circuit lines, using X ═ X respectively1,x2,…,xnThe variables in the are labeled, and the n circuit lines are called input variable lines.
Determining F \ FLWhether or not it is empty, ifDirectly entering the step III; otherwise, the step II is carried out;
② first to the set F \ FLESOP simplification is carried out on the expressed function to obtain the simplest ESOP expansion, and then | F \ F is addedLI auxiliary circuit lines map the product term in ESOP expansion to the cascade of MPMCT gates and use the I F \ F respectivelyLThe | F \ F is saved by | auxiliary circuit linesLThe result of the computation of | functions.
③ ordered function setEach function in (1)ESOP simplification is firstly carried out to obtain the simplest ESOP expansion, and then the minimum ESOP expansion is carried outEach of the ESOP product terms of (a) is mapped to a cascade of MPMCT gates and is referred to using the reference numeralThe input variable line of (2) stores the calculation result of the product term, and finally the label is usedInput variable line save functionThe calculation result of (2).
For the synthesis of the functions, the existing circuit lines are reused, and no additional auxiliary circuit line is needed, so that the quantum bit number required by the circuit is reduced.
The specific implementation mode is as follows:
the present embodiment specifically explains the present invention by taking the RevLib function mod5d2_17 as an example.
1) Identification of linear variables for individual output functions using SFDD
The SFDD representing the function mod5d2_17 is shown in FIG. 2, where in the SFDD shown in FIG. 2, node v is1~v5Are respectively the output function f1~f5A root node of, wherein v1、v3And v4At layer 1 of the SFDD. Route of travelAndrespectively, represent the output function f1~f4The longest dominant active path of FDD, denoted f5The longest dominant active path of FDD of (1) comprises only the root node v5。
From the definition of the linear nodes, the node v in FIG. 22~v6And v9Are all linear nodes and are respectively positioned in the 5 longest dominant active paths. Knowing x from linear variable identification rules1Is f1Linear variable of x2And x3Is f2Linear variable of x3And x4Is f3Linear variable of (a), x4And x5Is f4Linear variable of x5Is f5Of linear variable, i.e. FLV={f1,f2,f3,f4,f5},XLV={x1,x2,x3,x4,x5} relationship between two setsAs previously described.
2) A linear variable is assigned to an output function including the linear variable by using a weighted bipartite graph.
Set F obtained according to the previous stepLV={f1,f2,f3,f4,f5},XLV={x1,x2,x3,x4,x5And the relationship between the two setsThe weighted bipartite graph shown in FIG. 3(a) may be drawn in conjunction with the SFDD of FIG. 2. Solving the maximum weighted binary matching problem using the Hungarian algorithm to solve the assignment problem can result in a linear variable assignment result as shown in fig. 3(b), thereby obtaining an ordered set FA={f2,f4,f5,f1,f3},XA={x2,x4,x5,x1,x3And the relationship between the two sets is one-to-one mapping.
3) With SFDD, a variable independence check is performed on the output functions to which the linear variables have been assigned, and the order in which these output functions are integrated is determined.
First, the SFDD map G shown in FIG. 2 is used to followAscending pair of FAFunction of (1) and XADue to the root node v1、v3And v4At the same level in graph G, according to lev (x)3)、lev(x1) And lev (x)4) Sequence of (1) to (f)3、f1And f4Sorting to obtain updated ordered set FA={f3,f1,f4,f2,f5},XA={x3,x1,x4,x2,x5}。
Checking the global independence of variables: due to the function FA\{f1}={f2,f4,f5,f3Independent of x1Obtaining Fd={f1},Xd={x1}。
Checking local independence of variables: known as FA={f3,f4,f2,f5},XA={x3,x4,x2,x5}. For variable x2Due to the function FA\{f2}={f3,f4,f5Independent of x2Obtaining Fb={f2},Xb={x2};FA={f3,f4,f5},XA={x3,x4,x5}. For variable x3Due to the function FA\{f3}={f4,f5Independent of x3Obtaining Fb={f2,f3},Xb={x2,x3};FA={f4,f5},XA={x4,x5}. Due to the function f4And f5All depend on x5The local independence check of the variables ends.
Condition independence examination of variables: known as FA={f4,f5},XA={x4,x5}; for function f4Function f5After but due to f5Independent of x4Thus F isA={f4,f5},XA={x4,x5}。
Seventhly, firstly make Fb=Fb∪FA,Xb=Xb∪XA(ii) a Then order FL=Fd∪Fb,XL=Xd∪XbFinally, an ordered function set F can be obtainedL={f1,f2,f3,f4,f5X and set of ordered linear variablesL={x1,x2,x3,x4,x5}。
4) And according to the sequencing result, based on the MPMCT gate library, adopting ESOP to represent the model comprehensive reversible circuit.
Adding 5 circuit lines, using x1,x2,x3,x4,x5Variables in the are labeled and referred to as input variable lines, as shown in FIG. 4.
Pair ordered function set FL={f1,f2,f3,f4,f5Each function in f is ESOP simplified to obtain the simplest ESOP expansion, and then f is expandedjEach of the ESOP product terms of (a) is mapped to a cascade of MPMCT gates and is referred to using the reference numeralThe input variable line of (a) holds the result of the product term. 5 existing circuit lines in the circuit are reused in the step, and no auxiliary circuit line is additionally arranged; the result is a reversible circuit as shown in fig. 4.
The number of quantum bits of the circuit is 5 (the number of quantum bits is the same as the number of circuit lines in the circuit), the quantum cost realized by the NCV quantum circuit is 31, and the quantum cost 'T-depth' realized by the Clifford + T quantum circuit is 12.
The above embodiment is only representative of a number of functions, and the method of the present invention can be applied to many other functions, with the following results:
(1) compared with the results of the existing reversible circuit synthesis method based on ESOP representation model
The reversible circuit synthesis methods in citations [1] and [2] are the latest reversible circuit synthesis methods based on ESOP representation models with better results, and the 2 citations all use quantum bit numbers and quantum cost realized by NCV quantum circuits of reversible circuits to evaluate the advantages and disadvantages of the reversible circuits. Reversible circuit synthesis of a set of functions using the method of the present invention was performed and compared with the results of the methods of cited documents [1] and [2], as shown in table 1.
The "optimum results of citations [1] and [2] in table 1" are derived from citations [1] and [2], which results are the optimum results of the circuit in these 2 citations in view of quantum cost. In addition, "n" represents the variable number of the function, "m" represents the output function number of the function, "QB" represents the quantum bit number, "QC" represents the quantum cost realized by the NCV quantum circuit of the reversible circuit, and "improvement" represents the percentage of reduction in the quantum bit number and the quantum cost of the result obtained by the method of the present invention with respect to "the optimal result of citations [1] and [2 ].
As can be seen from Table 1, the method of the present invention can obtain fewer quanta for the 18 functions, and the number of quanta is reduced by 41.18% at the maximum (function 5xp1) and 0.77% at the minimum (function e64) compared with the "optimal results of citations [1] and [2 ]. Because some of the 18 functions have linear variables, the method of the present invention is able to identify these linear variables and reuse the circuit lines labeled with these linear variables. Regarding the quantum cost, the method of the present invention reduces the quantum cost with only partial functions, as compared with "the optimal results of cited documents [1] and [2 ]. However, from an average point of view, the method of the present invention reduces the quantum bit number and the quantum cost by 5.96% and 3.17%, respectively, as compared with "the best results of cited documents [1] and [2 ].
Table 1 comparison of the results with analogous methods
Reference is made to the document [1] Parlapalli S P, Vudadha C, Srinivas M.B. an ESOP based cup computing technique for converting circuits, International Conference on converting computing, 2017, pp.127-140.
Reference is made to Bandyopadhyay C.Parekh S.Rahaman H.improved circuit synthesis for explicit-sum-of-product-based reproducible circuits IET Computers & Digital Techniques,2018,12(4): 167-175.
(2) Comparison of results with a reversible circuit synthesis method based on a functional representation model
The reversible circuit synthesis method in citation [3] is the latest reversible circuit synthesis method based on a functional representation model, and evaluates the quality of a reversible circuit using the quantum bit number and a quantum cost metric realized by the Clifford + T quantum circuit of the reversible circuit. Reversible circuit synthesis of a set of functions was performed using the method of the present invention and compared with the results of the method in cited document [3], as shown in table 2. In table 2, "QB" represents the quantum bit number, and "T-depth" is the quantum cost metric achieved by the Clifford + T quantum circuit of the reversible circuit.
As can be seen from table 2, in the 63 functions, compared with the results of the method in cited document [3], there are 54 functions, the method of the present invention can obtain the same quantum bit number, and there are 5 functions, the method of the present invention can obtain fewer quantum bits, only 4 functions, and the method of the present invention can obtain more quantum bits. From the quantum cost measure "T-depth", the method of the invention can obtain lower quantum cost for all 63 functions. From the overall average perspective, the method of the invention can obtain the quantum digit number basically equivalent to that of the method in the citation document [3], but reduces the quantum cost by 2 orders of magnitude.
Table 2 comparison of the results with different classes of methods
Reference is made to Zulehner A, Wille R.one-pass Design of reversible Circuits, combining and synthesizing for reversible Circuits, IEEE Transactions on Computer-aid Design of Integrated Circuits and Systems,2018,37(5): 996-1008.
By adopting the technical scheme disclosed by the invention, the following beneficial effects are obtained:
for a function F with n variables and m outputs, the quantum bit number of the circuit obtained by the existing reversible circuit synthesis method based on the ESOP representation model is n + m, and the quantum bit number of the circuit obtained by the reversible circuit synthesis method based on the function representation model follows the lower bound and the upper bound of the quantum bit number: max (n, m) and n + m. The quantum digit of the circuit obtained by the method described in the invention is n + m-FLCompared with the existing reversible circuit synthesis method based on ESOP representation model, the quantum bit number of the circuit is reduced by FLL. In addition, | FLMin (n, m), the quantum digit of the circuit obtained by the method is max (n, m); in the worst case, | FLThe quantum digit of the circuit obtained by the method is n + m, and the lower bound and the upper bound of the quantum digit are also followed: max (n, m) and n + m.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and improvements can be made without departing from the principle of the present invention, and such modifications and improvements should also be considered within the scope of the present invention.
Claims (1)
1. A novel reversible circuit synthesis method based on ESOP representation model is characterized by comprising the following steps:
s1, representing multiple output Boolean by using shared function decision diagram SFDDFunction F: {0,1}n→{0,1}mWhere n input variables form the set X ═ { X ═ X1,x2,…,xnH, m output function constituent sets F ═ F1,f2,…,fm}; identifying each output function F of the multi-output Boolean function F according to the drawn SFDD graph G and the linear variable identification rulejLinear variable x ofiTo obtain a set of output functionsAnd linear variable setAnd FLVAnd XLVThe relationship betweenNamely XLVIs at least FLVLinear variable of one of the functions, similarly, FLVContains at least one linear variable and the variable belongs to XLV;
The linear variable identification rule is specifically as follows:
given an SFDD graph G representing a multiple-output Boolean function F, an output function F is represented in the graph GjIs assumed by its root nodeTo node vkOf (2) aDominates the active pathway for the longest, andto vkIf there is no path between other nodes in the level of graph G, then the path is not presentUsing the variable xiLabeled node viWhen it is a linear node, xiIs fjA linear variable of (d);
for multiple output function F ═ F1,f2,…,fmH, each output function fjAll can use one FDD representation, assuming the representation fjThe root node of FDD is recorded asIn the SFDD graph G, the root nodeAnd is composed ofReachable nodes and corresponding edges constitute the representation function fjThe FDD of (1); the SFDD graph G is divided into n +1 layers, node vkThe layer uses lev (v)k) Denotes, lev (v)k) Not less than 1; in the SFDD graph G, each node is labeled with one variable of the function F except for the terminal nodes at level n +1 which represent either constant 0 or constant 1, assuming that node vkUsing variable xiMarking, then node vkThe layers located in graph G also use lev (x)i) Denotes, lev (v)k)=lev(xi) (ii) a If node vkIs node vjOne of the sub-nodes of (1), lev (v)k)>lev(vj) And node vjAnd node vkThere is a directed edge between e (v) and usej,vk) Represents; for root nodeAnd one is composed ofReachable node vkAnd a set of nodesIf it isIs thatThe sub-nodes of (a) are,is thatI is more than or equal to 1 and less than or equal to l-1, vkIs thatThe child node of (1), then the root nodeAnd vkAnd an edgeAndform a strip ofTo vkThe path of (1) is recorded asIf it is notIs thatThe 0-branch sub-node of (1),is that0 branch sub-node 1 is more than or equal to i and less than or equal to l-1, vkIs that0 branch of, thenIs an active pathway; if it is notOr alsoTo vkIs the only path ofIs the dominant active pathway; if the path is to beElongation to vkA sub-node v oftNew path afterIs not an active pathway, or is notTo vtIs the only path ofIs the longest dominant active pathway; for a node viIf its 1-branch child node is a terminal node representing constant 1And said node viTo the terminal nodeIf the edge of (1) is not a complementary edge, it is called viIs a linear node;
s2, using the weighted bipartite graph to combine the linear variablesIs assigned to at most a function setTo obtain an ordered function setWith ordered sets of variables|FA|=|XA|,FAAnd XAThere is a one-to-one mapping relationship between them;
s3, using SFDD graph G representing function F, the ordered function set obtained in step S2Is aboutChecking independence of intermediate variables to determine ordered function setsMiddle functionThe order in which they are combined is,obtaining an updated ordered function setAnd updated set of ordered linear variables|FL|=|XL|,FLAnd XLThe relationship between them is still one-to-one mapping;
s4, according to the ordered function set obtained in the step S3And ordered set of linear variablesBased on an MPMCT gate library, an ESOP representation model comprehensive reversible circuit is adopted;
step S2 specifically includes:
combining the SFDD graph G representing the multiple-output Boolean function F, the set F obtained in step S1LV、XLVAnd relationshipsDrawing a bipartite graph, wherein the set XLVOf (1)And set FLVFunction of (1)Are all vertices in the bipartite graph; if it is notIs thatLinear variable of (2), top of bipartite graphDotAnd vertexA side is arranged between the two edges; if it is notIs marked withRoot node of FDDThe weight of the edge is n, otherwise the weight isObtaining an ordered function set by using a Hungarian algorithm calculationWith ordered sets of variables|FA|=|XA|;
Step S3 specifically includes:
from the SFDD graph G representing the function F, first according toAscending pair of FAFunction of (1) and XAIf there are multiple root nodesAt the same level in graph G, according toIn descending order of FACorresponding function in (1) and XAThe respective variable in (1) is ordered;
order setCollectionFor each oneCarrying out global independence check; i.e. if setThe function of the representation is independent ofThen orderWherein' \\ is a set difference operation;
for each oneLocal independence check was performed: if setThe function of the representation is independent ofRespectively to be provided withAndappending to ordered set FbAnd XbAnd at the tail of Up to FAAll of the functions in (1) depend on XAOne variable of (1);
for each oneMake an association with XAConditional independence check of medium variables: if in ordered set FAIs located inA function afterSatisfy the requirement ofDepend onAnd isThen order
Let Fb=Fb∪FA,Xb=Xb∪XA;FL=Fd∪Fb,XL=Xd∪XbObtaining an ordered set FLAnd XL;
In step S4, an ESOP representation model synthesis reversible circuit is used:
adding n circuit lines, and using input variable set X of multiple output Boolean function F as { X }1,x2,…,xnMarking variables in the circuit lines, and calling the n circuit lines as input variable lines;
② ifThen the set F \ F is first alignedLESOP simplification is carried out on the expressed function to obtain the simplest ESOP expansion, and then | F \ F is addedLI auxiliary circuit lines map the product term in ESOP expansion to the cascade of MPMCT gates and use the I F \ F respectivelyLThe | F \ F is stored by | auxiliary circuit lineLThe calculation results of | functions;
③ ordered function setEach function inFirstly, ESOP simplification is carried out to obtain the simplest ESOP expansion, and thenEach of the ESOP product terms of (a) is mapped to a cascade of MPMCT gates and is referred to using the reference numeralThe input variable line of (2) stores the calculation result of the product term, and finally the label is usedIs transported byIn-variable line save functionThe calculation result of (2).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110189441.0A CN112949862B (en) | 2021-02-19 | 2021-02-19 | Novel reversible circuit synthesis method based on ESOP (extreme likelihood operation) representation model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110189441.0A CN112949862B (en) | 2021-02-19 | 2021-02-19 | Novel reversible circuit synthesis method based on ESOP (extreme likelihood operation) representation model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112949862A CN112949862A (en) | 2021-06-11 |
CN112949862B true CN112949862B (en) | 2022-07-05 |
Family
ID=76244289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110189441.0A Active CN112949862B (en) | 2021-02-19 | 2021-02-19 | Novel reversible circuit synthesis method based on ESOP (extreme likelihood operation) representation model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112949862B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624380A (en) * | 2012-04-13 | 2012-08-01 | 南通大学 | Three-position reversible ternary-binary logic converter |
CN105447241A (en) * | 2015-11-16 | 2016-03-30 | 浙江万里学院 | ESOP minimization method for logic function |
WO2017087347A1 (en) * | 2015-11-20 | 2017-05-26 | Microsoft Technology Licensing, Llc | Verified compilation of reversible circuits |
CN108920837A (en) * | 2018-07-04 | 2018-11-30 | 卜登立 | The reciprocal circuit integrated approach of common factor between ESOP product term is extracted using shared ZMODD |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070110229A1 (en) * | 2004-02-25 | 2007-05-17 | Ternarylogic, Llc | Ternary and Multi-Value Digital Signal Scramblers, Descramblers and Sequence of Generators |
-
2021
- 2021-02-19 CN CN202110189441.0A patent/CN112949862B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102624380A (en) * | 2012-04-13 | 2012-08-01 | 南通大学 | Three-position reversible ternary-binary logic converter |
CN105447241A (en) * | 2015-11-16 | 2016-03-30 | 浙江万里学院 | ESOP minimization method for logic function |
WO2017087347A1 (en) * | 2015-11-20 | 2017-05-26 | Microsoft Technology Licensing, Llc | Verified compilation of reversible circuits |
CN108920837A (en) * | 2018-07-04 | 2018-11-30 | 卜登立 | The reciprocal circuit integrated approach of common factor between ESOP product term is extracted using shared ZMODD |
Non-Patent Citations (1)
Title |
---|
基于布尔表达式图的可逆电路综合方法;卜登立;《电子学报》;20200331;第48卷(第3期);第494-502页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112949862A (en) | 2021-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Eiselt et al. | Integer programming and network models | |
Sonthalia et al. | Tree! i am no tree! i am a low dimensional hyperbolic embedding | |
Dumas et al. | Optimizing the schedule for a fixed vehicle path with convex inconvenience costs | |
CN111027702B (en) | Method and device for realizing quantum circuit replacement, storage medium and electronic device | |
CN112068798B (en) | Method and device for realizing importance ordering of network nodes | |
Orloff | Routing a fleet of M vehicles to/from a central facility | |
Powell et al. | Adaptive labeling algorithms for the dynamic assignment problem | |
CN109951392B (en) | Intelligent routing method for medium and large networks based on deep learning | |
Wasson et al. | Hardware based projection onto the parity polytope and probability simplex | |
CN113763700A (en) | Information processing method, information processing device, computer equipment and storage medium | |
CN111310068A (en) | Social network node classification method based on dynamic graph | |
Brennen et al. | Efficient circuits for exact-universal computations with qudits | |
CN113051408B (en) | Sparse knowledge graph reasoning method based on information enhancement | |
CN112949862B (en) | Novel reversible circuit synthesis method based on ESOP (extreme likelihood operation) representation model | |
Chen et al. | Optimal capacity modification for many-to-one matching problems | |
US20170372214A1 (en) | Updates to a prediction model using statistical analysis groups | |
CN108288114B (en) | Emergency material scheduling method based on primitive dual theory | |
CN113609806B (en) | Quantum circuit program general transformation method combining sub-graph isomorphism | |
He et al. | Weighted rough graph and its application | |
Ramanna et al. | Generalized conflict and resolution model with approximation spaces | |
CN114692495A (en) | Efficient complex system reliability evaluation method based on reliability block diagram | |
CN113849947A (en) | Temporal network motif computing method and system supporting incremental updating | |
CN106547876A (en) | A kind of community discovery processing method propagated based on degree of membership label and system | |
CN114692403A (en) | Binary decision diagram-based efficient complex system reliability evaluation method | |
Chen et al. | Genus characterizes the complexity of certain graph problems: Some tight results |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |