Quantum-effective exact multiple patterns matching algorithms for biological sequences

This article presents efficient quantum solutions for exact multiple pattern matching to process the biological sequences. The classical solution takes Ο(mN) time for matching m patterns over N sized text database. The quantum search mechanism is a core for pattern matching, as this reduces time complexity and achieves computational speedup. Few quantum methods are available for multiple pattern matching, which executes search oracle for each pattern in successive iterations. Such solutions are likely acceptable because of classical equivalent quantum designs. However, these methods are constrained with the inclusion of multiplicative factor m in their complexities. An optimal quantum design is to execute multiple search oracle in parallel on the quantum processing unit with a single-core that completely removes the multiplicative factor m, however, this method is impractical to design. We have no effective quantum solutions to process multiple patterns at present. Therefore, we propose quantum algorithms using quantum processing unit with C quantum cores working on shared quantum memory. This quantum parallel design would be effective for searching all t exact occurrences of each pattern. To our knowledge, no attempts have been made to design multiple pattern matching algorithms on quantum multicore processor. Thus, some quantum remarkable exact single pattern matching algorithms are enhanced here with their equivalent versions, namely enhanced quantum memory processing based exact algorithm and enhanced quantum-based combined exact algorithm for multiple pattern matching. Our quantum solutions find all t exact occurrences of each pattern inside the biological sequence in \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} }{}$O((m/C)\sqrt{N})$\end{document}O((m/C)N) and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} }{}$O((m/C)\sqrt{t})$\end{document}O((m/C)t) time complexities. This article shows the hybrid simulation of quantum algorithms to validate quantum solutions. Our theoretical–experimental results justify the significant improvements that these algorithms outperform over the existing classical solutions and are proven effective in quantum counterparts.

in their complexities. An optimal quantum design is to execute multiple search oracle in parallel on the quantum processing unit with a single-core that completely removes the multiplicative factor m, however, this method is impractical to design. We have no effective quantum solutions to process multiple patterns at present. Therefore, we propose quantum algorithms using quantum processing unit with C quantum cores working on shared quantum memory. This quantum parallel design would be effective for searching all t exact occurrences of each pattern. To our knowledge, no attempts have been made to design multiple pattern matching algorithms on quantum multicore processor. Thus, some quantum remarkable exact single pattern matching algorithms are enhanced here with their equivalent versions, namely enhanced quantum memory processing based exact algorithm and enhanced quantum-based combined exact algorithm for multiple pattern matching. Our quantum solutions find all t exact occurrences of each pattern inside the biological sequence in Oððm=CÞ ffiffiffiffi N p Þ and Oððm=CÞ ffiffi t p Þ time complexities. This article shows the hybrid simulation of quantum algorithms to validate quantum solutions. Our theoretical-experimental results justify the significant improvements that these algorithms outperform over the existing classical solutions and are proven effective in quantum counterparts.

INTRODUCTION
The exact multiple pattern matching problem is to find a bijective mapping for m patterns within the text sequence database. Searching for the multiple string patterns would be more practical while processing large biological sequence databases (Basel, 2006;Neamatollahi, 2020). The search of multiple nucleotides or amino acid patterns is necessary within the genome, protein and other biological sequences for a significant purpose (Charalampos, Panagiotis & Konstantinos, 2011). For example, we know that proteogenomics mapping uses proteomics data for DNA or genome annotation. This mapping matches peptide or protein patterns within the proteomics data through the mass spectrometry analysis against the target genome for identifying all locations of genes with coding regions (Choo, 2006;Fredriksson, 2009). Therefore, this processing demands a compatible and efficient solution to search for multiple patterns belonging to P ¼ P 1 ; :; P k ; :; P m f gwith P j j ¼ m. Each pattern P k 1 k m ð Þof independent length M k ¼ 0 to M k À 1 ½ is searched within the large-sized text sequence T of length N ¼ 0 to N À 1 ½ . Both M and N belongs to the alphabet set AE such that N ) M, and t number of pattern occurrences is possible to search between index positions 0 and N − M. Now, specific to biological sequence processing, we usually prefer these m patterns with the same length. Certainly, the set P contains multiple patterns, although, the restricted singleton set P j j ¼ 1 allows us to search P as a single pattern (Charalampos, Panagiotis & Konstantinos, 2011;Faro & Lecroq, 2013;Zhang et al., 2015;Hendrian et al., 2019;Hakak & Kamsin, 2019).
The biological sequence database contains N sized text with exponential factors of gigabytes, terabytes or more. For single pattern matching, the classical solution scans these databases in directional sequence on the main memory (Sheik, Aggarwal & Anindya Poddar, 2004;Kalsi, Peltola & Tarhio, 2008;Rivals, Salmela & Tarhio, 2011). The search time is still bound to O(N) or the complete scan of text to find all the t occurrences of P P j j ¼ 1 ð Þ; however, for the exponentially large value of N, the problem is computationally hard. Thus, we clarify that the time of pattern search increases in proportion to the size of text database, so fast searching techniques are expected. A classical method for the multiple pattern matching takes O(mN) time complexity due to repeated scanning of N sized text database for m patterns (Fredriksson, 2009;Charalampos, Panagiotis & Konstantinos, 2011). In contrast, the quantum search takes O ffiffiffiffi N p À Á time (Nielsen & Chuang, 2010); therefore, a quadratic speedup is possible, and such acceleration is expected in quantum pattern matching . Since the existence of problem, solutions have been suggesting through modified algorithms.
The objective is to suggest effective pattern matching algorithm with better performance than others and to set itself as a benchmark solution. We seek technology-based solutions; therefore, effective quantum-based algorithms are expected for multiple pattern matching. Some quantum-based exact single pattern matching algorithms are enhanced here for their equivalent multiple pattern matching versions (Soni & Rasool, 2021). Our methods remove existing multiple pattern matching constraints (Soni & Malviya, 2021) and realize the effective quantum-based solutions by scanning the text database in the uniform superposition of quantum memory (QMEM) (Giovannetti, Lloyd & Maccone, 2008;Nielsen & Chuang, 2010). Therefore, based on the advantage of quantum processing unit (QPU) having C quantum cores 1 c C ð Þ (Metodi, 2011;Lin et al., 2013;Fu et al., 2016;Britt, 2017;Brandl, 2017), we propose our algorithms to match m patterns using the quantum-exact match (QEM) circuit (Sena Oliveira, Benicio Melo de Sousa & Viana Ramos, 2007;Soni & Rasool, 2021) and quantum Grover's search operator (GSO) mechanism (Nielsen & Chuang, 2010;Chakrabarty, Khan & Singh, 2017).

Significance of processing biological sequences
For processing the biological sequence databases, exact matches are always preferred with accurate matching outcomes. The nucleotide and amino acid patterns are used to locate within genome, protein and other biological sequences for different purposes (Jiang, Zhang & Zhang, 2013;Singh, 2015). The size of DNA or RNA alphabet set is AE j j ¼ 4, and coded adjacent triplet of nucleotide characters which forms amino acid with the set size AE j j ¼ 20. The biological sequence databases are excessively large, so multiple string patterns should be effectively processed. Multiple pattern matching aims to identify all locations of m patterns within the sequence databases in a single scan. The searching of DNA pattern within nucleotide sequence helps us to identify, compare and align the sequences as well as to analyze mutations (Faro & Lecroq, 2009;Tahir, Sardaraz & Ikram, 2017;Raja & Srinivasulu Reddy, 2019). However, different nucleotides can code to similar proteins, so protein databases are searched for similarity checks.

Motivation and contribution of work
The quantum machine can achieve computational speedups because of implicit parallelism. It needs O(1), i.e. constant execution step to realize an exponential number of operations (Nielsen & Chuang, 2010). We assume a problem of pattern matching as hard when the size of text database N ¼ 2 n is excessively large as gigabytes (2 30 ), terabytes (2 40 ) or more (Kalsi, Peltola & Tarhio, 2008;Neamatollahi, 2020). So, instead of classical, the quantum pattern search takes reduced O ffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi N ¼ 2 n p À Á time (Menon & Chattopadhyay, 2021). An existing quantum pattern matching solution achieved speedups over classical complexities (Ramesh & Vinay, 2003;De Jesus, Aborot & Adorna, 2013;Aborot, 2017;Soni & Rasool, 2021); however, the benchmark methods are constrained to find a single pattern, and the quantum multiple pattern matching is found ineffective because of executing multiple search oracles in successive iterations and it includes multiplicative factor m (Soni & Malviya, 2021).
The optimal quantum design may execute multiple search oracle in parallel on QPU with single-core to remove completely such factor m, however, this is impractical to design. We seek exact solutions of pattern matching with more applicability in computational biology. Thus, the available quantum benchmark algorithms QPBE and QBCE are enhanced here, with the names, enhanced QMEM processing-based exact algorithm (EnQPBEA-MPM) and enhanced quantum-based combined exact algorithm (EnQBCEA-MPM) for multiple pattern matching. The design of algorithms is based on processing effectiveness of QPU having C quantum cores and each core shares the text T on QMEM. So, to find all the t exact occurrences of each pattern, the search time complexities of the proposed algorithms are O m=C ð Þ ffiffiffiffi N p À Á and O m=C ð Þ ffiffi t p À Á . Our motivation is to search for all exact occurrences of m patterns either by direct use of effective quantum processing framework over original text sequence database T in O ffiffiffiffi N p À Á queries or by transforming approximate filtering outcome into exactness over reduced search space in O ffiffi t p À Á queries. The algorithms are based inherently on Grover's search operator (GSO). We use QMEM to explore the text of size N ¼ 2 n such that, the entire text search space is accessed in parallel in Ο(1) time, but memory word access needs O log 2 N À Á steps (Park & Petruccione, 2019;Matteo, 2020;. A new quantum circuit of Ο(1) time is proposed for exact match between pattern P and substring of T of size M, whereas classical comparison takes Ο(M) time (Sena Oliveira, Benicio Melo de Sousa & Viana Ramos, 2007;De Jesus, Aborot & Adorna, 2013;Soni & Rasool, 2021). Thus, we initiate quantum-effective algorithms with a context of exponential increase in biological text size. The proposed work of this article is organized as per Fig. 1, and we derive our results by giving the proofs of Theorem 1 and Theorem 2 in the proposed methods section. This article presents our main contribution as the effective quantum design of multiple patterns matching algorithms which are proved mathematically along with their simulations. We outline our work below to achieve objectives in a streamlined manner throughout this article: We realize the effective quantum processing framework by using QPU with C quantum cores which access quantum processing circuit of equivalent QMEM procedure. It achieves the quantum-based computational and processing speedups. We also proposed, a new constant time, quantum exact match (QEM) circuit which is utilized implicitly under GSO iterations. We justify our proposed quantum algorithms using complexities analysis, and specific quantum proving techniques such as probabilistic, truthness and correctness proofs. The future works of Soni & Rasool (2021) (Soni & Rasool, 2021). A factor m=C ð Þ is proved negligible for a small arbitrary constant value of m and constant value of C as the QPU with C quantum cores utilizing their own set of quantum registers for searching m m=C ð Þ is included explicitly in the time complexities for considering m ) C ð Þas the worst case.
The quantum operations of proposed algorithms are proved equivalent to their quantum circuits. These circuits are the actual realization of quantum solutions. Quantum query, time and storage complexities of proposed algorithms justify their effectiveness. Based on several complexity analysis factors, we prove our proposed solutions as efficient to find exact patterns, and these remove the existing multiple pattern matching constraint (Soni & Malviya, 2021) as designs of QEMP and QAMP cannot exclude multiplicative factor m.
Our proposed quantum algorithms are simulated for validation through the quantum exact simulation toolkit (QuEST). Also, we proposed a quantum circuit implementation of QMEM through algebraic normal form (ANF). The intentions are not to analyze the efficiency of the simulation due to classical machine restrictions; therefore, we do the hybrid implementation. We validate our results using QuEST simulation by assuming that t number of search solutions, either unique or multiple solution, are already known. To realize the case in which the value of t is unknown, we use quantum counting (QC) additionally to validate the search results of our proposed EnQPBEA-MPM and EnQBCEA-MPM algorithms.
We suggest several applications of EnQPBEA-MPM and EnQBCEA-MPM for processing biological sequences. Such applicability of these algorithms is specified with respect to significant characteristics and performance restrictions.
The abbreviated names used throughout the text are available in Table A1 (Appendix A). The nomenclature used in this article is a prerequisite for further reading purpose, therefore refer to Table B1 (Appendix B). The individual correctness proofs of algorithms EnQPBEA-MPM and EnQBCEA-MPM are separately included in Appendix C and Appendix D. A correctness proof shows algorithmic trace steps which expands the applied quantum operations.

