P System Computational Model as Framework for Hybrid

P System Computational Model as Framework for Hybrid (Membrane-Quantum) Computations Yurii Rogozhin, Artiom Alhazov, Lyudmila Burtseva, Svetlana Cojocaru, Alexandru Colesnicov, Ludmila Malahov Institute of Mathematics and Computer Science, Academy of Sciences of Moldova {artiom, burtseva, Svetlana. Cojocaru, kae, mal}@math. md The authors acknowledge project STCU 5384 by the Science and Technology Center in Ukraine

Overview • A hybrid model of high performance computations: • The P system framework with additional quantum functionalities • The model is supposed to benefit from both biomolecular and quantum paradigms – and overcome some of their inherent limitations • Extended interface between a membrane system and quantum sub-systems • Example: the problem of finding the longest common subsequence for a set of strings
![History of P systems-based quantum-hybrid computational models 1 st hybrid model [Leporati 2007]: QUREM History of P systems-based quantum-hybrid computational models 1 st hybrid model [Leporati 2007]: QUREM](http://slidetodoc.com/presentation_image_h2/2b334152e929832fc93b5ac3e49ea2c3/image-3.jpg)
History of P systems-based quantum-hybrid computational models 1 st hybrid model [Leporati 2007]: QUREM • “Quantum Unit Rules & Energy assigned to Membranes” • P system: objects represented as pure states of a quantum system • Rules written as quantum operators Our edition of hybrid system: • Classical P system with possibility to start quantum computations inside membranes, and get results • 1 st proposal: some membranes are quantum; quantum device is on when information enters membrane • Current: any membrane can perform quantum computations that start as special objects appear

Construction • Macro level: P system, not restricted to a specific variant, e. g. , for different problems we tried – transitional P systems with inhibitors – tissue P systems with symport/antiport – P systems with active membranes • Micro level: standard quantum device • Interface: objects of P system that present initial states of quantum registers and results of quantum computations

Interface • In any membrane, the appearance of some specific objects (quantum data, or quantum triggers) starts a quantum computation • The said data are available as initial state of the quantum registers • Termination of the quantum computation produces other specific objects (quantum results) in the membrane • From the P system point of view, the quantum computation is a step, or several steps, of the membrane computation

Restrictions • During quantum computations in a membrane, application of P system rules to this membrane should be prohibited • Some aspects of this need further research and discussion • E. g, division of a membrane during a quantum computation would contradict the no-cloning theorem

P model: active membranes • A P system with active membranes without nonelementary division of initial degree d 1 is a tuple =(O, H, , w 1, . . . , wd, R), where • O is a non-empty finite alphabet of objects • H is a finite set of membrane labels • is a membrane structure of d membranes labeled (not necessarily injectively) by elements of H • wi, for i H mentioned in , are strings over O, describing the initial multisets of objects placed in the regions of • R is a finite set of rules • Each membrane has polarization E={0, 1, 2}.
![Rules • • • Object evolution [ a u ]he Send-in communication a[ ]he Rules • • • Object evolution [ a u ]he Send-in communication a[ ]he](http://slidetodoc.com/presentation_image_h2/2b334152e929832fc93b5ac3e49ea2c3/image-8.jpg)
Rules • • • Object evolution [ a u ]he Send-in communication a[ ]he [ b ]he’ Send-out communication [ a ]he [ ]he’ b Dissolution [ a ]he b Elementary division [ a ]he [ b ]he’ [ c ]he’’ Objects a, b, c O; multiset u O*; membrane label h H; polarizations e, e’ E • Elementary division rules suppose the membrane does not contain other membranes

Configuration and evolution • Configuration of a P system: current membrane structure, polarizations, multisets located in regions • One step - one rule: each object and membrane can be subject to at most one rule per step, but. . . • any number of evolution rules can be applied in parallel in each membrane to different objects • Application of rules is maximally parallel • Halt: when no rules are applicable at some step • Input: input sub-alphabet O and input region i 0 are included in the tuple specifying the P system • Result: dedicated region(s) contents at halting

Quantum device • Qubits: organized in quantum registers • Step 1: non-quantum (classical) init. of qubits • Step 2: quantum transformation – qubits are not observable • Step 3: non-quantum (classical) measurement producing the observable result • After the initialization and after the measurement each qubit is in one of base states |0 or |1 • During quantum computation a qubit may be in the superposition of both states or even entangled with other qubits • Initial data and result: regarded as N in binary • Quantum transformation is linear and reversible

Notations • Arguments & results: in different quantum registers • Ancillary qubits: not entangled with the argument and the result after the computation • Device implements an integer function f: [0, 2 N-1] [0, 2 M-1] • • Vf is a quantum implementation of function f Vf = Vf-1 is the inverse transformation We use R ancillary qubits |w Register |z is initialized by quantum data appeared in the membrane starting the quantum computation • We use input objects Ik, b, where b=0, 1 is a binary value of the kth qubit in |z. |z is the parameter of computation

Diagram of quantum computation F • Initialization and measurement: not shown • indices denote the qubit-size of registers • CM are M C-Not gates with control qubits from |f(x) • F=F-1: FF(|x |y )=|x |y f(x) = |x |y • before F, quantum registers may be additionally transformed

Hybrid model • Hybrid system – a tuple =( , T, T’, HQ, QN, QM, Inp, Outp, t, qh 1, …, qhm) • is a P system • HQ={h 1, …, hm}-a subset of membrane labels in used for quantum computations; • qh 1, …, qhm-quantum sub-systems associated to the corresponding membranes from HQ • T-trigger, T’-signal on obtaining the quantum result; • QN, QM, Inp, Outp, t: functions over HQ specifying the interaction between and qhj, 1 j m: input/output sizes, input/output sub-alphabets, timing • We focus on communication and sync. between the bio-system and the quantum sub-systems

Hybrid model - II • Simple: assume running time of quantum sub-systems of the same type is the same. General: • A timing function t: HQ N: the quantum computation in a sub-system of type qhj takes t(hj) membrane steps • Calculating timing of quantum calculation w. r. t. timing of membrane calculation - open general question • First rough estimation: 3 steps of membrane computation (init, transform, measure) • Input/output size for quantum systems: QN, QM: HQ N (qubits/bits) • To fully define behavior of : trigger object T • Work of a quantum sub-system starts whenever T appears in the corresponding membrane • qhj is a type of a quantum sub-system: multiple membranes labeled hj: same functionality quantum sub-systems

Hybrid model - III • Quantum state: init by objects in Inp(hj)={Ok, hj; b|1 k QN(hj), b {0, 1}} {T} • Inp: HQ 2 O: describes input sub-alphabet q. s. -s. type • Meaning of object Ok, hj, b: init bit k of input by value b • If bit k is not initialized, 0 is default • If multiple objects initialize bit k, then the k-th qubit is set to the weighted superposition of both states • Technique is restricted: cannot produce entangled states • If some objects appear in a quantum membrane without the trigger, they wait until the trigger appears • Output of quantum sub-systems: returned to the P system as objects from Outp(hj)={Rk, hj, b|1 k QM(hj), b {0, 1}} {T’}, • Meaning of object Rk, hj, b: output bit k has value b • We often denote 1 -bit output by yes and no

Hybrid model - IV • The result of a quantum sub-system is produced in the membrane together with object T’ • 2 possibilities to sync. quantum&membrane levels • Use a timing function and to wait for the quantum result organizing the corresponding delay in membrane calculations, or • wait for the resulting objects, or the trigger T’ • For completeness, our model provides both possibilities – The topic needs further investigations • Wrapper membrane discussion skipped

Initialization of the Quantum Device • Measurement op. is embedded in the quantum device – used after computation, so we can apply it to our qubits – Measurement can be used before the computation • collapsing qubits in the basis states – Measurement is irreversible it is a classical operation – Before the quantum computation starts • Each qubit is to be set in one of basis states |0 1 or |1 1 • Setting qubits in initial states • E. g, to set in state |0 , check the state; invert if |1 – This is not a quantum transformation • Usually, all qubits are initially set to |0 1 – (Several quantum algorithms use different initial values) • In our case, use non-quantum tools to prepare the state |x |y |z |w =|0 N|0 M|z 0 K|0 R • Here z 0 is the number that appeared in the quantum membrane and initiated the process • Classical (non-quantum) initialization ends

Superposition • Possible to initialize in non-base states (s|0 +t|1 )/ (s 2+t 2) • Made by an appropriate one-qubit quantum transformation performed before other computations • E. g, many quantum algorithms suppose that all qubits from 1 1 register |x are transformed by one-qubit Hadamard 1 -1 transformation H 2 • If |x was set to |0 then each qubit of |x is set in state (|0 +|1 )/ 2 ______ • As the result, register |x gets the state |x =( 0 i 2^N |i )/ 2 N corresponding to a uniform superposition of all possible values of argument x • Application of the transformation Vf will then produce all possible values of f(x) (quantum parallelism)

Pre-configuration (compilation) • Configuration of quantum device depends on parameters of a specific problem • Implementation of such dependence is sometimes referred as compilation. • It is possible to delegate all such operation to – – the membrane level, inside quantum device, preparatory stage for the membrane level, an intermediate level between membrane and quantum levels; the initialization of quantum device will also be a part of this level. • It is logical as the initialization should be performed at the appearance of trigger T • We aim these problems for further research

Finding the Longest Common Subsequence • V={a 1, …, ak} - alphabet; • Strings u 1, …, un V+. • Without restricting generality, assume the first string u 1 is not longer than any other • We should find a string u 0 with: • u 0 is a subsequence of each ui, 1 i n; • u 0 is the longest string with this property • Ex: thisisatest, testing tsitest

Solution outline • Use membrane division consider the possible subsequences of u 1 • Quantum sub-system verify if the candidate is a subsequence of all other input strings • Organize delay consider the candidate strings in the longest-to-shortest order • If a solution is found in a membrane, send a signal to the skin, replicate it and send into membranes verifying the candidates to stop • Delay: a compromise – not to slow down the overall system too much – prevent most of unnecessary computations for shorter strings after a solution is found

Notations • n-number of strings • ni-length of string ui • Input: ={aj, l, 0, 0|1 j n 1, 1 l k} – meaning: u 1[j]=al • {bi, j, l, 0|2 i n, 1 j ni, 1 l k} – meaning: ui[j]=al, i 2 • Numbers of bits needed to represent: • K= log 2 k - one symbol of V • N= log 2 (n 1+1) - a number 0 … n 1

Hybrid construction =( , T, T’, HQ={2}; QN, QM, Inp, Outp, t, q 2), where QN(2)=N+K 1 j n nj, QM(2)=1, t(2)=3, Outp(2)={yes, no, T’}, Inp(2)={T} {Ik, b|0 k N+K 1 t n nt, 0 b 1}, q 2 is a quantum system checking whether the first string is a subsequence of other strings, and • =(O, , =[ [ ]02[ ]03 ]01, w 2, w 3, R, 2) is a P system with active membranes • O=Inp(2) {dj, sj, p’ 1, p’ 0, pt, cj, t, c’t, aj, l, s, t, bi, j, l, s, ej, l, o, T’, yes’, no} (I skip the indices and full rule listing) • w 1= , w 2=d 0 c 0, 0, w 3=s 0 • • •

Rule groups • • • i Generation Counting Building subsequences Input for quantum sub-systems Stopping Illustration of indices I, j, l, s, t: string ui has symbol al in position j, position s is being considered, and t symbols have been chosen for the candidate subsequence

Generation • Membrane 2 is divided n 1 times • Each division: choice whether the subsequent symbol of the first string is selected for the candidate common subsequence • Then the polarization is set to 0

Counting • Subscript t counts the number of selected (by setting the polarization to 1) symbols, out of j symbols of the first string considered • Remember the size of a chosen subsequence and initialize the delay counter • Delay the computation for the number of steps equal to 5 times the number of not selected symbols • So, the candidate strings are considered the longest to the shortest, until a common subsequence is found • These rules can be disabled switching polarization to 2 • Set the polarization to 1. In the next step, the input will be prepared for the quantum sub-system • Next step after having set the polarization to 1, it is again reset to 0 (simultaneously with initializing the quantum sub-system)

Building subsequences • In the group aj, l, s, t of objects, subscript s ranges over the positions of the first string, while subscript t keeps track of the number of symbols chosen • j=s --> j-th symbol of the first string is chosen as the t-th symbol of the candidate subsequence • OR the symbol is not chosen; the object representing it is erased • Wait until the rest of the subsequence is chosen – These rules also apply to the input representing the other strings, synchronizing them

Input for the quantum sub-systems • Transforming objects bi, j, l, n 1+1 and ct into multiple objects of type Ik, b and ej, l, c’t, T • A lot of bit arithmetics, splitting integers l and t+1 into bits • The total number of input objects passed to a quantum sub-system (besides the trigger T) is N+K 1 j n nj

Stopping • Membrane 3: make 2 n 1 copies of object sn 1 • Wait to make sure that the computation is not stopped – (a longer string not found yet) • The trigger T’ produced together with yes is never used • The polarization is set to 1 • The object is sent out storing the length of the found common string • One object ct enters membrane labeled 3, switching its polarization to make sure this is done once • The object is primed again, dissolving membrane labeled 3, releasing objects sn 1 into the skin • Objects sn 1 enter all membranes labeled 2, with polarization 0, stopping the computations there by setting the polarization to 2 • Object ct is sent out to the environment, representing the length of the longest common subsequence

Result • The system described above solves the longest common subsequence problem • The length of this subsequence is sent out, stored in one object, while all longest subsequences (there may be a large number of them) are represented in the elementary membranes with polarization 1 • It is worth noticing that, similarly to the approach used in [CSJMOL], the construction is made in such a way that all input data for the quantum subsystem is produced simultaneously and all qubits are initialized • the construction does not require a trigger to synchronize the input; we have included it in rule I 2 just to comply with the presented model

Quantum sub-system • • • Checking if a string is a subsequence of other(s) The quantum solution is known, e. g, P. Mateus, Y. Omar: Quantum Pattern Matching, ar. Xiv: quant-ph/0508237 v 1 (2005) The algorithm is a modification of Grover search: – a query operator marks the state encoding the element being searched by changing its phase; – then amplifies the amplitude of the marked state; – the state can be detected with non negligible probability by repeating this process several times • We do not focus on further details here

Conclusion • Continue to present a hybrid computational model that combines in the framework of membrane computing elements of quantum approach • Focus in this paper: communication between membrane and quantum levels of the system • Model provides mutual accepting of input/output by computation models of different nature and even different (macro/micro) levels • P system formalism as the framework of hybrid model provides conversion between multisets of objects and quantum registers contents • Quantum computation ends with measurement, which prepare the quantum registers content for uploading back in the P system

Further research • Distribution of operations between membrane and quantum levels • Should we have an intermediate level? • Relative timing of computations in different levels • Compilation and other pre-computation processes, etc.

Last minute note • Suppose we have two computational models, B and Q, and they characterize computational classes C and D, respectively • Imagine a hybrid system, whether the system of type B may “call” subsystems of type Q. Moreover, assume initially that: – system of type B never calls subsystems of type Q in parallel, – subsystem of type Q returns the result in one step of the system of type B, – the result of subsystem Q can be efficiently processed by the system of type B. • Then it is reasonable to expect that the power of such hybrid system is exactly CD, i. e. , equivalent to the power of devices characterizing C using as oracles the devices characterizing D, – in the sense well-known from theory of Turing machines

Last minute note - II • Furthermore, since we are interested in such hybrid systems that the system of type B produces the answer in polynomial number of steps, it is easy to see that “in one step" in condition 2 can be relaxed to “in a polynomially bounded number of steps". Condition 3 is satised by the design of our hybrid systems. Dropping the first condition may potentially increase the power of the hybrid systems, and we have been using this possibility in our research • P systems with active membranes without non-elementary membrane division have recently been shown to characterize PPP complexity class, solutions of NP-complete problems being the most popular test cases. With nonelementary membrane division, P systems with active membranes are known to characterize PSPACE complexity class

Last minute note - III • Most research on solving intractable computational problems by quantum systems revolves around NPcomplete problems, employing techniques like Grover search. It is worth noting that the number of quantum steps needed to solve the problem is of the order of a square root of the search space, which is still exponential • Alternatively, membrane replication in the main system may lead to calling an exponential number of quantum subsystems in parallel. There has been research on solving even more dicult problems by quantum systems, i. e. , #Pcomplete problems • We are interested in a hybrid solution of a problem in NPNP, such that one “NP" comes from the power of a biological system, and the other “NP" comes from the power of the quantum system
- Slides: 36