RELATED WORK Prior work and the important findings
In classical findings, earlier exact multiple patterns matching solutions were proposed as the enhanced version of Knuth-Morris-Pratt (KMP) and Boyer-Moore (BM) algorithms. Both these multiple patterns matching solutions are available in Ο(mM) time for pattern pre-processing, and searching takes Ο(mN) Soni & Malviya, 2021 (Fredriksson, 2009;Hendrian et al., 2019). The performance of these algorithms is dependent on AE j j, size of text database T j j ¼ N, number of patterns |P| = m and each pattern P k with varying length M k ¼ 0 to M k À 1 ½ . We noted that the multiplicative factor m is somehow included in time complexities of the classical algorithms. Among all the algorithms, AC has significant applications in biological sequence processing. However, AC requires large memory to store the automata, and hence it is constrained to process large patterns set. This algorithm induces competitive results on the small-sized AE j j and P j j ¼ m with each pattern P k of short length M k (Fredriksson, 2009;Charalampos, Panagiotis & Konstantinos, 2011;Faro & Lecroq, 2013;Zhang et al., 2015;Hendrian et al., 2019;Soni & Malviya, 2021).
There exist few solutions for quantum pattern matching with the advantage of using amplitude amplification of Grover's search (GSO). This method finds search results over N-sized text in O ffiffiffiffi N p À Á steps with high probability, and it is better than the classical linear search time Ο(N) (Lanzogorta & Uhlmann, 2008;Zhou et al., 2013;Coles, 2020). Few single and multiple patterns matching schemes are available in the quantum. Single pattern matching was initiated by Ramesh-Vinay (RV) through the quantum deterministic sampling method; however, the suggested solution needs O ffiffiffiffi ffi M p þ ffiffiffiffi N p À Á time by including the pre-processing and searching (Ramesh & Vinay, 2003;Montanaro, 2017;Menon & Chattopadhyay, 2021 Aborot & Adorna, 2013;Aborot, 2017).
Recent advancements of these algorithms are presented by extending the logic of QEPM or combining the methods of QEPM and QAPM for effective exact matching design. A suggested QMEM processing based exact (QPBE) algorithm is efficient to process large text sequences and this also overcomes the constraint of QEPM method by finding all t exact occurrences of search pattern in O ffiffiffiffiffi Nt p À Á time (Soni & Rasool, 2021). However, the quantum-based combined exact (QBCE) algorithm replaces approximations of the QAPM method with exact matches. This also reduces implicit quantum circuit depth to explore the text during pattern search with logarithmic factors. The desired search time of all t exact occurrence of search pattern is O ffiffi t p À Á (Soni & Rasool, 2021). Both these extended solutions are remarkable; however, no attempt has been made yet to design QPBE and QBCE algorithms to process multiple patterns, which are highly expected in biological sequence processing. As well as, the design of QBCE is not available under the specific processing of QMEM (Soni & Rasool, 2021). For quantum multiple pattern matching, initial solutions were suggested as an extension to QEPM and QAPM methods. Soni & Malviya (2021) suggested multiple pattern algorithms, renamed here as quantum exact multiple pattern (QEMP) algorithm to search for either the single occurrence or all t occurrence of m patterns within time complexities range O m ffiffiffiffi Such algorithms search for the equal and unequal sized patterns in successive iterations, and this includes multiplicative factor m in time complexities. Thus, search solution for multiple pattern algorithms is not effective (Soni & Malviya, 2021).
We are providing the brief description of algorithms QEPM & QAPM, QPBE & QBCE, and QEMP & QAMP from the next subsection onward. As per the reviewed analysis of algorithms, the qubits estimations and algorithmic complexities analysis are also included separately.
Quantum exact pattern matching (QEPM) and quantum approximate pattern matching (QAPM) algorithms The QEPM method is based on the design of an oracle that performs parallel matching under the quantum superposition by aligning comparison window between pattern and text substring to search for a leftmost exact occurrence of pattern. In O ffiffiffiffi N p À Á queries, oracle inverts the leftmost index to report pattern match solution with high probability. The algorithm uses GSO and assures O ffiffiffiffi N p log 2 N À Á search time complexity. Table 1 shows that the method is constrained to find a single t ¼ 1 ð Þ occurrence of pattern, and qubits estimation is the same as quantum search algorithm (De Jesus, Aborot & Adorna, 2013). The algorithm QAPM applies hamming distance (HD) method for approximate text filtering and matching. It cannot find accurate results as HD is an error model and allow replacement at unit cost. A pattern is reported when HD Threshold (precomputed). A QAPM needs more storage as it uses a large number of quantum registers with excessive qubits requirement (Aborot, 2017); see Table 1. However, this searches all occurrences with O ffiffi t p À Á queries. Additional indices may filter using HD, and this increases the size of filtered text, and even HD based verification generates search results with approximation. A filtering needs O tlog 2 N À Á time to find all t filtered indices, then verification matches the t 0 approximate occurrences of pattern through registers comparison, and ffiffi t p calls of GSO, in the O ffiffiffiffi ffi tt 0 p log 2 N À Á and O tlog 2 N À Á time (Aborot, 2017).

QMEM processing based exact (QPBE) and quantum-based combined exact (QBCE) pattern matching algorithms
The recently proposed algorithms, QPBE and QBCE, are efficient to process the large text sequences. These also overcome the constraints of QEPM and QAPM methods (Soni & Rasool, 2021). The QPBE design is realized efficiently under the superposition of text indices on a quantum memory, and it finds all t exact occurrences of search pattern in O ffiffiffiffiffi Nt p À Á time. However, the QBCE algorithm replaces pattern matching approximations with exact matches. It also reduces implicit quantum circuit depth to explore the text during pattern search with the logarithmic factor. A search time for all t 0 exact occurrences over the reduced text of size t is O ffiffiffiffi ffi tt 0 p À Á . Both these methods were proposed with significant aspects to process the specific biological sequences. A query remains the same as existing methods, rather the As we reviewed, the storage complexity of QPBE is same as the existing QEPM algorithm. The QBCE remarkably reduces the storage while comparing with the excessive qubits requirement of pattern verification used in the existing QAPM method. All the required complexity analysis detail of these algorithms are included in Table 2 for quick reference (Soni & Rasool, 2021).
Quantum exact multiple pattern (QEMP) and quantum approximate multiple pattern (QAMP) matching algorithms There are varieties of solutions proposed for the first time on quantum multiple pattern matching. However, the design of such algorithms is based on the execution of search oracle in successive iterations. So for different pattern sizes, it is iteratively called for finding all t occurrence of each pattern P k . Due to this direct possible design, Table 3 shows that a multiplicative factor (m) is included in the complexities of algorithms (Soni & Malviya, 2021). The authors categorized multiple patterns matching methods as exact and approximate with quantum memory processing based design. Search complexity of suggested QEMP algorithm to find t occurrence of each P k ranges between In contrast, the QAMP method uses approximate filtering in O m tlog 2 N À Á À Á time to find t filtered indices for each P k . Further, the iterative search time for each P k to search all t 0 occurrences of reduced text of size t, ranges between O m ffiffiffiffi ffi tt 0 p log 2 N À Á À Á and O m tlog 2 N À Á À Á . Both these methods are not increasing storage complexity because of iterative executions; and reasonably, the multiplicative factor m is included. Still, there exist high qubits requirement in the QAMP algorithm (see Table 3). The time of quantum memory O Nlog 2 N À Á is considered explicitly due to no such physical availability. These algorithms were suggested to process biological sequences. For the detailed design and analysis of these methods, refer to Soni & Malviya (2021).

QUANTUM ALGORITHMIC FRAMEWORK
Quantum operational framework used in the algorithmic design Quantum algorithms based on superposition can perform exponential operations in parallel. The quantum behavior realizes qubit presence as j0i and j1i at same time. A jwi is a column vector, represents superposition, and hwj is a row vector; usually, Bra-Ket notation wjw h i is inner product. An n qubits quantum register jq i i q i 2 0; 1 f g n ð Þspans the tensor product of 2 n dimension as Hilbert space. So, the computational basis is formed as w n j i ¼ a 0 0 j iþ . . . þa i i j iþ . . . þa 2 n À1 2 n À1 j i to realize superposition under n dimensional vector space with complex probability amplitudes. Quantum registers can entangle with each other. A measurement collapses superposition into classical states jii between j0i to j2 n À 1i with probability a i j j 2 such that P i2 0;1 f g 2 a i j j 2 ¼ 1. To visualize such n qubits superposition with the required dimensions, refer to these article for the Bloch sphere model (Choo, 2006;Lanzogorta & Uhlmann, 2008;Nielsen & Chuang, 2010;Coles, 2020;. Qubits remain in a pure state (vectors), but a quantum gate operator transforms n qubits into 2 n Â 2 n sized mixed state (density matrix). The outer product of vectors is obtained as jwihwj because quantum unitary gate U applies certain operations within superposition to transform the quantum state. A U y is a conjugate transpose of U that performs the reverse quantum operation, such that UU y ¼ I holds. Quantum logic operations such as [H] creates superposition, Pauli matrices X; Y; Z ½ obtains any rotation on Bloch sphere, R x h ð Þ; R y h ð Þ; R z h ð Þ Â Ã applies rotation with angle h as unitary operation. Some required controlled operations are C n NOT or C n X ½ which flips the target qubit and C n Z ½ flips the phase of target, when n control qubits are set to 1. The unitary operators encode to perform specific operations under quantum superposition. Refer to Table B1 (Appendix B) for symbols and used unitary operators throughout this article, and for more comprehensive understanding of quantum operations, refer to the following articles (Lanzogorta & Uhlmann, 2008;Nielsen & Chuang, 2010;Coles, 2020;Soni & Rasool, 2021;Soni & Malviya, 2021).

Methodology and framework used for quantum algorithm analysis
Our analysis framework for the quantum algorithm is oriented toward quantum-based proof methods. So, we categorized the proofs with their specialized point of interest with their additive use in the quantum algorithmic analysis. We provide the precise description of them as: Quantum Complexity Proof: The proposed algorithms are justified by using the following complexities analysis. Query complexity shows the number of superposition based oracle calls. Time complexity states the processing time of quantum gates involved in quantum circuits with logarithmic factors. Circuit complexity defines the composition of the quantum circuit with depth. Storage complexity estimates required qubits with ancilla. Quantum Probabilistic Proof: The proposed algorithms are also proved based on computational theory to identify the quantum complexity class as either the exact quantum polynomial (EQP) with Pr ¼ 1 or bounded error quantum polynomial (BQP) complexity with Pr = ∈. The probabilistic proof is used to identify results based on probabilities to be used later in lemmas and theorems. Quantum Truthness Proof: We prove the algorithms mathematically using Lemma proofs to derive primarily partial results, and then used Theorem proofs to justify the computational complexities result based on rigorous logic and reasoning. Quantum Correctness Proof: We proved the proposed algorithms for their correctness on the basis of quantum algorithmic trace steps which expands quantum operations applied under superposition to show quantum state transformations.

Quantum effective processing framework for algorithm design
We generalized a framework for the ordered design of algorithms with (1) processing advantage of quantum memory; (2) proposed efficient quantum exact match (QEM) circuit; and (3) Grover's search to generate high probable results. The remarks of framework are specified in Table 4.

Processing advantage of quantum memory (QMEM)
First, for the compatibility of QPU based computation, both text and pattern are required to encode as quantum data. This facilitates the processing of large biological sequences under quantum superposition. So, QMEM of size jT 2 n Âw i QMEM is used to realize superposition with N ¼ 2 n memory words each with size w qubits. The QMEM needs address register jT i i QA of size log 2 N ¼ n qubits to refer all text indices jT i i QA in superposition, and data corresponding to entangled addresses is accessed by data register jT i ½ i QD of size log 2 AE j j ¼ w qubits (Giovannetti, Lloyd & Maccone, 2008;Nielsen & Chuang, 2010;Metodi, 2011;Lin et al., 2013;Fu et al., 2016;Britt, 2017).
The design of QMEM is realized using bucket brigade architecture that enables data access in O log 2 N À Á steps, as among O N ¼ 2 n ð Þqutrit, O log 2 2 n À Á quantum switch remains active. This design is effective, as classical memory (CRAM) needs all O N ¼ 2 n ð Þswitches active for word access. So, QMEM gains exponential speedup as 2 n =log 2 2 n À Á over A text is shared on memory, and each c th core QCore c can access it in owned superposition. A QPU with C cores uses their registers set, and such parallelism minimizes processing time as negligible. Figure 2 shows the architecture of QPU with C cores working on shared QMEM with the design of the quantum memory circuit. A QMEM is realized using U QMEM of Eq. (1) in support of Eqs.
(2)-(4) (Giovannetti, Lloyd & Maccone, 2008;Nielsen & Chuang, 2010;Metodi, 2011;Lin et al., 2013;Fu et al., 2016;Britt, 2017;Brandl, 2017;Park & Petruccione, 2019;Matteo, 2020;. A unitary U QMEM makes the data available in parallel for each jT i i QA index. It prepares the jqutrits NÀ1 i switches in jwait NÀ1 i state and realizes the superposition of entire memory. As per target index jT i i QA , the qutrit are transformed from jwaiti to jlefti or jrighti state using U Swap of Eq. (2) under fiduciary qubit jf i that fixes switch state. Among jqutrits NÀ1 i only the jqutrits log 2 N i remains active during the memory call [14]. We perform the data loading using U Load of Eq. (3). It activates bus qubits to trace a path of active qutrit switches, copies the cell data, and traces back over same qutrit to load copied data into jT i ½ i QD , and meanwhile, qutrit are transformed to jwaiti state by reverse unitary U y Swap of Eq. (4) (Giovannetti, Lloyd & Maccone, 2008;Nielsen & Chuang, 2010). A QMEM needs O log 2 N À Á steps; and a memory call enables the bus qubits equal to the word size to access data in parallel, so for w ¼ M Â log 2 AE j j qubits, the log 2 N switch remains active until the word transfer is not completed. Therefore, with word transfer, the QMEM needs O M Â log 2 N À Á steps with the negligible factor M (Nielsen & Chuang, 2010;Soni & Rasool, 2021;Soni & Malviya, 2021).

Proposed efficient quantum exact match (QEM) circuit
Second, we propose quantum-exact match (QEM) circuit through unitary U Comp to perform parallel match between pattern jP 0 to MÀ1 ½ i DR and retrieved substring in register jT w ½ i QD of size w ¼ M Â log 2 AE j j qubits. We seek an exact match on behalf of each index jT i i QA in superposition on QMEM. This circuit compares the qubits of size log 2 AE j j for each symbol contained in jPi DR . So, for M length pattern, all log 2 AE j j sized qubits are analyzed in O 1 ð Þ time. We specified the QEM operation in Eq. (5), and relevant circuit is shown in Fig. 3

QEM Operation
The comparison between jP 0 to MÀ1 ½ i DR and jT ½i to iþMÀ1 i QD is performed by unitary U Comp in an explored superposition of QMEM with text indices jT i i QA . So, entire w ¼ M Â log 2 AE j j qubits sized substring is compared in parallel with constant time. This circuit is designed with 3 Â M Â log 2 AE j j ¼ C 2 NOT gates which are arranged at level zero (for M sized text substring and pattern, and M additional ancilla). At level one, we used M ¼ C log 2 AE j jþ1 NOT gates to check for equality as either 0 j i ¼¼ 0 j i or 1 j i ¼¼ 1 j i between aligned qubits of size log 2 AE j j for each character of P. Last level is designed with single C Mþ1 NOT gate that flips a target qubit jq Comp i to indicate the quantum-based

Grover's search operator (GSO) to generate high probable results
Third, Grover's method is optimal to search for pattern in O ffiffiffiffi N p À Á steps over N size text. It uses amplitude amplification that repeats for p=4 ffiffiffiffi N p times, each iteration applies reflection operations for transforming target index to high amplified amplitude under superposition state, and thus to obtain high probable search results (Nielsen & Chuang, 2010;Chakrabarty, Khan & Singh, 2017). So, O ffiffiffiffi N p À Á steps assure to eventually result in the desired state with significantly large amplitude. A method is shown in Fig. 4 and it's next to next figure. No more iterations than ffiffiffiffi N p is recommended, as this succeeds with a solution on the sine function principle. It gradually increases as per the increase in function argument, but later this starts decreasing. However, this search mechanism is the only way to achieve a quadratic speedup (Lanzogorta & Uhlmann, 2008;Zhou et al., 2013;Coles, 2020).
Á marks the target index location of the pattern when U Comp of Eq. (5) is succeeded for the exact match through Boolean oracle. Further, phase inversion is applied by phase oracle using U Mark jT i i QA jqi of Eq. (7) to reflect the target index amplitude as , inverts all amplitudes around the mean, such that the amplitude of solution increases and the others decrease. In actual, this method amplifies the search index amplitude in each iteration (Lanzogorta & Uhlmann, 2008;Zhou et al., 2013;Broda, 2016;Giri & Korepin, 2017;Figgatt et al., 2017;Coles, 2020). The GSO operational description is provided in correctness proof of proposed algorithms. GSO Opeartion A GSO works under superposition state jw n i by making an angle p=2 À h ð Þand transforms the solution state by applying each time 2h rotations. So, for r rotations, For geometric proof, refer (Nielsen & Chuang, 2010;Broda, 2016;Chakrabarty, Khan & Singh, 2017;Coles, 2020;Soni & Rasool, 2021;Soni & Malviya, 2021).
As reviewed, analysis of quantum effective processing framework is specified in with respect to negligible multiplicative factor log 2 N À Á (Brassard et al., 2002;Lomont, 2003;Ablayev et al., 2020). If it is known that the t ¼ 0 (no solution), then GSO returns a random element uniformly in O ffiffiffiffi iterations are needed to obtain high probable search solution. We prefer the quantum search to find the few pattern occurrences. The consideration of t ¼ N is found rare for a biological text, and hence this can be ignored (Nielsen & Chuang, 2010;Broda, 2016;Chakrabarty, Khan & Singh, 2017;Soni & Rasool, 2021;Soni & Malviya, 2021).
To our knowledge, the quantum search assumes that the number of search solutions t (either unique or multiple solution) are already known. Therefore, number of GSO iterations can be determined in advance and after p=4 ffiffiffiffiffiffiffiffi N=t p iterations the search results are found with certainty and high probability. However, the GSO can overshoot if the t number of search solutions are unknown/not known in advance. In that case, with the unknown number of GSO iterations, the probability of success would be vanishingly small (Boyer et al., 1998;Brassard et al., 2002;Lomont, 2003;Younes, 2008;Song, 2017;Ablayev et al., 2020).
To deal with the unknown number of search solutions, one of the methods was proposed by Boyer et al. (1998) and restated in Younes (2008); Song (2017) and Ablayev et al. (2020) as the modified Grover's search that runs GSO several times in successive iterations. The modified algorithm of Boyer et al. (1998) repeats GSO by taking the value of t in an exponential increase. On j th repetition, p=4 ffiffiffiffiffiffiffiffiffiffi N=2 j p iterations are performed. The repetitions are here summing to O ffiffiffiffi N p À Á times. Either of these iterations may find the search results with a sufficient high probability. In each of these repetition, the GSO operations are still bounded by p=4 ffiffiffiffi N p À Á iterations. It is equivalent to O N ð Þ time classical complexity, so not used in practical implementation (Boyer et al., 1998).
Quantum counting (QC) is an alternative approach that can satisfactorily handle the problem of unknown number of search solutions (Brassard et al., 2002;Lomont, 2003;Song, 2017). A QC is quantum amplitude estimation (QAE) method that can estimate t number of search solutions either based on approximation or based on exactness. It helps to decide the required number of GSO iterations. The QAE technique is defined in Brassard et al. (2002) and Fang Song (2017), and it is used for estimating n o as the possible count to find the number of search solutions. These authors (Boyer et al., 1998;Brassard et al., 2002;Lomont, 2003) suggested to run quantum counting algorithm initially, and then to proceed with actual number of GSO iterations. Quantum counting results can be obtained with quadratic speedup in Therefore, we observed it as an efficient method when the number of search solutions are unknown, and hence it prevents overshooting of Grover's. Later, in theoretical results and complexity analysis section, we analyze the exact and approximate quantum counting methods, and these are implemented to simulate our algorithms.
A circuit of QMEM needs C nþ1 NOT to mark jT i i QA address, and to store This memory is exponentially faster than the CRAM circuit. However, its access depends on the depth of the bifurcation tree i.e. O log 2 N À Á time. Quantum search works with QMEM by applying H n jT i i QA and XH jqi ð Þ and then U Comp checks for exact match followed by amplification. On a successful match, qubit jqi is flipped by C nþ1 NOT gate, then U Mark flips the phase of index jT i i QA by C n Z gate. Diffusion performs the amplification through the set of quantum operators H n X n f g C n Z H n X n f g f g . At the last, perform measurement at index jT i i QA . In addition, we included qubits requirement for QMEM and GSO. Quantum gates and the circuit requirement of the framework is shown in Table 4. However, our remark states that quantum search over text T of size N takes n þ 2Mlog 2 AE j j þ 1 qubits (Lanzogorta & Uhlmann, 2008;Nielsen & Chuang, 2010;Zhou et al., 2013;Broda, 2016;Chakrabarty, Khan & Singh, 2017;Giri & Korepin, 2017;Figgatt et al., 2017;Coles, 2020;Soni & Rasool, 2021;Soni & Malviya, 2021). Further, n is replaced by tq qubits for the search which is performed over the reduced size filtered text. A QMEM is efficiently simulated using algebraic normal form (ANF) for the hybrid realization of quantum operations (Bogdanova et al., 2018;Malviya & Tiwari, 2020;Hao et al., 2020;Malviya & Tiwari, 2021).

THE PROPOSED METHODS
This section includes proposed EnQPBEA & EnQBCEA algorithms. Both these designs use the effective quantum processing framework. Algorithms can process multiple patterns string of set P ¼ P 1 ; :; P k ; :; P m f gwith each pattern P k of length M k 1 k m ð Þ , using the shared text T of size N explored on QMEM to search all exact match occurrence of individual pattern P k 2 P through c th core QCore c of QPU having C quantum cores. Our algorithms are enhancement of improved QPBE & QBCE methods for processing multiple patterns with an aim to remove the multiplicative factor m in complexities. The proposed solutions are remarkable and efficient on comparing with existing QEMP & QAMP multiple pattern methods. We modify the design of algorithms by running multiple search oracles in parallel. A QPU runs C cores to search for m=C pattern in parallel, and each quantum core uses its own set of registers. So a multiplicative constant m=C ð Þ with a small arbitrary constant value of m and constant value of C is found negligible. However, for comparatively large value of m ) C, a factor m=C cannot be ignored in the complexities analysis. Hence, we initially clarify that for few pattern occurrences, the storage and time both are implicitly saved in enhanced designs of algorithms. We justify our proposed methods by giving the proof of the resulting Theorems 1 and 2. Later, we show the efficient and effective hybrid simulation of these quantum algorithms.
Proposed method 1: enhanced QMEM processing based exact algorithm for multiple pattern matching (EnQPBEA-MPM) This method searches for each pattern P k 2 P in parallel using QPU with C cores accessing text T on shared QMEM, such that search time of all t k occurrence of P k overlaps. QEM circuit is applied under superposition of text on QMEM by each QCore c . Search results are instantly possible and would be effective for the biological sequencing because of no other processing overhead except the search time. Existing QPBE is enhanced efficiently by executing search oracles in parallel with the negligible time factor, and the existing iterative pattern search overhead of QEMP is also removed.
A pattern P k 2 P is individually processed on c th core QCore c where 1 c C ð Þ , so m=C patterns are searching in parallel within the text T of size N shared on QMEM. Each pattern P k is assumed with individual size w ¼ M k Ã log 2 AE j j qubits, and it is stored in jP 0 to M k À1 ½ i DRk as in separate data register. The text T realized on jT 2 n Âw i QMEM is accessed in a superposition of addresses by QCore c through address register jT i i QAk i 2 0; 1 f g n ð Þ . All the text substrings, each of length M k Ã log 2 AE j j are loaded in entangled register jT w ½ i QDk by applying QMEM transformation. A unitary U Load makes sure such data load in a coherent superposition of text addresses. Once these substrings are available in parallel, EnQPBEA applies the GSO operator, separately on QCore c to ensure an exact match of each P k with QEM circuit realized using U kComp . The Boolean oracle circuit succeeds by flipping target qubit of Fig. 3 to report exactness. When c th core QCore c identifies exact match in superposition, the amplification operator U Diff U Mark ð Þis then applied to increase the probability amplitude of identified indices jT i i QAk . The GSO operator repeats for O ffiffiffiffi N p À Á time and then QCore c applies the measurement to obtain search index jT i i QAk with high probability.
The quantum state gets collapsed after each measurement, so its repetition ensures to report all t k index locations of P k 2 P which are identified by c th quantum core QCore c . Each pattern occurrence is verified by same core as jT ½i to iþM k À1 i QDk ¼¼ jP 0 to M k À1 ½ i DRk . The pattern matching method of EnQPBEA-MPM is illustrated in Fig. 4. However, the steps are listed in the proposed algorithm, and the equivalent quantum circuit executing search oracles in parallel is shown in Fig. 5. In reference to Table 4 discussion, we state, that each core realizes O ffiffiffiffiffiffiffiffiffi ffi N=t k p iterations of GSO in parallel, and therefore, results in all desired pattern occurrence t k on behalf of pattern P k . However, we require Proposed Algorithm 1: EnQPBEA-MPM.
Data : Text T stored on jT 2 n Âw i QMEM which is accessed by quantum registers jT n i QA1 ; . . . ; jT n i QAm j j to store search pattern P k 2 P ¼ P 1 ; :; P k ; :; P m f g , and set of ancillary qubit designated to number of patterns jqi Q1 ; . . . ; jqi Qm n o Result : Outputs all t k exact occurrence 1 t k N ð Þof each pattern P k 2 P in parallel using c th quantum core QCore c accessing T on shared QMEM, as index Prepare registers as jzeroes n i in jT n i QAk ,jzeroes w ½ i in jT w ½ i QDk , j1i in jqi Qk and jP 0 to M k À1 ½ i DRk

3:
For each pattern P k 2 P to be processed separately on c th quantum core QCore c

4:
Initialize quantum state in registers as

5:
For all jT i i QAk in their separate uniform quantum superposition state jw n i k

6:
Load data at jT i ½ i QDk as per entangled jT i i QAk by applying QMEM Transformation as

8:
Repeat GSO for O À ffiffiffiffiffiffiffiffiffi ffi N=t k p Á times in uniform superposition jw n i k , with QEM Operation which is implicitly applied through U kComp for exact matching of M k Â log 2 AE j j qubits size as -

10:
End of GSO Repeat

11:
Measure the final state to get the desired index jT i i QAk as high probable solution

12:
Verify pattern P k at jT i i QAk on c th core QCore c as jT ½i to iþM k À1 i QDk ¼¼ jP 0 to M k À1 ½ i DRk

13:
End of Inner For

14:
End of Outer For Þqueries to report all t k marked occurrences, and hence the pattern matching time is bounded to O ffiffiffiffiffiffiffi Nt k p log 2 N À Á with negligible logarithmic factor. We clarify that EnQPBEA repeats GSO operation in parallel for t k times on each core QCore c to search all t k indexes. So, we consider t ¼ t k ¼ max t 1 ; :; t k ; :; t m ð Þas based on longest core processing to find maximum pattern occurrences. Therefore, the search complexity of parallel executions of EnQPBEA using QPU with C cores is O m=C In support of complexities, a correctness proof of EnQPBEA-MPM with quantum operations is specified in Appendix C. For mathematical proof, we define certain Lemma 1 as partial required proof, and based on that, we conclude the computational complexity and achieved speedup through the resulting proof of Theorem 1.
Lemma 1: A QPU having C quantum cores 1 c C ð Þcan access the text T of size N on shared QMEM. It loads all text substring equal to pattern length P k as M k Ã log 2 AE j j qubits in superposition by using QCore c in parallel. Time needed for such parallel loading operations ranges between O m=C Proof (Lemma 1): About earlier discussions of effective processing framework and Table 4, we use to prove this lemma. The jT 2 n Âw i QMEM as shared among C cores of QPU, makes sure that all jT i i QAk addresses are available in parallel on each QCore c & QMEM transformation loads M k Ã log 2 AE j j qubits in entangled register jT w ½ i QDk . The entire memory access is available in constant time on each individual core, however, by considering M as M ¼ max M 1 ; :; M k ; :; M m ð Þ the memory circuit needs O Mlog 2 N À Á steps. So, the parallel time of QMEM access using QPU with C quantum cores is O m=C ð Þ Mlog 2 N À Á À Á . As we know, that the quantum state is collapsed after each measurement, so to report all t k index of P k identified by c th quantum coreQCore c , we need this access several times. By assuming t ¼ t k ¼ max t 1 ; :; t k ; :; t m ð Þat any QCore c for QMEM transformation, and at worst, if number of identified patterns are t ¼ N then each time, all parallel substring load will take O m=C ð Þ MNlog 2 N À Á À Á time. We discussed earlier, that both these factors M and m=C ð Þ are negligible due to parallel load and parallel processing by achieving exponential speedup.
Theorem 1: Given text database T of size N and the multiple patterns set P ¼ P 1 ; :; P k ; :; P m f gwith each pattern P k of length M k 1 k m ð Þ . Algorithm EnQPBEA-MPM uses QPU having C quantum cores 1 c C ð Þto access the text T on shared QMEM. A c th core is used to search for the all t k exact occurrence of a pattern P k indexed at jT i i QAk , that is jT ½i to iþM k À1 i QDk ¼¼ jP 0 to M k À1 ½ i DRk . Based on longest core processing to find pattern occurrences t ¼ max t 1 ; :; t k ; :; t m ð Þ , the search time complexity for the worst case.
Proof (Theorem 1): This proof relies on Lemma 1 and other statements which are justified earlier. Proof of Lemma 1 states that, for t ¼ 1 or t few (t few denotes few pattern occurrences (t few ( N)) and t ¼ N, all substring load transformation is possible in O log 2 N À Á and O Nlog 2 N À Á time. Now EnQPBEA-MPM algorithm realizes such parallelism using QPU with C quantum cores and each core access text T on shared QMEM. For each pattern P k 2 P of length M k 1 k m ð Þ , this algorithm identifies the target indices based on the QEM circuit under superposition of N sized text. Further, the simultaneous iterations of GSO finds all t k solutions of P k using c th quantum core Indeed, quantum state is collapsed while measured, so, EnQPBEA repeats GSO followed by measurement on QCore c to report all t k occurrence of Þqueries. Now, based on longest core processing, consider t ¼ t k ¼ max t 1 ; :; t k ; :; t m ð Þ . So, using QPU with C cores and for t ¼ 1 or t few (t few denotes few pattern occurrences (t few ( N)), the best case time complexity of EnQPBEA-MPM is O m=C ð Þ ffiffiffiffiffi Nt p log 2 N À Á À Á and this finds all patterns in parallel. However, when t ¼ N (all are search solutions), the worstcase time complexity is O m=C ð Þ Nlog 2 N À Á À Á . A multiplicative factor log 2 N À Á is considered negligible with n qubits, surprisingly small, to expand the original search space. However, this factor cannot be ignored when the number of qubits n is usually large to expand the original text space (Lomont, 2003). And the multiplicative constant m=C ð Þwith a small arbitrary constant value of m and constant value of C is found negligible. However, for the comparatively large value of m ) C, a factor m=C cannot be ignored in time complexities. Therefore, quantum search is preferred effectively for finding few occurrences. Instead, for biological text, t ¼ N is rare and hence ignored while stating the generalized complexity. We know that algorithm design is based on GSO, so, results are obtained with at least probability as Pr EnQPBEA running at QCore c measures jT i i QAk h in each iteration ! t k =N.
Proposed method 2: enhanced quantum-based combined exact algorithm for multiple pattern matching EnQBCEA-MPM The algorithm EnQBCEA-MPM is an enhanced version of the existing benchmark method QBCE. So, we formalize this multiple pattern algorithm with the possible speedup. The pattern matching method is illustrated in Fig. 6. Each pattern P k 2 P is individually processed using QPU with C cores; however, the c th core QCore c 1 c C ð Þprocesses the text T of size N over shared QMEM for m=C ð Þpatterns either for filtering or searching. In this method, each core QCore c transforms the original N sized text into reduced search space t k (corresponding to P k ), so-called filtered indices, and then performs exact searching of all t k 0 occurrence of each P k in overlapping of time evolution. To transform the text into reduced search space, we use an existing method of quantum-approximate filtering (QAF). This method is based on the hamming distance (HD) to check for the possible errors between pattern and text substring (to filter index) and ensures its correctness when the hamming distance HD ð Þ threshold (pre-computed). Such filtering outcomes are based on approximations, thus, we verify the filtered indices for a pattern match using the exactness. An additional time of QAF filtering is included in the complexity of this algorithm; however, this allows searching of patterns in an optimized way by achieving speedup. Our EnQBCEA design executes exact search oracles in parallel with the negligible time factor, and this also removes the existing iterative overhead (text filtering and pattern searching) of the QAMP algorithm. We expect the pattern matching results as effective for the biological sequencing because of overlapped quick search time to find the exact matches over the filtered text indices.
Initially, we redefine QAF (Aborot, 2017) to execute for each QCore c while accessing text T on shared QMEM for text filtering. The procedure QAF is redesigned here by using QMEM transformation. This prepares the pattern in register jPi DR and the start locations of distinct symbols of the pattern are store in array SL M ½ . Now, initializes QMEM registers jT n i QA and jT w ½ i QD in the zero state along with auxiliary register jT nþ1 i AX measured for the filtered index as possible start locations of the pattern. The superposition of text created in jT i i QA and jT nþ1 i AX is made entangled with addresses. Under memory superposition of jT i i QA , QAF marks the distinct symbols of the pattern at jT i j i AX by unitary U SLoc . And then, the possible start location of the patterns are marked as jT i À T i j i AX by U PLoc . A Hamming distance (HD) is applied at jT i À T i j i AX to check for threshold, further, Hadamard is applied at jT i i QA to merge probability amplitudes of entangled indices of jT i À T i j i AX . Finally, measure auxiliary register jT i À T i j i AX to identify filtered indices jT i i which are then stored in the referenced location array LA . . . ½ . As measurement destroys quantum state, so in each call at c th quantum core QCore c on behalf of P k 2 P, the QAF needs its execution several times to filter all t k indices location and then to store within the location array LA k t k ½ . Algorithm EnQBCEA-MPM needs following preparation such aseach pattern P k 2 P is assumed with individual size w ¼ M k Ã log 2 AE j j qubits, and it is stored in jP 0 to M k À1 ½ i DRk as in separate data register. At first, procedure QAF jT n i QAk ; jP k i DRk ; LA k is called for each pattern P k on each core to store the filtering results at individual location array LA k t k ½ . Each LA k . . . ½ contained with t k N filtered text indices; therefore, the algorithm needs location register jT tq i QLk each of size log 2 t k ¼ tq qubits to access LA k t k ½ by using c th core QCore c . Procedure: QAF jT n i QA ; jPi DR ; LA . . . ½ .
Input : Text address register jT n i QA , auxiliary register of same size with additional qubit jT nþ1 i AX , the implicit data register jP 0 to MÀ1 ½ i DR , SL M ½ classical array that keeps distinct symbol location within pattern as ji j i, access to location array LA . . . ½ to classically store filtered text indices.
Output : Stores all filtered text indices as possible start of pattern in location array LA . . .
For each jT i i QA remains in uniform quantum superposition state jw n i do

8:
Mark distinct symbol of pattern by unitary U SLoc as jT ij i AX corresponding to jT i i QA

9:
Mark possible start location of pattern by U PLoc as jT i À T ij i AX on behalf of jT i i QA

10:
Apply HD at jT i À T ij i AX to check for distance between text and pattern, such that, HD threshold

11:
Apply Hadamard at jT i i QA to merge amplitudes of entangled indices of jT i À T ij i AX

12:
Measure the auxiliary register jT i À T ij i AX and store the identified index as jT i i in LA . . . ½

14: End Procedure
The algorithm EnQBCEA proceeds to search for each pattern by running all cores in parallel. An equivalent quantum circuit executing search oracles in parallel is shown in Fig. 7. So, each core QCore c explores filtered indices of LA k t k ½ in superposition over QMEM. We expect that the reduced search space of size t k ( N is small than that of original text T of size N. Algorithm prepares registers in jzeroi states, and initializes superposition of filtered indices for each LA k t k ½ as jw tq i k by using jT i i QLk i 2 0; 1 f g tq À Á of QCore c . Now, for each jT i i QLk under the quantum superposition jw tq i k we apply U kGetL to obtain n À qubits original filtered index as jT i ½ i QLk ¼ iLk i.e. i ½ th memory content of Result : Outputs all t k 0 exact occurrence 1 t k 0 t k ð Þof each pattern P k 2 P in parallel, using c th quantum core QCore c accessing filtered location array LA k t k ½ which is explored on QMEM, as searched index jT iLk i QAk s.t. jT ½iLk to iLk þ M k À1 i QDk ¼¼ jP 0 to MkÀ1 ½ i DRk 1: Procedure EnQBCEA-MPM 2: For each pattern P k 2 P to be processed separately on c th quantum core QCore c

3:
Call QAF jT n i QAk ; jP k i DRk ; LA k ;

4:
End of For

5:
Prepare registers as jzeroes tq i in jT tq i QLk , jzeroes n i in jT n i QAk , jzeroes w ½ i in jT w ½ i QDk , j1i in jqi Qk and jP 0 to M k À1 ½ i DRk

6:
For each pattern P k 2 P to be processed separately on c th quantum core QCore c

7:
Initialize quantum state for accessing LA k t k ½ in register as

8:
For all jT i i QLk in their separate uniform quantum superposition state jw tq i k

9:
Apply the unitary U kGetL to get n-qubits actual index as jT i ½ i QLk ¼ iLk i.e. the memory content of LA k t k ½ through jT i i QLk , and then store k th address in corresponding register jT iLk i QAk 10:

11:
Load data at jT ½iLk i QDk as per addresses jT iLk i QAk by applying QMEM Transformation as 12:

13:
Repeat GSO for O ffiffiffiffiffiffiffiffiffiffi t k =t k 0 p times in uniform superposition jw tq i k , with QEM Operation which is implicitly applied through U kComp for exact matching of M k Â log 2 AE j j qubits size as -

14
: LA k t k ½ through jT i i QLk . This transformation helps address register jT iLk i QAk to access actual indices, so the search can perform over original text. Now, the original text is available in QMEM superposition and shared among all quantum cores. Therefore, text T realized on jT 2 n Âw i QMEM is accessed in a superposition of addresses by QCore c by address register jT iLk i QAk iLk 2 0; 1 f g n ð Þ . All the text substrings, each of length M k Ã log 2 AE j j are loaded in entangled register jT ½iLk i QDk by applying QMEM transformation. A unitary U Load makes sure such loading is in a coherent superposition of text addresses. Once substrings are available in parallel, EnQBCEA applies GSO, by QCore c to find an exact match of each P k with QEM circuit realized using the unitary operator U kComp .The processing of GSO is the same as per earlier discussion of EnQPBEA and Table 4. Instead, each core realizes O ffiffiffiffiffiffiffiffiffiffi t k =t k 0 p iterations of GSO in parallel, however, after O ffiffiffi ffi t k p ð Þ repetition QCore c applies measurement to obtain index jT iLk i QAk with high probability. As measurement collapses quantum state, so, each QCore c requires O ffiffiffiffiffiffiffi ffi t k t k 0 p ð Þqueries to report all t k 0 t k marked occurrences of P k in T. In addition, EnQBCEA-MPM allows c th core QCore c to verify pattern match at jT iLk i QAk as jT ½iLk to iLkþM k À1 i QDk ¼¼ jP 0 to M k À1 ½ i DRk . A correctness proof of EnQBCEA-MPM is included in Appendix D and complexity is proved in Theorem 2.
Lemma 2: A QPU having C quantum cores 1 c C ð Þcan access the text T of size N on shared QMEM. A c th core filters t k indices jT i i QAk in parallel to identify the possible start locations of pattern P and to store such original filtered indices in LA k t k ½ . Time needed for executing quantum approximate filtering (QAF) in parallel is O m=C ð Þ tlog 2 N À Á À Á . Proof (Lemma 2): In support of the earlier discussions and using the reference to Aborot (2017) and Soni & Rasool (2021), we used to prove this lemma. Procedure QAF is executed in parallel for each pattern P k 2 P on c th quantum core QCore c sharing the QMEM. Quantum circuit included in Aborot (2017) and Soni & Rasool (2021) will runs separately on QCore c and performs equivalent quantum operations as U SLoc , U PLoc , HD followed by the Hadamard on jT i i QAk to merge probability amplitudes of entangled indices of jT i À T i j i AX . Now auxiliary register measures filtered indices jT i i to store in LA . . .
½ . All such operations are bounded by O log 2 N À Á time. However, measurement destroys quantum state, so in each call at c th quantum core QCore c on behalf of P k 2 P, the QAF needs its repeated executions to filter all t k indices and to store them in location array LA k t k ½ . Therefore, based on longest core processing to filter maximum pattern locations, we assume t ¼ t k ¼ max t 1 ; :; t k ; :; t m ð Þat any QCore c . The time required for such filtering in parallel is O m=C ð Þ tlog 2 N À Á À Á . The multiplicative factors can be ignored due to parallel processingquantum circuit operations.
Theorem 2: Given text database T of size N and the multiple pattern set P ¼ P 1 ; :; P k ; :; P m f gwith each pattern P k of length M k 1 k m ð Þ . Algorithm EnQBCEA-MPM uses QPU having C quantum cores 1 c C ð Þto access the text T on shared QMEM. The c th core runs QAF to store all t k filtered indices of a pattern P k in LA k t k ½ . The indices of LA k t k ½ are used by c th core to search for all t k 0 exact occurrence of patterns indexed at jT iLk i QAk , that is jT ½iLk to iLkþM k À1 i QDk ¼¼ jP 0 to M k À1 ½ i DRk . Based on maximum filtered indices t ¼ max t 1 ; :; t k ; :; t m ð Þin LA k t ½ and longest core processing to find pattern occurrences t 0 ¼ max t 1 0 ; :; t k 0 ; :; t m 0 ð Þ , the search time complexity of EnQBCEA-MPM algorithm is O m=C ð Þ ffiffiffiffi ffi tt 0 p log 2 t À Á À Á in the best case and O m=C ð Þ tlog 2 t À Á À Á for the worst case.
Proof (Theorem 2): The proof of this theorem is based on Lemma 2 and other statements which are justified earlier. Our algorithm EnQBCEA-MPM performs a search on filtering outcomes that are stored in parallel by executing the QAF on separate quantum cores. It is assured that EnQBCEA performs the search on reduced size text database T, each of size t k . Thus, this increases the success probability for identifying the search results. Lemma 2 states, that to store all t k filtered indices in LA k t k ½ we need O m=C ð Þ tlog 2 N À Á À Á time. Each core QCore c 2 QPU utilizes the processing advantage of QMEM in both filtering and searching. Algorithm EnQBCEA-MPM accesses LA k t k ½ on each QCore c to obtain the original filtered text indices by applying unitary U kGetL . It takes O 1 ð Þ time for realizing such transformation under the superposition.
The original text is available in QMEM superposition and shared among all quantum cores. Thus, each QCore c applies QMEM transformation to load all substrings in parallel, such that, each pattern P k 2 P of length M k 1 k m ð Þverifies for exactness over filtered index approximations. Now, based on the QEM circuit applied under the superposition of t k sized text T, the indices are identified for an exact match. Further, parallel iterations of GSO finds all t k 0 t k 0 t k ð Þsolutions of P k using c th core QCore c in O m=C ð Þ ffiffiffiffiffiffiffiffiffiffi t k =t k 0 p queries. Indeed, the quantum state collapsed while measured; therefore, EnQBCEA repeats GSO operation followed by measurement, on each quantum core QCore c to report all t k 0 exact occurrences of the pattern P k in resulting O m=C ð Þ ffiffiffiffiffiffiffi ffi t k t k 0 p ð Þ ð Þqueries and thus O m=C ð Þ ffiffiffiffiffiffiffi ffi t k t k 0 p log 2 t k À Á À Á time. To conclude the complexity, we are considering the maximum reduced size of any filtered location array LA k t k ½ as t ¼ t k ¼ max t 1 ; :; t k ; :; t m ð Þ , and the longest core processing to find maximum pattern occurrences t 0 ¼ t k 0 ¼ max t 1 0 ; :; t k 0 ; :; t m 0 ð Þ . So, using QPU with C cores and for t0 ¼ 1 or t few (t few denotes few pattern occurrences (t few ( t)), the best case time complexity of EnQBCEA-MPM is O m=C ð Þ ffiffiffiffi ffi tt 0 p log 2 t À Á À Á and this finds all patterns in parallel. However, when t 0 ¼ t the worst-case complexity is still bounded to O m=C ð Þ tlog 2 t À Á À Á . A multiplicative factor log 2 t À Á is considered negligible as due to less qubits tq ( n ð Þneeded to expand the reduced search space. However, this factor cannot be ignored when the number of qubits tq is sufficiently large to expand the filtered space (Lomont, 2003;Soni & Rasool, 2021). And the multiplicative constant m=C ð Þ with a small arbitrary constant value of m and constant value of C is found negligible. However, for the comparatively large value of m ) C, a factor m=C cannot be ignored in time complexities. Therefore, quantum search is preferred effectively for few occurrences. Instead, for biological text, t 0 ¼ t is rare and hence ignored while stating a generalized complexity. We also suggest that algorithm design based on the functionality of GSO, enhances the results with probability Pr EnQBCEA running at QCore c measuresjT iLk i QAk in each iteration

THEORETICAL RESULTS AND COMPLEXITIES ANALYSIS
The presented algorithms EnQPBEA-MPM and EnQBCEA-MPM are hereby observed with summarized facts of several complexities analysis. This section incorporates the design methods by mainly focusing on actual qubits requirement. For dealing with number of unknown search solutions, the analysis of quantum counting algorithms is included. An idea to simulate QMEM is also discussed here with the realization of quantum effective processing framework.

Summarized complexities analysis and mathematical proved results
We summarize our proven results to compare with the related work. The significant findings were noted herein dedicated tables to emphasize our analytical interpretation. In this section, we present the concluded complexities of our algorithms using Tables 5 and 6 is referred for discussing the design methods with qubits requirement and success probability.
Analysis of proposed algorithms based on several quantum complexities: The resulting complexities of algorithms have been proved earlier and summarized in We enhanced the QPBE and QBCE for multiple patterns under quantum architectural and implicit operational parallelism. Based on complexity analysis, our solutions are proved efficient to find an exact match while comparing with existing multiple pattern methods QEMP and QAMP as the factor m cannot be excluded from their complexities. Our algorithm designs execute exact search oracles in parallel using individual quantum core. The processing time for few pattern occurrences (t few ( N) is negligible, and we need less qubits to expand the filtered search space. A QPU runs C cores to search for m=C pattern in parallel, and each quantum core uses its own set of register. So multiplicative constant m=C ð Þ with a small arbitrary constant value of m and constant value of C is found negligible. But, for comparatively large value of m ) C, factor m=C cannot be ignored in time complexities. We included the storage complexity of our algorithms to estimate the qubits requirement. This complexity is based on the asymptotic estimation of qubits by excluding constants. Later, in Table 6, we specify actual qubits requirement with coefficients to check simulation feasibility of algorithms, as classical machine configuration is restricted to simulate large qubits. Quantum algorithms and their quantum circuits are proved equivalent for implementations. Therefore, the quantum query, time and storage complexities of proposed algorithms justify their effectiveness. All the requisite and relevant discussions on behalf of Table 5 have been discussed earlier as per the contextual need.
Design methods used for quantum multiple pattern matching algorithms: Table 6 shows framework and design of algorithms. Used quantum registers are mentioned to check for proportional simulation feasibility of actual qubits requirement. Search success probability on any QCore c , proved in theorems, is based on original and filtered text sizes.
The quantum results may contain error while measured; therefore, GSO operation is used to amplify the probability amplitudes. Thus, we obtain the search results with a high probability. Therefore, we categorize our algorithms in BQP complexity class. The qubits are implicitly analyzed based on the quantum register requirement. For QPU with C cores based parallel processing, this m=C ð Þ factor is there; however, these cores use their own set of quantum registers, so the factor is negligible, and time is reduced in parallelism. Classical machine configuration is restricted to simulate large qubits and affects simulation. Therefore, algorithms are implemented using hybrid simulation, such that each core can use the sufficient qubits with no excessive increase in qubits requirement of a quantum system. To save qubits requirement, EnQPBEA and EnQBCEA are simulated by using ANF based quantum operations, dedicated use of ancillary qubits, and utilizing QuEST specific unitary for efficient realization. The hybrid simulation results are noted later in the tables included in "Simulation Results and Discussion" section.

Exact and approximate quantum counting complexity analysis
Quantum counting (QC) is a quantum amplitude estimation method to handle the case of GSO overshooting as t number of search solutions are unknown in advance, so it leads to the unknown number of GSO iterations (Brassard et al., 2002;Nielsen & Chuang, 2010;Song, 2017). These authors (Boyer et al., 1998;Brassard et al., 2002;Lomont, 2003;Younes, 2008) suggested running the quantum counting algorithm initially and then proceeding with the actual number of GSO iterations. We obtained an accurate t value by implementing Exact-QC and the estimated t value through Approx.-QC methods. We provide the complexities analysis of both these cases in the subsection, and the resulting complexities are specified in Table 7.
Analysis of approximate and exact quantum counting (QC) algorithms:  (Boyer et al., 1998;Brassard et al., 2002;Lomont, 2003;Younes, 2008 (Brassard et al., 2002;Soni & Rasool, 2021). In Table 7, we have shown the complexities by including m=C ð Þfactor because the quantum counting is needed to run on individual quantum core for each pattern separately. To measure the accurate value of t through Exact-QC we used to take the register with the precision qubits }r} % log 2 N ¼ n À Á qubits for EnQPBEA and }r} % log 2 t ¼ tq À Á qubits for EnQBCEA algorithm. Similarly, to measure the approximation of the value of t through Approx.-QC we need a register with precision qubits }r} , log 2 N qubits for EnQPBEA and }r} , log 2 t qubits for EnQBCEA algorithm (Brassard et al., 2002;Song, 2017;Soni & Rasool, 2021). The storage complexity showing qubits estimation for Approx.-QC and Exact-QC is also shown additionally in the presented Table 7. There are two cases to obtain the resulting complexities of combining the QC and GSO as it is further used in our simulation of EnQPBE algorithm -(1) Run Approx.-QC followed by the GSO to find all t occurrences of the pattern, so (2) Run Exact-QC followed by GSO to find all t occurrences of the pattern, therefore ffiffiffiffiffi time. Therefore, the complexity is still bounded by O ffiffiffiffiffi Nt p À Á time (Brassard et al., 2002;Lomont, 2003;Song, 2017). Similarly for these cases, the complexity of EnQBCEA algorithm remains O ffiffiffiffi ffi tt 0 p À Á time as it works on t filtered indices to find t 0 pattern occurrences (Brassard et al., 2002;Soni & Rasool, 2021). We may expect accurate number of GSO iterations when the exact value of t is obtained through Exact-QC but the deviations in t values are possible through Approx.-QC algorithm, and hence the quantum search results need to be compromised with more errors.

Design and analysis of algebraic normal form to realize QMEM
To simulate our algorithms with the effective quantum processing framework, we propose the design of an algebraic normal form (ANF) circuit for realizing QMEM. Thus, this supports the hybrid simulation (Bogdanova et al., 2018;Hao et al., 2020). We can implement and perform most of the quantum operations directly by utilizing the advantage of ANF that are equivalent to unitary circuits, such as U Load (QMEM transformation), U Comp (QEM operation), and needful quantum adder operation (QAF filtering); hence, this saves the qubits requirement (Malviya & Tiwari, 2020;Malviya & Tiwari, 2021). The other requisite circuits and GSO operations needed for our proposed algorithms will be implemented using combination of ANF and the specific quantum unitary operations available in the QuEST library (defined in next section, used for simulation purpose). For comprehensive understanding of the ANF based QMEM realization refer to Malviya & Tiwari (2020); Soni & Rasool (2021); Soni & Malviya (2021) and Malviya & Tiwari (2021). We proposed a quantum circuit in Fig. 8 showing implicit operational method about the memory processing mentioned in Fig. 2. A design of QMEM transformation is proposed here for a main unitary U Load by using ANF. This will be later used in the next section to simulate QMEM. So, for considered jT 2 n Âw i QMEM , the quantum circuit of Fig. 8 creates a superposition of N ¼ 2 n text addresses by applying H n gates on n qubits address register jT i i QA . These n qubits are used in ANF as n variables to form 2 n possible binary strings, usually called Boolean terms. In Fig. 8, the n ¼ 4 variables are taken as jT 0 T 1 T 2 T 3 i, where T 0 j i ¼ 2 3 j i and T 3 j i ¼ 2 0 j i are the most significant and least significant qubit positions. Therefore, the total 2 4 ¼ 16 possible terms 0 j i . . . ; 7 j i; . . . F j i f g forms uniform superposition of binary strings 0000 j i. . . ; 0111 j i; . . . 1111 j i f g . Further, ANF creates the data superposition, by realizing all the substring data load operation in parallel, each of size M Â log 2 AE j j in entangled data register jT i ½ i QD for each jT i i QA . So, for such realization, M Â log 2 AE j j Boolean functions are computed in parallel, each can have at most O 2 n ð Þ Boolean terms. These terms are computed with the logical "AND" followed by "XOR" operations. The computation of all possible terms, results output of associated Boolean function. A circuit is shown in Fig. 8 (about Fig. 2) considers pattern of length M ¼ 4. Therefore, total 4 Â 2 Boolean functions  (Bogdanova et al., 2018;Malviya & Tiwari, 2020).
Each function f xy with x = [0 to M − 1] = {0, 1, 2, 3} and y = [0 to log 2 |Σ|] = {0, 1} is computed using variables associated with each term. To load all substring of size M Â log 2 AE j j in jT i ½ i QD for each text address jT i i QA in superposition, the binary string equivalent to index position jT i i is taken as input, and by applying their instances, these Boolean functions are then computed to generate the desired substring within superposition. For example, the loading of text substring indexed at jT 4 i QA , uses binary string j0100i QA to load the desired output string in data register j00011011i QD (see Fig. 2). This realization facilitates the qubits consuming operation in parallel, and thus, it simulates the quantum algorithms with the minimum qubits requirement (Malviya & Tiwari, 2020;Soni & Rasool, 2021;Soni & Malviya, 2021;Malviya & Tiwari, 2021). The design specifications used for quantum effective processing of algorithms are specified in Table 8 along with interpretation. Later, we will use these designs to simulate our proposed quantum algorithms using the QuEST simulation.
Design specifications used for quantum effective processing framework: Table 8 specifies the proposed designs of quantum effective processing framework. It is used in reference with Table 4 to know the quantum gates required for circuit, processing time and qubits needed to realize a circuits. The ANF circuit is realized as equivalent unitary U Load (Eq. 3) for QMEM transformation. A circuit implementation needs quantum gates set ANF based circuit (Fig. 8) H tq ; C tq NOT; X tq f g with tq n ð Þ. Such circuit can be simulated later with varying length, as per needed size of QMEM to realize. The time complexity of ANF based QMEM depends on the circuit depth constructed over tq input variables tq n. It realizes M Â log 2 AE j j Boolean function in parallel, each consist of at most 2 tq terms. So, with maximum circuit depth, this circuit will take the exponential complexity O 2 tq ð Þ as tq n under the simulation. We conclude that the physical QMEM processing is remarkable with O 1 ð Þ time; however, it is exponentially slow in classical. The O 1 ð Þ time QEM % U Comp (Eq. 5) design can be simulated efficiently with M Â log 2 AE j j qubits as all substrings, each of M Â log 2 AE j j length, can realize in superposition using ANF. The GSO can be realized as per Table 4. A unitary U Mark (Eq. 7) marks index with the phase inversion through C tqÀ1 NOT ð Þgate, this flips a target index by inverting ancilla. Further, amplification circuit is used with the set of gates H tq ; X tq f g C tqÀ1 Z; X tq ; H tq f g f g (Broda, 2016;Figgatt et al., 2017;Coles, 2020). A circuit depth of GSO is O ffiffiffiffiffi ffi 2 tq p À Á , so this depends on text size, as for t sized filtered or N sized original text with t N.

SIMULATION AND EXPERIMENTAL DETAIL
Our proposed algorithms are validated using hybrid (classical and quantum) simulation for the effective realization of equivalent quantum circuits. Therefore, we implemented the algorithms by utilizing the advantage of a C-Library based, flexible simulator with a multi-platform support, called the Quantum Exact Simulation Toolkit (QuEST) (Jones & Benjamin, 2018). We do not intend to analyze the simulation efficiency because of quantum operational restrictions on the classical machine. For a detailed study of QuEST simulation, refer to the published articles (Jones & Benjamin, 2018;Malviya & Tiwari, 2020;Malviya & Tiwari, 2021;Soni & Rasool, 2021;Soni & Malviya, 2021).

QuEST specific simulation features and environment setting
Quantum computations are highly complex, and their efficient simulation on the classical machine is not expected rather than the quantum machine. We performed the simulation to analyze the feasibility of quantum algorithm computations. A quantum machine with a significant amount of qubits still does not exist to realize quantum algorithms. Therefore, we used the QuEST library for the efficient and high-performance simulation of quantum circuits as a substitute for the quantum computer. This simulator is ideal, open-source and available with competent hybrid features such as multithreaded, distributed, and GPU accelerated to use classical hardware for the efficient simulation of quantum circuits. The QuEST simulator proved for the excellent scaling on multicore architectures. Hybrid features of this simulator realized in parallel execution support of OpenMP and MPI. We expect no compromise on simulating the quantum computations even realization is more accurate on a single node, shared memory and distributed systems. A QuES simulation prepares basic and multi-controlled quantum gates as either pure state (vectors) or mixed state (density matrix) under the presence of decoherence (Jones & Benjamin, 2018). This simulation is effective as it performs the quantum operations in the absence of quantum noise.
In their article, Jones & Benjamin (2018), presented the performance comparison of QuEST with the other simulators, and they justified that QuEST is effective because it speeds up simultaneous quantum operations by data parallelism with SIMD execution support. The GPU acceleration is possible through NVIDIA's CUDA to attain operational speedup and to facilitate parallelism in quantum specific scientific codes. This maintains exponential operations 2 n ð Þ as the pure quantum state over n-qubits quantum register represented as complex floating-point numbers with default double precision. The quantum multicore realization is the implicit phenomenon that is implemented through the QuEST simulator in the separate quantum execution environment. However, such realization is based on parallel execution of the task in the multithreaded environment over the multiple cores of the CPU (Jones & Benjamin, 2018). Conclusively, we used the QuEST for high-performance simulation of quantum circuits and effective implementation equivalent to quantum algorithms.
We perform the experiments by implementing our quantum algorithms locally on one node with the machine configuration as "Intel i7-7700HQ" processor (having four cores and eight threads) running at 2.80 GHz (having 2400 MHz clock frequency) and 8GB classical RAM (CRAM). We set the QuEST execution environment for either a single or multiple (three) quantum system, each of them contains a separate register with a set of qubits in a pure state to show simulation of our quantum algorithms on single and multicore architecture. The simulation features such as OpenMP is enabled, GPU acceleration is disabled and default double-precision size of 8 bytes is used for reading probability amplitudes; however, the hybrid simulation would be effective.

Description and encoding of biological dataset and patterns
For the simulation purpose, we used the gene sequence database of "Severe Acute Respiratory Syndrome Corona-Virus 2 SARS-CoV-2" for humans. A detailed dataset description and QuEST specific simulation codes are specified within subsection of Additional Information and Declarations entitled "Data and Simulation Codes Availability".
An idea of implementation is to assign each symbol of the alphabet set AE with the binary string of length log 2 AE j j qubits, and then to transform text database and pattern into binary encoded form. The nucleotide/gene/genome sequence database is preferred for validating our algorithms, so each DNA character of AE ¼ A; T; C; G f gis assigned with the log 2 4 ¼ 2 length binary string as AE ¼ 00; 01; 10; 11 f g (Faro & Lecroq, 2009;Soni & Rasool, 2021;Soni & Malviya, 2021). In contrast, the peptide sequences/protein databases with amino acid symbols set AE j j ¼ 20 are ignored here to avoid simulation specific restricted processing of long length binary strings log 2 AE j j ¼ 5 qubits, as this increases qubits requirement.
The subsets of gene sequence ðSARS À CoV À 2Þ is intentionally prepared, as per feasibility of simulation with the text file sizes of 128; 256; 512 f gcharacters. A QPU with the ANF circuit with varying length and as per needed size of QMEM to realize. However, based on ANF the QuEST simulation of QMEM is observed exponentially slow. The most important point to remember is justified here, that the ANF-based QMEM circuit allows several quantum operations with no increase in qubits requirement. In experimental results, we may observe some deviations and exceptions (if identified) due to implicit random increase in depth of Boolean functions as they are used to simulate QMEM. Further, we use this to perform other requisite quantum operations on the same ANF circuit. We used two implementations of Boolean oracle circuit for QEM % U Comp (Eq. 5). First, using log 2 AE j j sized ancilla qubits to store matching results of each index. Next, we use QuEST specific complex-matrix unitary to find a match and to negate the index for marking. Similarly, the simulation of GSO is realized as per Tables 4 and 8, however, QuEST specific multi-controlled qubit unitary is used to implement the phase inversion.
The QuEST simulator realizes exponential operations effectively by optimizing simulation performance on the classical machine. This simulator provides the log file of quantum assembly instructions (QASM) which help us to record the operations executed on quantum registers by quantum gates and to report execution time of specific quantum circuit during simulation (Jones & Benjamin, 2018;Malviya & Tiwari, 2020;Malviya & Tiwari, 2021;Soni & Malviya, 2021). A CRAM is allocated on demand, so its workspace area may contain several blocks of memory and may be available in compressed form. So, in addition, we used process explorer to measure the maximum workspace requirement of CRAM during the execution of a simulated algorithm.

QuEST specific algorithmic simulation results with observation
This section includes QuEST simulation with observation to map our theoreticalexperimental results of algorithms. The results are categorized separately for equal and unequal sized patterns. We noted the results in the tables as per the analysis cases m C ð Þ and m . C ð Þfor different text file sizes. A recorded execution log is mentioned in Tables 9 and 10. To prevent the overshooting problem of GSO we implemented exact and approximate quantum counting (QC) algorithms that can find the required number of GSO iterations. So, the observed results of QC and further error analysis are included from Tables 11-13 (for equal sized pattern) and from Tables 14-16 (for unequal sized pattern). The average search time with the memory requirement of the algorithm under QuEST simulation is noted in Tables 17 and 18. Analysis of the experimental log observed during QuEST simulation: For our algorithms EnQPBEA-MPM and EnQBCEA-MPM, Tables 9 and 10 are used to categorize the results between separate text file sizes 128; 256; 512 f gand analysis cases m C ð Þand m . C ð Þare formed for equalunequal sized multiple pattern set P ¼ P 1 ; P 2 ; P 3 ; P 4 ; P 5 ; P 6 f g of lengths 3; 3; 3; 3; 3; 3 f gand 2; 2; 3; 3; 4; 4 f g . A QPU with quantum cores C ¼ C 1 ; C 2 ; C 3 f gis considered for the separate execution of desired pattern search.
Þ to search for single pattern P of length 3 f g on C j j ¼ 1 i.e. single core to show the simulation of existing QPBE and QBCE algorithms. In this case, other cores are remaining idle. The case of Þ is considered for searching the desired pattern on individual quantum core. We noted the performance of our algorithms for the case Þ to realize their executions for large number of patterns (exactly doubled) on constant number of quantum cores. For these cases, we utilized QuEST specific log file that contains a record of standard QASM instructions. The log record for EnQPBEA and EnQBCEA algorithms are identified for searching, but in case of the EnQBCEA algorithm, the filtering log is additionally recorded. It keeps number of quantum gates needed during the simulation of the quantum algorithm or its equal quantum circuit. A universal quantum gates set H; X; R z ; C tqÀ1 Z; C tq X f g is noted in QASM log. We used to represent C tqÀ1 Z and C tq X as CZ and CX to save the text space in tables. The number of coded qubits is observed additionally during a simulation of algorithm within test log. In reference to Table 6, we simulated the EnQPBEA algorithm using workspace qubits. Instead of actual qubits n þ 2 Â Mlog 2 AE j j À Á þ 1 À Á , the n þ Mlog 2 AE j j þ 2 þ 2 À Á qubits used in the implementation. Here, all text substrings of size Mlog 2 AE j j are realized using ANF, and log 2 AE j j ¼ 2 workspace qubits store the parallel matching result of each index in superposition. Other two qubits are used as ancillary to support GSO operation. Our findings on qubits, for both the equal and unequal sized patterns, are observed the same as expectations. The simulation of EnQBCEA algorithm is efficiently coded with 2n þ tq ð Þqubits instead of the actual 2n þ 2 Â Mlog 2 AE j j À Á þ tq þ 1 À Á qubits mentioned in Table 6. We took 2n qubits for QAF filtering, and tq qubits to search on filtered indices. All substring of size Mlog 2 AE j j are realized using ANF and the pattern is loaded classically. For GSO operation, QuEST unitary complex-matrix is used to find a match and to negate the index for marking. The qubits are observed as the same as expectations for both equal and unequal sized patterns. We wished to show the implementation using QPU with C quantum cores; thus, the QuEST execution environment was initialized as either a single or multiple (three) quantum system containing a separate register set. We coded hybrid simulation to intentionally save qubits, such that, qubits requirement on any core should not exceed the limits of a classical machine. Especially for searching, the qubits needed by EnQPBEA is comparatively more than the EnQBCEA because of search is performed with original indices rather than filtered. A QAF takes 2n qubits to filter t indices, so, log 2 t ¼ tq search qubits may vary as per t value. The expansion of different text search space with reduced indices enhances search mechanism, but this would happen, when a value of t is found as too low as likely the value of log 2 N ¼ n.
The qubits needed for the searching increases in accordance with the size of the biological text sequence and in direct proportion to the varying length patterns. This phenomenon can be observed in the tables by analysing noted qubits for both equalunequal sized patterns and text size. A QuEST simulation of algorithms on quantum multicore architecture shows that quantum registers are separately allocated with a set of qubits in the pure state. We observed the quantum logic gates as implicitly realized under the QuEST simulation of algorithms. For EnQPBEA with equalunequal sized patterns running on any QCore c . The quantum gates are close proximate values to the gate observed during a single pattern search on a single quantum core. In same context, the number of quantum gates, noted on each QCore c for EnQBCEA, are approximately doubled than single core. Due to small-sized equal or unequal pattern lengths, the observed number of gates for both the algorithms are analysed in close proximity. However, there is a proportional increase in the gates as with the increase in text file sizes and for the varying length patterns. There exist, huge difference between the gates observation of EnQPBEA and EnQBCEA because the gates observed for EnQBCEA are combined for both filtering and searching. The size of filtered text eventually increases or decreases multiplicity of quantum gates during simulation.
In general, we observed that the simulation takes more quantum gates due to the realization of ANF and other requisite quantum operations. We distributed uniform workload on all cores under the multiple (three) quantum system containing a separate register set. Table 9 shows a case of m . C ð Þfor that the overlapping pattern P 2 ¼ TTT executed on core C 2 takes very less number of gates as due to the reduced depth of ANF circuit. However, we noted proportional increase in the gate counts as per the length and occurrences of search pattern. There is no increase in gate requirements because most of the quantum operations are coded under ANF and this actually saves the specific requirements of quantum gates.
To considering all file sizes, we observed the same growth in the gate counts of R z and C tq X with a gradual increase. A controlled phase flip gate C tqÀ1 Z is used to perform the phase inversion on the occurrence identification of pattern over the index. A subset of H; X f g gates are used as per necessity to realize QMEM or diffusion operator of GSO. Any exception other than that are always expected because of the quantum operations are applied over the random increase in depth of Boolean function which is realized in ANF such that tq n.  P ¼ P 1 ; P 2 ; P 3 ; P 4 ; P 5 ; P 6 f g of lengths 3; 3; 3; 3; 3; 3 f gand 2; 2; 3; 3; 4; 4 f g . A QPU with quantum cores C ¼ C 1 ; C 2 ; C 3 f gis considered for the separate execution of desired pattern search. We noted the results of equal sized pattern from Tables 11-13 and unequal sized pattern from Tables 14-16. In reference to the earlier discussions on Grover's quantum search, initially we implemented our algorithms by assuming that the t number of search solutions (either unique or multiple solution) are already known, and therefore, the GSO iterations were also coded in advance. The case of GSO overshooting is considered as t number of search solutions are unknown. However, it leads to the unknown number of GSO iterations and hence the probability of success would be vanishingly small. So, we handle this by implementing QC algorithm. To analyze our results, we implemented quantum counting (QC) (Brassard et al., 2002;Nielsen & Chuang, 2010) to estimate the t number of search solutions in advance. We obtained accurate value of t by Exact-QC and estimated value of t through Approx.-QC methods. We know that QC is an amplitude estimation method, therefore, additional quantum register is used with required precision qubits to store the exact or bifurcates the measurement result out of 100 iterations), and hence it is equivalently considered as 1,000 iterations. We define some requisite parameters which are evaluated for the error analysis purpose, out of 1,000 iterations, such as - (1)  In each of the 10 repeated executions, we coded 100 iterations for sufficient be valuations. If the number of iterations were selected too small % 25 iterations, then there would have been the chance of getting the No: of IMP in our evaluations. However, because of the sufficient iterations, we have not reported this case for any search pattern. Therefore, we assure that the likely indices are at least identified during the search phase of both EnQPBEA & EnQBCEA algorithms. We also justify the fact, that the increase in number of iterations also increases the accuracy of measuring all the likely indices. And it also reduces the possibility of pattern that may be incorrectly missed. Similarly, on taking too large number of iterations % 1;000 iterations, a possibility of getting No: of IMP will be removed completely, but the algorithm performance becomes worse than the classical equivalent algorithm.   noted for entire execution as the memory is shared among all cores. We used to realize Þ for the performance evaluation with large no. of patterns (exactly doubled), and these patterns are executed on the constant number of quantum cores. A Avg: ET was observed using C-Library based clockðÞ function call. It returns several clock ticks since the initiation of QuEST program execution. However, the clock ticks are dependent on processor architecture. So to note a time in seconds, we divide the clock ticks by CLOCKS_PER_SEC. This observation is noted through the test log. A CRAM workspace is observed explicitly by using process explorer to measure the maximum peak of the classical memory throughout the execution of the QuEST program. Our experiments for the pattern searching was repeated 20 times in a sequence to note their Avg: ET in seconds. The measured time includes the time of quantum superposition realized using ANF to simulate quantum operations in parallel. Both EnQPBEA and EnQBCEA are found exact for searching the pattern on target indices original or filtered text. The results tested on the dataset within QuEST simulations are here validated. Algorithms identify all pattern occurrences with high probability and in less time of execution. However, the search results of EnQBCEA are found optimal due to the search is performed on filtered space of size t rather than the original space of size N. Even on a single core, these results are optimized because of the same pattern is searched over the filtered text. The algorithms' performance observed in proportional increase with Avg: ET of searching, concerning the increase in text file sizes. We have stated earlier that our intentions are not to analyze the simulation efficiency due to performance restrictions on the classical machine. However, we ensure that for our text file sizes and patterns the time needed by a real quantum machine will be negligible. Average times noted for algorithms are specified explicitly for each core; but, due to parallel realization on the quantum multicore concept, we consider a maximum time taken by any core among C-QCore. Due to small-sized equal or unequal pattern lengths, the Avg: ET observed for both these algorithms are analyzed in close proximity. However, all the occurrences of each pattern are reported either within the original or filtered text sequence (see tables). For a case of m . C ð Þwe distributed uniform workload on all the quantum cores under the multiple (three) quantum system containing a separate register set. Tables 17 and  18 shows proportional increase in the Avg: ET values as per the increase in file sizes. And in the same case, Avg: ET of the EnQBCEA algorithm is found optimal than the EnQPBEA algorithm. The search time is dependent on the size of the text sequence and the number of occurrences to report for each pattern; therefore, we consider slight deviations. For all file sizes, and the equal or unequal sized patterns, we noted the Avg: ET on individual cores. Here, the time is deviating in accordance with the size and frequency of pattern occurrences within the text sequence. Some exceptions are considered here because of implicit random increase in depth of Boolean functions used in ANF based hybrid simulation. Recall, such an implementation aspect gives us privilege to save the number of qubits required for a simulation of algorithms. We restate that algorithmic performance on simulation may affect due to the scaling factors associated with qubits; thus, this also increases the workspace requirement of CRAM and processing time with an exponential increase. Memory requirement is also a crucial cum critical factor that may limit the execution of QuEST specific simulated program. So, we prepared a very small-sized data processing requirement of text and pattern and observed the utilization of the CRAM workspace (in KiB) throughout the execution of QuEST program. In reference to Avg: ET, we noted workspace utilization of CRAM. Therefore, the specified workspace in Tables 17 and 18 shows the average of repetitive experiments that were performed 20 times. A CRAM consumption is observed separately with respect to single pattern on single core. We noted the combined workspace for the cases m ¼ C ð Þand m . C ð Þto search for multiple string patterns, each one runs on separate quantum core. This is observed throughout the execution of algorithms that, the CRAM consumption of a single core is less on comparing with multiple quantum cores sharing. We expect this under QuEST simulation because the execution environment was set to a single quantum system with assigned registers to realize a single quantum core. For EnQPBEA and EnQBCEA, and m ¼ C ð Þcase, the execution environment of QuEST was set to multiple quantum systems with their separate registers of needed qubits to realize multiple quantum cores as a simulation of physical quantum multicore machine. So, cross-comparison assures that CRAM workspace is usually more. Similarly, for m . C ð Þ case, we are observing the expected increase in CRAM workspace as each quantum system can simulate the individual quantum core to execute EnQPBEA and EnQBCEA algorithms twice to complete the execution. A CRAM workspace will gradually increase with respect to the text file sizes. Thus, this proportional phenomenon may restrict the classical simulation of quantum behaviour for processing the large sequence databases, usually of at least exponential in size. As well as, to process a large number of multiple string pattern m on the small number of available quantum cores C, there would be an eventual increase in the size of CRAM utilization. For all the cases m , C Þour Tables 17 and 18 shows the proportional increase in the CRAM workspace values as per the increase in file sizes. And for same cases, CRAM workspace of the EnQBCEA algorithm is found optimal than the EnQPBEA algorithm. Since we observed that the CRAM utilization of EnQBCEA for their equalunequal sized patterns are found in the close proximate regions. However, there exists much more difference in the CRAM consumptions of EnQPBEA due to the reported pattern occurrences over the original text and implicit random increase in depth of Boolean functions used in ANF.

EnQBCEA-MPM
* Performs multiple patterns search on filtered text in effectively as its design utilizes the multiple cores to search for P k on shared QMEM. * All exact occurrence of each P k are found through QCore c of QPU having C cores in O m=C ð Þ ffiffi t p À Á . * Exact matching is preferred over large text that may contain frequent pattern occurrence, thus, significant to process a biological sequence. * Search mechanism is effective as because of finding patterns over the reduced size text, instead original. * This algorithm is remarkable over all classical and especially existing quantum multi-pattern methods. * Each core assures to report pattern match with Pr QCore c ð Þ!t k 0 =t k over individual filtered text indices. * The probability of search results at k th core QCore c will depend on relativeness of individual filtered indices to the occurrences of pattern present in filtered text for each P k . * Bothe filtering and search time is still dependent on c th core QCore c , so, core running for unequal sized pattern with more filtering outcome and frequent search occurrence may degrades algorithm performance. * Due to algorithmic filtering, the qubits requirement increases with m=C ð Þ, thus, restricts simulation. * Performance on each QCore c is affected with unequal length pattern and its formation over large AE j j. * O 2 tq ð Þ tq n ANF circuit depth slows down simulation, and thus, it affects individual QCore c output. Our observations on QuEST specific simulation mainly involves the critical factor of qubits requirement for simulating quantum algorithm. It may cause exhaustive use of CRAM, and the classical CPU computation time is also increased with the at least exponential factor to process the circuit depth of quantum algorithms. However, we implemented quantum algorithms with hybrid simulation by effectively utilizing QuEST performance with several optimizations.

Proposed algorithmic applications to process biological sequences
This section defines several applications of our proposed quantum algorithms related to search multiple patterns within the biological sequence databases. Table 19 specifies the applicability of proposed algorithms with respect to significant characteristics and performance restrictions.
In Table 19, we summarize the significant characteristics and performance restrictions of the presented algorithms. We highlighted main points with respect to the contextual interpretation of biological text sequences and their standardized databases.
To have more understanding of the algorithms, we direct the reader to specific applications (Sheik, Aggarwal & Anindya Poddar, 2004;Basel, 2006;Choo, 2006;Kalsi, Peltola & Tarhio, 2008;Fredriksson, 2009;Charalampos, Panagiotis & Konstantinos, 2011;Rivals, Salmela & Tarhio, 2011;Faro & Lecroq, 2013;Jiang, Zhang & Zhang, 2013;Singh, 2015;Zhang et al., 2015;Tahir, Sardaraz & Ikram, 2017;Hakak & Kamsin, 2019;Neamatollahi, 2020;Soni & Rasool, 2021;Soni & Malviya, 2021;Raja & Srinivasulu Reddy, 2019). These articles are related to process biological sequences and their databases. In general, we say that the presented algorithms to process biological sequences, are influenced by three parameters such as alphabet size, pattern length and the size of the text. These parameters may affect the performance of the algorithmic simulation. However, their realization of quantum machines would be effective in specific biological applications. The probability of search results is based on the relativity between pattern occurrences and the size of the text database (original or filtered). Therefore, the search results are obtained in the best time with at least half probability, and for more frequent pattern occurrences, the results are obtained in the worst time with very high probability. In multiple pattern processing, there exist some variations in the performance of algorithm. It is because of processing equal or unequal size patterns. The simulation over a very large-sized biological sequence database is not feasible for simulation because of higher qubits requirement; therefore, a subset of the database is searched for a pattern as per the feasibility. There is no such restriction on real quantum machines as they can realize effective processing.

CONCLUSION AND FUTURE WORK
In this work, we enhanced the existing quantum pattern matching methods QPBE and QBCE to search multiple patterns in parallel by using QPU with C cores accessing text on