<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jcc
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Computer and Communications
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    2327-5219
   </issn>
   <issn publication-format="print">
    2327-5227
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jcc.2025.132008
   </article-id>
   <article-id pub-id-type="publisher-id">
    jcc-140768
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Numbering and Generating Quantum Algorithms
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Mohamed A.
      </surname>
      <given-names>
       El-Dosuky
      </given-names>
     </name> 
     <xref ref-type="aff" rid="aff1"> 
      <sup>1</sup>
     </xref> 
     <xref ref-type="aff" rid="aff2"> 
      <sup>2</sup>
     </xref>
    </contrib>
   </contrib-group> 
   <aff id="aff1">
    <addr-line>
     aFaculty of Computers and Information, Mansoura University, Mansoura, Egypt
    </addr-line> 
   </aff> 
   <aff id="aff2">
    <addr-line>
     aArab East Colleges, Riyadh, Saudi Arabia
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     11
    </day> 
    <month>
     02
    </month>
    <year>
     2025
    </year>
   </pub-date> 
   <volume>
    13
   </volume> 
   <issue>
    02
   </issue>
   <fpage>
    126
   </fpage>
   <lpage>
    141
   </lpage>
   <history>
    <date date-type="received">
     <day>
      22,
     </day>
     <month>
      January
     </month>
     <year>
      2025
     </year>
    </date>
    <date date-type="published">
     <day>
      21,
     </day>
     <month>
      January
     </month>
     <year>
      2025
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      21,
     </day>
     <month>
      February
     </month>
     <year>
      2025
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    Quantum computing offers unprecedented computational power, enabling simultaneous computations beyond traditional computers. Quantum computers differ significantly from classical computers, necessitating a distinct approach to algorithm design, which involves taming quantum mechanical phenomena. This paper extends the numbering of computable programs to be applied in the quantum computing context. Numbering computable programs is a theoretical computer science concept that assigns unique numbers to individual programs or algorithms. Common methods include Gödel numbering which encodes programs as strings of symbols or characters, often used in formal systems and mathematical logic. Based on the proposed numbering approach, this paper presents a mechanism to explore the set of possible quantum algorithms. The proposed approach is able to construct useful circuits such as Quantum Key Distribution BB84 protocol, which enables sender and receiver to establish a secure cryptographic key via a quantum channel. The proposed approach facilitates the process of exploring and constructing quantum algorithms.
   </abstract>
   <kwd-group> 
    <kwd>
     Quantum Algorithms
    </kwd> 
    <kwd>
      Numbering Computable Programs
    </kwd> 
    <kwd>
      Quantum Key Distribution
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>Quantum computing, utilizing quantum superposition, offers unprecedented computational power, enabling simultaneous computations beyond traditional computers <xref ref-type="bibr" rid="scirp.140768-1">
     [1]
    </xref>. This power opens up applications like drug discovery <xref ref-type="bibr" rid="scirp.140768-2">
     [2]
    </xref> and accelerated artificial intelligence <xref ref-type="bibr" rid="scirp.140768-3">
     [3]
    </xref>.</p>
   <p>Quantum software architecture is the design and structure of quantum computing systems, encompassing the organization of components, information flow, and framework for developing and deploying applications <xref ref-type="bibr" rid="scirp.140768-4">
     [4]
    </xref>. Key elements include quantum hardware abstraction <xref ref-type="bibr" rid="scirp.140768-5">
     [5]
    </xref>, a quantum programming language <xref ref-type="bibr" rid="scirp.140768-6">
     [6]
    </xref>, quantum algorithms <xref ref-type="bibr" rid="scirp.140768-7">
     [7]
    </xref>, quantum error correction <xref ref-type="bibr" rid="scirp.140768-8">
     [8]
    </xref>, optimizers <xref ref-type="bibr" rid="scirp.140768-9">
     [9]
    </xref>, quantum simulators <xref ref-type="bibr" rid="scirp.140768-10">
     [10]
    </xref>, and cloud-based quantum computing services <xref ref-type="bibr" rid="scirp.140768-11">
     [11]
    </xref>. Quantum hardware abstraction provides a unified interface for interacting with quantum devices, while quantum programming languages provide necessary abstractions and tools. Quantum algorithms may also be included in libraries or modules, enabling developers to leverage existing quantum algorithms for various applications. Integration between classical and quantum computing is crucial for realizing hybrid quantum-classical algorithms <xref ref-type="bibr" rid="scirp.140768-12">
     [12]
    </xref>.</p>
   <p>Quantum programming languages and frameworks are specialized tools for writing quantum algorithms and working with quantum computers <xref ref-type="bibr" rid="scirp.140768-6">
     [6]
    </xref>. Popular examples include Qiskit, Cirq, Quil, ProjectQ, and Q#. Qiskit is an open-source framework developed by IBM, providing a Python-based interface for working with quantum circuits, simulators, and devices. Cirq is a flexible framework by Google, while Quil is hardware-agnostic. ProjectQ supports multiple quantum backends. Q#, pronounced Q sharp, is a high-level language developed by Microsoft for writing quantum algorithms and interacting with quantum simulators and hardware. QASM is proposed to be an open quantum assembly language <xref ref-type="bibr" rid="scirp.140768-13">
     [13]
    </xref>. Quipper is a scalable quantum programming language <xref ref-type="bibr" rid="scirp.140768-14">
     [14]
    </xref>. Recent advancements in software framework development aim to compile quantum algorithms from high-level descriptions to physical gates for fault-tolerant quantum computers <xref ref-type="bibr" rid="scirp.140768-15">
     [15]
    </xref>.</p>
   <p>
    <xref ref-type="table" rid="tableTables 1">
     Tables 1
    </xref>-<xref ref-type="bibr" rid="scirp.140768-#t3">
     3
    </xref> list the building blocks of quantum computing, known as quantum gates. Beside the name, each gate has a symbol and a matrix notation. Controlled-X is known as CNOT gate. SWAP gate can be decomposed of 3 CNOT gates.</p>
   <table-wrap id="table1">
    <label>
     <xref ref-type="table" rid="table1">
      Table 1
     </xref></label>
    <caption>
     <title>
      <xref ref-type="bibr" rid="scirp.140768-"></xref>Table 1. Quantum gates operating on 1 qubit.</title>
    </caption>
    <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
      <td class="custom-bottom-td custom-top-td acenter" width="20.88%"><p style="text-align:center">Gate Name</p></td> 
      <td class="custom-bottom-td custom-top-td acenter" width="33.00%"><p style="text-align:center">Gate Symbol</p></td> 
      <td class="custom-bottom-td custom-top-td acenter" width="46.13%"><p style="text-align:center">Matrix Representation</p></td> 
     </tr> 
     <tr> 
      <td class="custom-top-td acenter" width="20.88%"><p style="text-align:center">Pauli-X</p></td> 
      <td class="custom-top-td acenter" width="33.00%"><p style="text-align:center">X</p></td> 
      <td class="custom-top-td acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Pauli-Y</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center">Y</p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  i 
                </mi> 
               </mrow> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mi>
                 i 
               </mi> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Pauli-Z</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center">Z</p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Hadamard</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center">H</p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mfrac> 
           <mn>
             1 
           </mn> 
           <mrow> 
            <msqrt> 
             <mn>
               2 
             </mn> 
            </msqrt> 
           </mrow> 
          </mfrac> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Rotation-X</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             R 
           </mi> 
           <mi>
             x 
           </mi> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             θ 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mrow> 
                <mi>
                  cos 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  i 
                </mi> 
                <mi>
                  sin 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  i 
                </mi> 
                <mi>
                  sin 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mi>
                  cos 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Rotation-Y</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             R 
           </mi> 
           <mi>
             y 
           </mi> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             θ 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mrow> 
                <mi>
                  cos 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  sin 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mrow> 
                <mi>
                  sin 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mi>
                  cos 
                </mi> 
                <mrow> 
                 <mo>
                   ( 
                 </mo> 
                 <mrow> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                 <mo>
                   ) 
                 </mo> 
                </mrow> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Rotation-Z</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <msub> 
           <mi>
             R 
           </mi> 
           <mi>
             z 
           </mi> 
          </msub> 
          <mrow> 
           <mo>
             ( 
           </mo> 
           <mi>
             θ 
           </mi> 
           <mo>
             ) 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mrow> 
                <msup> 
                 <mtext>
                   e 
                 </mtext> 
                 <mrow> 
                  <mo>
                    − 
                  </mo> 
                  <mi>
                    i 
                  </mi> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                </msup> 
               </mrow> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <msup> 
                 <mtext>
                   e 
                 </mtext> 
                 <mrow> 
                  <mi>
                    i 
                  </mi> 
                  <mfrac> 
                   <mi>
                     θ 
                   </mi> 
                   <mn>
                     2 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                </msup> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">S</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center">S</p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mi>
                 i 
               </mi> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">T</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center">T</p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <msup> 
                 <mtext>
                   e 
                 </mtext> 
                 <mrow> 
                  <mi>
                    i 
                  </mi> 
                  <mfrac> 
                   <mi>
                     π 
                   </mi> 
                   <mn>
                     4 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                </msup> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">R4</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center">R4</p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <msup> 
                 <mtext>
                   e 
                 </mtext> 
                 <mrow> 
                  <mi>
                    i 
                  </mi> 
                  <mfrac> 
                   <mi>
                     π 
                   </mi> 
                   <mn>
                     8 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                </msup> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="20.88%"><p style="text-align:center">Measure</p></td> 
      <td class="acenter" width="33.00%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId42.jpeg?20250224022938" /></p></p></td> 
      <td class="acenter" width="46.13%"><p style="text-align:center">Qubit to Bit</p></td> 
     </tr> 
    </table>
   </table-wrap>
   <table-wrap id="table2">
    <label>
     <xref ref-type="table" rid="table2">
      Table 2
     </xref></label>
    <caption>
     <title>
      <xref ref-type="bibr" rid="scirp.140768-"></xref>Table 2. Quantum gates operating on 2 qubits.</title>
    </caption>
    <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
      <td class="custom-bottom-td custom-top-td acenter" width="22.52%"><p style="text-align:center">Gate Name</p></td> 
      <td class="custom-bottom-td custom-top-td acenter" width="44.86%"><p style="text-align:center">Gate Symbol</p></td> 
      <td class="custom-bottom-td custom-top-td acenter" width="32.62%"><p style="text-align:center">Matrix Representation</p></td> 
     </tr> 
     <tr> 
      <td class="custom-top-td acenter" width="22.52%"><p style="text-align:center">CNOT</p></td> 
      <td class="custom-top-td acenter" width="44.86%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId43.jpeg?20250224022938" /></p></p></td> 
      <td class="custom-top-td acenter" width="32.62%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="22.52%"><p style="text-align:center">SWAP</p></td> 
      <td class="acenter" width="44.86%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId46.jpeg?20250224022938" /></p></p></td> 
      <td class="acenter" width="32.62%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="22.52%"><p style="text-align:center">Controlled-Y</p></td> 
      <td class="acenter" width="44.86%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId49.jpeg?20250224022938" /></p></p></td> 
      <td class="acenter" width="32.62%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mi>
                  i 
                </mi> 
               </mrow> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mi>
                 i 
               </mi> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="22.52%"><p style="text-align:center">Controlled-Z</p></td> 
      <td class="acenter" width="44.86%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId52.jpeg?20250224022938" /></p></p></td> 
      <td class="acenter" width="32.62%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <mo>
                  − 
                </mo> 
                <mn>
                  1 
                </mn> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="22.52%"><p style="text-align:center">Controlled-S</p></td> 
      <td class="acenter" width="44.86%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId55.jpeg?20250224022938" /></p></p></td> 
      <td class="acenter" width="32.62%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mi>
                 i 
               </mi> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
     <tr> 
      <td class="acenter" width="22.52%"><p style="text-align:center">Controlled-T</p></td> 
      <td class="acenter" width="44.86%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId58.jpeg?20250224022938" /></p></p></td> 
      <td class="acenter" width="32.62%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mrow> 
                <msup> 
                 <mtext>
                   e 
                 </mtext> 
                 <mrow> 
                  <mi>
                    i 
                  </mi> 
                  <mfrac> 
                   <mi>
                     π 
                   </mi> 
                   <mn>
                     4 
                   </mn> 
                  </mfrac> 
                 </mrow> 
                </msup> 
               </mrow> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
    </table>
   </table-wrap>
   <table-wrap id="table3">
    <label>
     <xref ref-type="table" rid="table3">
      Table 3
     </xref></label>
    <caption>
     <title>
      <xref ref-type="bibr" rid="scirp.140768-"></xref>Table 3. Quantum gates operating on 3 qubits.</title>
    </caption>
    <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
     <tr> 
      <td class="custom-bottom-td acenter" width="23.00%"><p style="text-align:center">Gate Name</p></td> 
      <td class="custom-bottom-td acenter" width="32.56%"><p style="text-align:center">Gate Symbol</p></td> 
      <td class="custom-bottom-td acenter" width="44.44%"><p style="text-align:center">Matrix Representation</p></td> 
     </tr> 
     <tr> 
      <td class="custom-top-td acenter" width="23.00%"><p style="text-align:center">Toffoli</p></td> 
      <td class="custom-top-td acenter" width="32.56%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId61.jpeg?20250224022938" /></p></p></td> 
      <td class="custom-top-td acenter" width="44.44%"><p style="text-align:center"> 
        <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
          <mrow> 
           <mo>
             [ 
           </mo> 
           <mrow> 
            <mtable> 
             <mtr> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
             </mtr> 
             <mtr> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 1 
               </mn> 
              </mtd> 
              <mtd> 
               <mn>
                 0 
               </mn> 
              </mtd> 
             </mtr> 
            </mtable> 
           </mrow> 
           <mo>
             ] 
           </mo> 
          </mrow> 
         </mrow> 
        </math></p></td> 
     </tr> 
    </table>
   </table-wrap>
   <p>The Gödel numbering is a widely used numbering scheme for computable functions, assigning a unique natural number to each function <xref ref-type="bibr" rid="scirp.140768-16">
     [16]
    </xref>. This method involves encoding the description of a function as a string and converting it into a number. The process involves creating a list of possible symbols, assigning a unique number to each symbol, and encoding the description of a function as a string.</p>
   <p>This paper extends the numbering of programs as presented in <xref ref-type="bibr" rid="scirp.140768-17">
     [17]
    </xref> to be applied in the quantum computing context. Then and based on the proposed numbering approach, this paper presents a mechanism to explore the set of possible quantum algorithms in two ways, namely the forward way and the backward way. Finally, the paper validates the proposed numbering approach.</p>
   <p>The contributions of this paper can be listed as follows:</p>
   <p>The rest of this paper is structured as follows. Section 2 presents two of the most reputable quantum algorithms to show a glimpse of the specific nature of quantum algorithms as compared to classical ones. In Section 3, the proposed numbering approach is provided. Section 4 contains the conclusion and recommendations for further work.</p>
  </sec><sec id="s2">
   <title>2. Quantum Algorithms</title>
   <sec id="s2_1">
    <title>2.1. Grover’s Quantum Search Algorithm</title>
    <p>Grover’s quantum search algorithm, proposed by Lov Grover in 1996 <xref ref-type="bibr" rid="scirp.140768-18">
      [18]
     </xref>, is a quantum algorithm for searching specific items in unsorted databases. It uses quantum operations, such as the Hadamard transform and phase inversion, to amplify the target item’s amplitude. The algorithm runtime is proportional to the square root of the database size, faster than classical algorithms. However, it has limitations, such as a quadratic speedup and requires a quantum computer.</p>
    <p>First, we define the initial state of the quantum system as:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            0 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mrow> 
         <msqrt> 
          <mi>
            N 
          </mi> 
         </msqrt> 
        </mrow> 
       </mfrac> 
       <munderover> 
        <mstyle mathsize="140%" displaystyle="true"> 
         <mo>
           ∑ 
         </mo> 
        </mstyle> 
        <mrow> 
         <mi>
           x 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mrow> 
         <mi>
           N 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </munderover> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(1)</p>
    <p>where N is the size of the database and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math> represents the state of the quantum system corresponding to the item 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        x 
      </mi> 
     </math> in the database.</p>
    <p>Next, we define the quantum oracle that marks the target item as:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          ω 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mo>
             − 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mrow> 
         <mi>
           f 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            x 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(2)</p>
    <p>where 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math> if 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        x 
      </mi> 
     </math> is the target item and 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math> otherwise.</p>
    <p>We then apply the Grover iteration, which consists of two steps:</p>
    <p>Apply the quantum oracle:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          ω 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            0 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(3)</p>
    <p>Apply the Grover diffusion operator:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          s 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(4)</p>
    <p>where the Grover diffusion operator is defined as:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          s 
        </mi> 
       </msub> 
       <mo>
         = 
       </mo> 
       <mn>
         2 
       </mn> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            0 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mrow> 
        <mo>
          〈 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            ψ 
          </mi> 
          <mn>
            0 
          </mn> 
         </msub> 
        </mrow> 
        <mo>
          | 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <mi>
         I 
       </mi> 
      </mrow> 
     </math>(5)</p>
    <p>and I is the identity operator.</p>
    <p>The Grover iteration is repeated k times, where k is approximately equal to:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         k 
       </mi> 
       <mo>
         ≈ 
       </mo> 
       <mfrac> 
        <mi>
          π 
        </mi> 
        <mn>
          4 
        </mn> 
       </mfrac> 
       <msqrt> 
        <mi>
          N 
        </mi> 
       </msqrt> 
      </mrow> 
     </math>(6)</p>
    <p>After k iterations, the quantum system is measured, and the target item is found with high probability.</p>
    <p>Shor’s quantum algorithm, proposed by Peter Shor in 1994 <xref ref-type="bibr" rid="scirp.140768-19">
      [19]
     </xref>, efficiently factored large composite numbers into prime factors using quantum modular exponentiation. The algorithm uses a random number a between 1 and N − 1, and a quantum circuit constructed using quantum Fourier transform and modular exponentiation. The runtime is 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         O 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msup> 
          <mrow> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mrow> 
             <mi>
               log 
             </mi> 
             <mi>
               N 
             </mi> 
            </mrow> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mn>
            3 
          </mn> 
         </msup> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, faster than classical algorithms but requires a large number of qubits.</p>
    <p>Here are some of the key equations involved in the algorithm:</p>
    <p>The quantum Fourier transform is used to convert the period finding problem into a phase estimation problem. The quantum Fourier transform of a state 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math> is defined as:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         ℱ 
       </mi> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mrow> 
         <msqrt> 
          <mi>
            N 
          </mi> 
         </msqrt> 
        </mrow> 
       </mfrac> 
       <munderover> 
        <mstyle mathsize="140%" displaystyle="true"> 
         <mo>
           ∑ 
         </mo> 
        </mstyle> 
        <mrow> 
         <mi>
           y 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mrow> 
         <mi>
           N 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </munderover> 
       <mtext>
           
       </mtext> 
       <msup> 
        <mtext>
          e 
        </mtext> 
        <mrow> 
         <mrow> 
          <mrow> 
           <mn>
             2 
           </mn> 
           <mi>
             π 
           </mi> 
           <mi>
             i 
           </mi> 
           <mi>
             x 
           </mi> 
           <mi>
             y 
           </mi> 
          </mrow> 
          <mo>
            / 
          </mo> 
          <mi>
            N 
          </mi> 
         </mrow> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(7)</p>
    <p>where i is the imaginary unit and N is the size of the quantum register.</p>
    <p>The quantum modular exponentiation is used to compute 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          a 
        </mi> 
        <mi>
          x 
        </mi> 
       </msup> 
       <mi>
         mod 
       </mi> 
       <mi>
         N 
       </mi> 
      </mrow> 
     </math> efficiently using a quantum computer. It is defined as:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          f 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <mi>
           y 
         </mi> 
         <mo>
           ⊕ 
         </mo> 
         <mi>
           f 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            x 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(8)</p>
    <p>where 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mi>
          a 
        </mi> 
        <mi>
          x 
        </mi> 
       </msup> 
       <mi>
         mod 
       </mi> 
       <mi>
         N 
       </mi> 
      </mrow> 
     </math> and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mo>
        ⊕ 
      </mo> 
     </math> represents bitwise addition modulo 2.</p>
    <p>The phase estimation algorithm is used to estimate the phase of the eigenvalue of the unitary operator 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          f 
        </mi> 
       </msub> 
      </mrow> 
     </math>. It is based on the application of the quantum Fourier transform to a superposition of eigenstates of 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          f 
        </mi> 
       </msub> 
      </mrow> 
     </math>:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mi>
          ψ 
        </mi> 
        <mo>
          〉 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mrow> 
         <msqrt> 
          <mi>
            r 
          </mi> 
         </msqrt> 
        </mrow> 
       </mfrac> 
       <munderover> 
        <mstyle mathsize="140%" displaystyle="true"> 
         <mo>
           ∑ 
         </mo> 
        </mstyle> 
        <mrow> 
         <mi>
           j 
         </mi> 
         <mo>
           = 
         </mo> 
         <mn>
           0 
         </mn> 
        </mrow> 
        <mrow> 
         <mi>
           r 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </munderover> 
       <mrow> 
        <mo>
          | 
        </mo> 
        <mrow> 
         <msup> 
          <mi>
            u 
          </mi> 
          <mi>
            j 
          </mi> 
         </msup> 
        </mrow> 
        <mo>
          〉 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(9)</p>
    <p>where u is the eigenvector of 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          U 
        </mi> 
        <mi>
          f 
        </mi> 
       </msub> 
      </mrow> 
     </math> corresponding to the eigenvalue 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mtext>
          e 
        </mtext> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mi>
           π 
         </mi> 
         <mi>
           i 
         </mi> 
         <mi>
           θ 
         </mi> 
        </mrow> 
       </msup> 
      </mrow> 
     </math>.</p>
    <p>The period r of the function 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         f 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mi>
          a 
        </mi> 
        <mi>
          x 
        </mi> 
       </msup> 
       <mi>
         mod 
       </mi> 
       <mi>
         N 
       </mi> 
      </mrow> 
     </math> can be obtained from the phase estimate using continued fractions:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         θ 
       </mi> 
       <mo>
         ≈ 
       </mo> 
       <mfrac> 
        <mi>
          x 
        </mi> 
        <mi>
          q 
        </mi> 
       </mfrac> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          [ 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           ; 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            a 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ] 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(10)</p>
    <p>where q is a power of 2 and the coefficients 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          a 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
      </mrow> 
     </math> are obtained from the convergents of the continued fraction expansion of x/q.</p>
    <p>Once the period r is obtained, N can be factored using classical methods. The factors are given by:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         N 
       </mi> 
       <mo>
         = 
       </mo> 
       <mtext>
         gcd 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msup> 
          <mi>
            a 
          </mi> 
          <mrow> 
           <mrow> 
            <mi>
              r 
            </mi> 
            <mo>
              / 
            </mo> 
            <mn>
              2 
            </mn> 
           </mrow> 
          </mrow> 
         </msup> 
         <mo>
           ± 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           N 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         × 
       </mo> 
       <mtext>
         gcd 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msup> 
          <mi>
            a 
          </mi> 
          <mrow> 
           <mrow> 
            <mi>
              r 
            </mi> 
            <mo>
              / 
            </mo> 
            <mn>
              2 
            </mn> 
           </mrow> 
          </mrow> 
         </msup> 
         <mo>
           ∓ 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           N 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(11)</p>
    <p>where gcd denotes the greatest common divisor.</p>
   </sec>
  </sec><sec id="s3">
   <title>3. Proposed Numbering Approach</title>
   <sec id="s3_1">
    <title>3.1. Numbering the Set of Quantum Gates</title>
    <p>To prove that the set of quantum gates, denoted by 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
        Q 
      </mi> 
     </math>, is effectively denumerable, we need to show that there exists a bijective mapping from the set of quantum gates to the set of natural numbers. In other words, we need to show that we can assign a unique natural number to each quantum gate. The set of quantum gates typically consist of a finite number of gates, such as H, X, Y, Z, CNOT, etc. Each gate can be uniquely identified by its name and the qubits it operates on. To establish a bijective mapping, we can assign a unique natural number to each possible combination of gate name and qubits.</p>
    <p>For numbering the X gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           X 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         0 
       </mn> 
      </mrow> 
     </math>(12)</p>
    <p>For numbering the Y gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           Y 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math>(13)</p>
    <p>For numbering the Z gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           Z 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         2 
       </mn> 
      </mrow> 
     </math>(14)</p>
    <p>For numbering the H gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           H 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         3 
       </mn> 
      </mrow> 
     </math>(15)</p>
    <p>For numbering the S gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           S 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         4 
       </mn> 
      </mrow> 
     </math>(16)</p>
    <p>For numbering the T gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           T 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         5 
       </mn> 
      </mrow> 
     </math>(17)</p>
    <p>For numbering the R4 gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           R 
         </mi> 
         <mn>
           4 
         </mn> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         6 
       </mn> 
      </mrow> 
     </math>(18)</p>
    <p>For numbering the Measure gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           M 
         </mi> 
         <mi>
           e 
         </mi> 
         <mi>
           a 
         </mi> 
         <mi>
           s 
         </mi> 
         <mi>
           u 
         </mi> 
         <mi>
           r 
         </mi> 
         <mi>
           e 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            n 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         7 
       </mn> 
      </mrow> 
     </math>(19)</p>
    <p>For numbering the 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mi>
          x 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          θ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mi>
            x 
          </mi> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             n 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             θ 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           θ 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         8 
       </mn> 
      </mrow> 
     </math>(20)</p>
    <p>For numbering the 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mi>
          y 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          θ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mi>
            y 
          </mi> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             n 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             θ 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           θ 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         9 
       </mn> 
      </mrow> 
     </math>(21)</p>
    <p>For numbering the 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          R 
        </mi> 
        <mi>
          z 
        </mi> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          θ 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            R 
          </mi> 
          <mi>
            z 
          </mi> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             n 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             θ 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           θ 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         10 
       </mn> 
      </mrow> 
     </math>(22)</p>
    <p>For numbering the CNOT gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           CNOT 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         11 
       </mn> 
      </mrow> 
     </math>(23)</p>
    <p>For numbering the SWAP gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           SWAP 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         12 
       </mn> 
      </mrow> 
     </math>(24)</p>
    <p>For numbering the Controlled-Y gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           CY 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         13 
       </mn> 
      </mrow> 
     </math>(25)</p>
    <p>For numbering the Controlled-Z gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           CZ 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         14 
       </mn> 
      </mrow> 
     </math>(26)</p>
    <p>For numbering the Controlled-S gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           CS 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         15 
       </mn> 
      </mrow> 
     </math>(27)</p>
    <p>For numbering the Controlled-T gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           CT 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         16 
       </mn> 
      </mrow> 
     </math>(28)</p>
    <p>For numbering the Toffoli gate:</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           Toffoli 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             k 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             m 
           </mi> 
           <mo>
             , 
           </mo> 
           <mi>
             n 
           </mi> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mi>
         ζ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           m 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         17 
       </mn> 
      </mrow> 
     </math>(29)</p>
    <p>where</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           m 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mi>
          m 
        </mi> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mi>
           n 
         </mi> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math>(30)</p>
    <p>and</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         ζ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           m 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           Π 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             k 
           </mi> 
           <mo>
             − 
           </mo> 
           <mn>
             1 
           </mn> 
           <mo>
             , 
           </mo> 
           <mi>
             m 
           </mi> 
           <mo>
             − 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(31)</p>
    <p>To find 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          β 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, find u and r such that 
     <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         q 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mi>
         u 
       </mi> 
       <mo>
         + 
       </mo> 
       <mi>
         r 
       </mi> 
      </mrow> 
     </math> with 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <mi>
         r 
       </mi> 
       <mo>
         &lt; 
       </mo> 
       <mn>
         19 
       </mn> 
      </mrow> 
     </math>. This value of r indicates which kind of gate 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          β 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math> is.</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         if 
       </mtext> 
       <mtext>
           
       </mtext> 
       <mi>
         r 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         0 
       </mn> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mtext>
         then 
       </mtext> 
       <mtext>
           
       </mtext> 
       <msup> 
        <mi>
          β 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         X 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           u 
         </mi> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(32)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         if 
       </mtext> 
       <mtext>
           
       </mtext> 
       <mi>
         r 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mtext>
         then 
       </mtext> 
       <mtext>
           
       </mtext> 
       <msup> 
        <mi>
          β 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         Y 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           u 
         </mi> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(33)</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mo>
        ⋮ 
      </mo> 
     </math></p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         if 
       </mtext> 
       <mtext>
           
       </mtext> 
       <mi>
         r 
       </mi> 
       <mo>
         = 
       </mo> 
       <mn>
         17 
       </mn> 
       <mo>
         , 
       </mo> 
       <mtext>
           
       </mtext> 
       <mtext>
         then 
       </mtext> 
       <mtext>
           
       </mtext> 
       <msup> 
        <mi>
          β 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mtext>
         Toffoli 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           m 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(34)</p>
    <p>where</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           k 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           m 
         </mi> 
         <mo>
           , 
         </mo> 
         <mi>
           n 
         </mi> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mi>
          ζ 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          u 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(35)</p>
    <p>and</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          ζ 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mtext>
            Π 
          </mtext> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mtext>
              Π 
            </mtext> 
            <mn>
              1 
            </mn> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              q 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mtext>
            Π 
          </mtext> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mtext>
              Π 
            </mtext> 
            <mn>
              1 
            </mn> 
           </msub> 
           <mrow> 
            <mo>
              ( 
            </mo> 
            <mi>
              q 
            </mi> 
            <mo>
              ) 
            </mo> 
           </mrow> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mtext>
            Π 
          </mtext> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mi>
            q 
          </mi> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(36)</p>
    <p>where 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mtext>
          Π 
        </mtext> 
        <mn>
          1 
        </mn> 
       </msub> 
      </mrow> 
     </math> and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mtext>
          Π 
        </mtext> 
        <mn>
          2 
        </mn> 
       </msub> 
      </mrow> 
     </math> are computable functions defined as follows.</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mtext>
          Π 
        </mtext> 
        <mn>
          1 
        </mn> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mrow> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             q 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mn>
          1 
        </mn> 
       </msub> 
      </mrow> 
     </math>(37)</p>
    <p>and</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mtext>
          Π 
        </mtext> 
        <mn>
          2 
        </mn> 
       </msub> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          q 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mfrac> 
        <mn>
          1 
        </mn> 
        <mn>
          2 
        </mn> 
       </mfrac> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mfrac> 
          <mrow> 
           <mi>
             q 
           </mi> 
           <mo>
             + 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
          <mrow> 
           <msup> 
            <mn>
              2 
            </mn> 
            <mrow> 
             <msub> 
              <mtext>
                Π 
              </mtext> 
              <mn>
                1 
              </mn> 
             </msub> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mi>
                q 
              </mi> 
              <mo>
                ) 
              </mo> 
             </mrow> 
            </mrow> 
           </msup> 
          </mrow> 
         </mfrac> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(38)</p>
    <p>Note that at r = 18 is kept unused for future usages.</p>
   </sec>
   <sec id="s3_2">
    <title>3.2. Numbering the Set of Quantum Circuits</title>
    <p>To prove that the set C of all quantum circuits is effectively denumerable, we need to show that there exists a bijective mapping from the set of quantum circuits to the set of natural numbers. In other words, we need to show that we can assign a unique natural number to each quantum circuit. A quantum circuit consists of a sequence of quantum gates. To establish a bijective mapping, we can use a standard encoding scheme, such as the Gödel numbering. If circuit C is a sequence of gates: 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          G 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
       <mo>
         , 
       </mo> 
       <msub> 
        <mi>
          G 
        </mi> 
        <mn>
          2 
        </mn> 
       </msub> 
       <mo>
         , 
       </mo> 
       <mo>
         ⋯ 
       </mo> 
       <mo>
         , 
       </mo> 
       <msub> 
        <mi>
          G 
        </mi> 
        <mi>
          s 
        </mi> 
       </msub> 
      </mrow> 
     </math> then</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         γ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          C 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mi>
         τ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mi>
           β 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              G 
            </mi> 
            <mn>
              1 
            </mn> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <mi>
           β 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              G 
            </mi> 
            <mn>
              2 
            </mn> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <mi>
           β 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msub> 
            <mi>
              G 
            </mi> 
            <mi>
              s 
            </mi> 
           </msub> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>(39)</p>
    <p>where</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         τ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <mo>
         ⋯ 
       </mo> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           + 
         </mo> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           + 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           + 
         </mo> 
         <mi>
           k 
         </mi> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math>(40)</p>
    <p>Calculating 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          τ 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          c 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>, relies on the fact that every natural number can be expressed as a binary number. Given c, we can find a unique numbers k and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         0 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
       <mo>
         &lt; 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mn>
          2 
        </mn> 
       </msub> 
       <mo>
         &lt; 
       </mo> 
       <mo>
         ⋯ 
       </mo> 
       <mo>
         &lt; 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mi>
          k 
        </mi> 
       </msub> 
      </mrow> 
     </math> such that</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         c 
       </mi> 
       <mo>
         + 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <mo>
         ⋯ 
       </mo> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <msub> 
          <mi>
            u 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
        </mrow> 
       </msup> 
      </mrow> 
     </math>(41)</p>
    <p>So, 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          τ 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          c 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            1 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mn>
            2 
          </mn> 
         </msub> 
         <mo>
           , 
         </mo> 
         <mo>
           ⋯ 
         </mo> 
         <mo>
           , 
         </mo> 
         <msub> 
          <mi>
            v 
          </mi> 
          <mi>
            k 
          </mi> 
         </msub> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> where 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          v 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mn>
          1 
        </mn> 
       </msub> 
      </mrow> 
     </math> and</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          v 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
       <mo>
         = 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mrow> 
         <mi>
           i 
         </mi> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msub> 
       <mo>
         − 
       </mo> 
       <msub> 
        <mi>
          u 
        </mi> 
        <mi>
          i 
        </mi> 
       </msub> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math>(42)</p>
    <p>where 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         1 
       </mn> 
       <mo>
         ≤ 
       </mo> 
       <mi>
         i 
       </mi> 
       <mo>
         ≤ 
       </mo> 
       <mi>
         k 
       </mi> 
      </mrow> 
     </math></p>
    <p>For a circuit C, the number 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         γ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          C 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math> is called the code or the number of that circuit. We can say that 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          C 
        </mi> 
        <mi>
          n 
        </mi> 
       </msub> 
      </mrow> 
     </math> = the circuit with code number n = 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mi>
          γ 
        </mi> 
        <mrow> 
         <mo>
           − 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mi>
          n 
        </mi> 
        <mo>
          ) 
        </mo> 
       </mrow> 
      </mrow> 
     </math>. We say that 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          C 
        </mi> 
        <mi>
          n 
        </mi> 
       </msub> 
      </mrow> 
     </math> is the nth circuit.</p>
    <p>Note that if 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         m 
       </mi> 
       <mo>
         ≠ 
       </mo> 
       <mi>
         n 
       </mi> 
      </mrow> 
     </math>, then 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          C 
        </mi> 
        <mi>
          m 
        </mi> 
       </msub> 
      </mrow> 
     </math> is different from 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msub> 
        <mi>
          C 
        </mi> 
        <mi>
          n 
        </mi> 
       </msub> 
      </mrow> 
     </math> even that they may compute the same operation.</p>
   </sec>
   <sec id="s3_3">
    <title>3.3. Exploring Quantum Algorithms: The Forward Way</title>
    <p>
     <xref ref-type="fig" rid="fig1">
      Figure 1
     </xref> shows the circuit of EPR creation. This circuit consists of Hadamard and CNOT gates. Let us calculate the number or the code of this circuit.</p>
    <fig id="fig1" position="float">
     <label>Figure 1</label>
     <caption>
      <title>Figure 1. EPR creation.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId228.jpeg?20250224022941" />
    </fig>
    <p>It can be listed as:</p>
    <fig id="fig2" position="float">
     <label>Figure 2</label>
     <caption>
      <title>For numbering the H gate:
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mi>
            
     H
    
           </mi>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mi>
              n 
            </mi> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mi>
            
     n
    
           </mi>
    
           <mo>
            
     −
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
 
        </mrow>

       </math>For numbering the CNOT gate:
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     CNOT
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mi>
               m 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               n 
             </mi> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mtext>
          
   Π
  
         </mtext>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mi>
            
     m
    
           </mi>
    
           <mo>
            
     −
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mi>
            
     n
    
           </mi>
    
           <mo>
            
     −
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
 
        </mrow>

       </math>At m = 1 and n = 2, let us first calculate the 

       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtext>
         
  Π
 
        </mtext>

       </math> function
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mtext>
          
   Π
  
         </mtext>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     0
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mn>
           
    0
   
          </mn> 
  
         </msup> 
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     2
    
           </mn>
    
           <mo>
            
     ×
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   −
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   2
  
         </mn>
 
        </mrow>

       </math>For numbering the CNOT gate:
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     CNOT
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               1 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   2
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   49
  
         </mn>
 
        </mrow>

       </math>Now, let us compute the code of that circuit.= τ(2, 49)</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId229.jpeg?20250224022941" />
    </fig>
    <p>= 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mn>
          2 
        </mn> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math></p>
    <p>= 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mn>
         4 
       </mn> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           52 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math></p>
    <p>= 4,503,599,627,370,499</p>
    <p>
     <xref ref-type="fig" rid="fig2">
      Figure 2
     </xref> shows the circuit of SWAP operation. This circuit consists of three CNOT gates. Let us calculate the number or the code of this circuit.</p>
    <fig id="fig3" position="float">
     <label>Figure 3</label>
     <caption>
      <title>Figure 2. SWAP circuit.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId244.jpeg?20250224022941" />
    </fig>
    <p>It can be listed as:</p>
    <fig id="fig4" position="float">
     <label>Figure 4</label>
     <caption>
      <title>We previously calculated CNOT(1, 2) = 49. For numbering the CNOT(2, 1) gate
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     CNOT
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mi>
               m 
             </mi> 
             <mo>
               , 
             </mo> 
             <mi>
               n 
             </mi> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mtext>
          
   Π
  
         </mtext>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mi>
            
     m
    
           </mi>
    
           <mo>
            
     −
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mi>
            
     n
    
           </mi>
    
           <mo>
            
     −
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
 
        </mrow>

       </math>At m = 2 and n = 1, let us first calculate the 

       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtext>
         
  Π
 
        </mtext>

       </math> function
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mtext>
          
   Π
  
         </mtext>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     0
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mn>
           
    1
   
          </mn> 
  
         </msup> 
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     2
    
           </mn>
    
           <mo>
            
     ×
    
           </mo>
    
           <mn>
            
     0
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   −
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
 
        </mrow>

       </math>For numbering the CNOT gate:
       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     CNOT
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               2 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   30
  
         </mn>
 
        </mrow>

       </math>Now, let us compute the code of that circuit.= τ(49, 30, 49)= 

       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mrow> 
    
           <mn>
            
     49
    
           </mn>
   
          </mrow> 
  
         </msup> 
  
         <mo>
          
   +
  
         </mo>
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mrow> 
    
           <mn>
            
     49
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     30
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
  
         </msup> 
  
         <mo>
          
   +
  
         </mo>
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mrow> 
    
           <mn>
            
     49
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     30
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     49
    
           </mn>
    
           <mo>
            
     +
    
           </mo>
    
           <mn>
            
     2
    
           </mn>
   
          </mrow> 
  
         </msup> 
  
         <mo>
          
   −
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
 
        </mrow>

       </math>= 

       <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mrow> 
    
           <mn>
            
     49
    
           </mn>
   
          </mrow> 
  
         </msup> 
  
         <mo>
          
   +
  
         </mo>
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mrow> 
    
           <mn>
            
     80
    
           </mn>
   
          </mrow> 
  
         </msup> 
  
         <mo>
          
   +
  
         </mo>
  
         <msup> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mrow> 
    
           <mn>
            
     130
    
           </mn>
   
          </mrow> 
  
         </msup> 
  
         <mo>
          
   −
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
 
        </mrow>

       </math></title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId245.jpeg?20250224022941" />
    </fig>
    <p>= 562,949,953,421,312</p>
    <p>+ 1,208,925,819,614,629,174,706,176</p>
    <p>+ 1,361,129,467,683,753,853,853,498,429,727,072,845,824</p>
    <p>− 1</p>
    <p>= 1,645,504,558,087,453,812,587,913,611,736,524,018,557,</p>
    <p>890,457,442,949,424,440,410,111</p>
    <p>Note that this code for numbering the SWAP gate is the equivalent to</p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         β 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mtext>
           SWAP 
         </mtext> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mn>
             1 
           </mn> 
           <mo>
             , 
           </mo> 
           <mn>
             2 
           </mn> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <mn>
         19 
       </mn> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         + 
       </mo> 
       <mn>
         12 
       </mn> 
       <mo>
         = 
       </mo> 
       <mn>
         50 
       </mn> 
      </mrow> 
     </math></p>
    <p>based on 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mtext>
        Π 
      </mtext> 
     </math></p>
    <p>
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mtext>
         Π 
       </mtext> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           0 
         </mn> 
         <mo>
           , 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mn>
          0 
        </mn> 
       </msup> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           2 
         </mn> 
         <mo>
           × 
         </mo> 
         <mn>
           1 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         = 
       </mo> 
       <mn>
         2 
       </mn> 
      </mrow> 
     </math></p>
    <p>and 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <mi>
         τ 
       </mi> 
       <mrow> 
        <mo>
          ( 
        </mo> 
        <mrow> 
         <mn>
           50 
         </mn> 
        </mrow> 
        <mo>
          ) 
        </mo> 
       </mrow> 
       <mo>
         = 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           50 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
       <mo>
         = 
       </mo> 
       <mn>
         1125899906842623 
       </mn> 
      </mrow> 
     </math></p>
    <p>
     <xref ref-type="fig" rid="fig3">
      Figure 3
     </xref> shows the teleportation circuit. This circuit consists of Hadamard, CNOT, Measure, Controlled-Z, and Controlled- X gates. Let us calculate the number or the code of this circuit.</p>
    <fig id="fig5" position="float">
     <label>Figure 5</label>
     <caption>
      <title>Figure 3. Teleportation circuit.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId266.jpeg?20250224022941" />
    </fig>
    <p>It can be listed as:</p>
    <fig id="fig6" position="float">
     <label>Figure 6</label>
     <caption>
      <title>Let us code each of the gates as follows.
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     H
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              2 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    1
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   22
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     CNOT
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               2 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               3 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     2
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   9
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   182
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     CNOT
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               1 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     0
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   2
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   49
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     H
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              1 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    0
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Measure
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              1 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    0
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   7
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   7
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Measure
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              2 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    1
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   7
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   26
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Controlled-Z
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               2 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               3 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     2
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   14
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   9
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   14
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   185
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Controlled-X
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               1 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               3 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     0
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     2
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   4
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   87
  
         </mn>
 
        </mrow>

       </math>The number of the circuit can then be calculated.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId267.jpeg?20250224022941" />
    </fig>
    <p>= τ(22, 182, 49, 3, 7, 26, 185, 87)</p>
    <p>= 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math></p>
    <p>+ 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           7 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           4 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           7 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           26 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           5 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math></p>
    <p>+ 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           7 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           26 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           185 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           6 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           182 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           49 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           7 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           26 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           185 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           87 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           7 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math></p>
    <p>− 1</p>
    <p>= 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           22 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           205 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           255 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           259 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           267 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           294 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           480 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           568 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math></p>
    <p>= 4,194,304</p>
    <p>+ 51,422,017,416,287,688,817,342,786,954,917,203,</p>
    <p>280,710,495,801,049,370,729,644,032</p>
    <p>+ 57,896,044,618,658,097,711,785,492,504,343,953,</p>
    <p>926,634,992,332,820,282,019,728,792,003,956,564,819,</p>
    <p>968</p>
    <p>+ 926,336,713,898,529,563,388,567,880,069,503,262,</p>
    <p>826,159,877,325,124,512,315,660,672,063,305,037,119,</p>
    <p>488</p>
    <p>+ 237,142,198,758,023,568,227,473,377,297,792,835,</p>
    <p>283,496,928,595,231,875,152,809,132,048,206,089,502,</p>
    <p>588,928</p>
    <p>+ 31,828,687,130,226,345,097,944,463,881,396,533,</p>
    <p>766,429,193,651,030,253,916,189,694,521,162,207,</p>
    <p>808,802,136,034,115,584</p>
    <p>+ 3,121,748,550,315,992,231,381,597,229,793,166,</p>
    <p>305,748,598,142,664,971,150,859,156,959,625,371,</p>
    <p>738,819,765,620,120,306,103,063,491,971,159,826,</p>
    <p>931,121,406,622,895,447,975,679,288,285,306,290,</p>
    <p>176</p>
    <p>+ 966,134,380,754,314,586,173,837,972,732,996,836,</p>
    <p>074,731,832,426,608,749,664,308,812,862,879,785,</p>
    <p>572,390,106,134,048,441,645,480,644,490,615,904,</p>
    <p>007,875,544,294,341,269,665,260,746,913,935,727,</p>
    <p>168,366,770,187,174,245,203,705,856</p>
    <p>− 1</p>
    <p>= 966,134,380,754,314,586,173,837,975,854,745,386,</p>
    <p>390,724,063,808,205,979,457,475,118,611,477,928,237,</p>
    <p>361,257,025,034,088,639,205,159,924,866,743,949,573,</p>
    <p>929,210,916,805,793,710,442,371,339,067,812,831,970,</p>
    <p>988,587,388,382,478,335</p>
    <p>
     <xref ref-type="fig" rid="fig4">
      Figure 4
     </xref> shows the circuit of Quantum Fourier Transform (QFT). This circuit consists of Hadamard, Controlled-S, Controlled-T, and SWAP gates. Let us calculate the number or the code of this circuit.</p>
    <fig id="fig7" position="float">
     <label>Figure 7</label>
     <caption>
      <title>Figure 4. Quantum Fourier transform.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId292.jpeg?20250224022941" />
    </fig>
    <p>It can be listed as:</p>
    <fig id="fig8" position="float">
     <label>Figure 8</label>
     <caption>
      <title><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId294.jpeg?20250224022941" /></p>Let us code each of the gates as follows.
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     H
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              1 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    0
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Controlled-S
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               2 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     1
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     0
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   15
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   1
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   15
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   34
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Controlled-T
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               3 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     2
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     0
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   16
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   16
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   73
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     H
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              2 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    1
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   22
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     Controlled-S
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               3 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     2
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     1
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   15
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   11
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   15
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   224
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     H
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mn>
              3 
            </mn> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mn>
           
    2
   
          </mn> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   3
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   41
  
         </mn>
 
        </mrow>

       </math>
       <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
  
         <mi>
          
   β
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mtext>
            
     SWAP
    
           </mtext>
    
           <mrow>
     
            <mo>
              ( 
            </mo> 
     
            <mrow> 
             <mn>
               1 
             </mn> 
             <mo>
               , 
             </mo> 
             <mn>
               3 
             </mn> 
            </mrow> 
     
            <mo>
              ) 
            </mo>
    
           </mrow>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mi>
          
   Π
  
         </mi>
  
         <mrow>
   
          <mo>
           
    (
   
          </mo> 
   
          <mrow> 
    
           <mn>
            
     0
    
           </mn>
    
           <mo>
            
     ,
    
           </mo>
    
           <mn>
            
     2
    
           </mn>
   
          </mrow> 
   
          <mo>
           
    )
   
          </mo>
  
         </mrow>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   12
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   19
  
         </mn>
  
         <mo>
          
   ×
  
         </mo>
  
         <mn>
          
   4
  
         </mn>
  
         <mo>
          
   +
  
         </mo>
  
         <mn>
          
   12
  
         </mn>
  
         <mo>
          
   =
  
         </mo>
  
         <mn>
          
   88
  
         </mn>
 
        </mrow>

       </math>The number of the circuit can then be calculated.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId293.jpeg?20250224022941" />
    </fig>
    <p>= τ(3, 34, 73, 22, 224, 41, 88)</p>
    <p>= 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mn>
          3 
        </mn> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           34 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           34 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           73 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           34 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           73 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           3 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math></p>
    <p>+ 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           34 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           73 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           224 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           4 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           34 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           73 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           224 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           41 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           5 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math></p>
    <p>+ 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           3 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           34 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           73 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           22 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           224 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           41 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           88 
         </mn> 
         <mo>
           + 
         </mo> 
         <mn>
           6 
         </mn> 
        </mrow> 
       </msup> 
      </mrow> 
     </math></p>
    <p>- 1</p>
    <p>= 
     <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mn>
          3 
        </mn> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           38 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           112 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           135 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           360 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           402 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         + 
       </mo> 
       <msup> 
        <mn>
          2 
        </mn> 
        <mrow> 
         <mn>
           491 
         </mn> 
        </mrow> 
       </msup> 
       <mo>
         − 
       </mo> 
       <mn>
         1 
       </mn> 
      </mrow> 
     </math></p>
    <p>= 8 + 274,877,906,944</p>
    <p>+ 5,192,296,858,534,827,628,530,496,329,220,096</p>
    <p>+ 43,556,142,965,880,123,323,311,949,751,266,331,</p>
    <p>066,368</p>
    <p>+ 2,348,542,582,773,833,227,889,480,596,789,337,</p>
    <p>027,375,682,548,908,319,870,707,290,971,532,209,</p>
    <p>025,114,608,443,463,698,998,384,768,703,031,934,976</p>
    <p>+ 10,328,999,512,347,634,358,623,676,688,012,047,497,</p>
    <p>318,823,171,316,894,051,322,637,426,162,590,488,067,</p>
    <p>364,778,518,581,413,120,551,325,743,612,687,890,989,</p>
    <p>973,504</p>
    <p>+ 6,393,341,031,047,152,089,869,511,126,616,404,594,173,</p>
    <p>128,996,177,860,916,959,553,453,312,761,321,102,879,990,</p>
    <p>006,386,899,074,031,556,935,325,554,936,640,763,689,877,</p>
    <p>454,191,182,408,307,282,280,448</p>
    <p>− 1</p>
    <p>= 6,393,341,031,047,152,089,869,511,136,945,404,106,</p>
    <p>523,111,897,384,311,438,199,490,431,228,373,829,447,</p>
    <p>149,723,877,932,645,107,329,335,974,222,586,036,484,</p>
    <p>943,430,874,337,072,758,146,938,842,382,343</p>
   </sec>
   <sec id="s3_4">
    <title>3.4. Exploring Quantum Algorithms: The Backward Way</title>
    <p>The backward way of exploring quantum algorithms is shown in <xref ref-type="fig" rid="fig5">
      Figure 5
     </xref>. The algorithm takes the initial and last values of numbering. It starts with setting empty set to Cs which is the list of valid quantum circuits. It loops until it reaches a stopping condition or the loop iterator reaches the last value of numbering. At each iteration, it calculates the valid quantum circuit that is associated with a number equals to the iterator. Validity of a quantum circuit means that it performs a desirable operation based on evaluation of an expert. The author played the role of expert for recognizing useful quantum circuits.</p>
    <p>One of useful applications of quantum circuits is Quantum Key Distribution (QKD) BB84 protocol <xref ref-type="bibr" rid="scirp.140768-20">
      [20]
     </xref> which is proved to be secure <xref ref-type="bibr" rid="scirp.140768-21">
      [21]
     </xref>. Quantum Key</p>
    <fig id="fig9" position="float">
     <label>Figure 9</label>
     <caption>
      <title>Figure 5. Exploring quantum algorithms.</title>
     </caption>
     <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/1733062-rId317.jpeg?20250224022942" />
    </fig>
    <p>Distribution (QKD) is a cryptographic protocol that uses quantum mechanics to establish a shared key between Alice and Bob. The BB84 protocol, named after its inventors Charles Bennett and Gilles Brassard, involves initialization, transmission, basis selection, measurement, public announcement, key sifting, error estimation, privacy amplification, and key generation <xref ref-type="bibr" rid="scirp.140768-22">
      [22]
     </xref>. A full software stack to integrate QKD in a cloud context was proposed in a recent publication <xref ref-type="bibr" rid="scirp.140768-23">
      [23]
     </xref>. Another recent paper presented a simulation of the QKD BB84 protocol using IBM’s Qiskit quantum computing platform <xref ref-type="bibr" rid="scirp.140768-24">
      [24]
     </xref>. The simulation involves implementing the protocol with and without an eavesdropper Eve.</p>
    <p>
     <xref ref-type="table" rid="table4">
      Table 4
     </xref> shows the quantum part of the channel between Alice and Bob implementing BB84 Protocol on 5 Qubits. There is also a classical channel between them. The proposed approach can generate the circuits of BB84 protocol. But it depends on the ability of the implementation runner to recognize the circuits.</p>
    <table-wrap id="table4">
     <label>
      <xref ref-type="table" rid="table4">
       Table 4
      </xref></label>
     <caption>
      <title>
       <xref ref-type="bibr" rid="scirp.140768-"></xref>Table 4. BB84 Protocol on 5 Qubits.</title>
     </caption>
     <table class="MsoTableGrid custom-table" border="0" cellspacing="0" cellpadding="0"> 
      <tr> 
       <td class="custom-bottom-td acenter" width="33.34%"><p style="text-align:center">Alice</p></td> 
       <td class="custom-bottom-td acenter" width="33.33%"><p style="text-align:center">Eve</p></td> 
       <td class="custom-bottom-td acenter" width="33.33%"><p style="text-align:center">Bob</p></td> 
      </tr> 
      <tr> 
       <td class="custom-top-td acenter" width="33.34%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId318.jpeg?20250224022942" /></p></p></td> 
       <td class="custom-top-td acenter" width="33.33%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId319.jpeg?20250224022941" /></p></p></td> 
       <td class="custom-top-td acenter" width="33.33%"><p style="text-align:center"><p class="imgGroupCss_v"><img class=" imgMarkCss lazy" data-original="https://html.scirp.org/file/1733062-rId320.jpeg?20250224022942" /></p></p></td> 
      </tr> 
     </table>
    </table-wrap>
   </sec>
  </sec><sec id="s4">
   <title>4. Conclusion and Future Work</title>
   <p>This paper reports the construction of an effective numbering of quantum gates and circuits. Then based on this numbering, quantum algorithms can be explored. There is a caveat in the implementation of the proposed numbering. As you may have noticed, the code or number of a quantum circuits grows very rapidly. Python’s ability to handle large numbers has limitations, including memory consumption and slower computation times, making it impractical for performance and resource usage.</p>
   <p>A possible future work can be seeking an efficient implementation of precise large numbers. Another future direction may be to extend the proposed numbering approach to other layers of quantum software architecture.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.140768-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gyongyosi, L. and Imre, S. (2019) A Survey on Quantum Computing Technology. Computer Science Review, 31, 51-71. &gt;https://doi.org/10.1016/j.cosrev.2018.11.002 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cao, Y., Romero, J. and Aspuru-Guzik, A. (2018) Potential of Quantum Computing for Drug Discovery. IBM Journal of Research and Development, 62, 6:1-6:20. &gt;https://doi.org/10.1147/jrd.2018.2888987 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Ayoade, O., Rivas, P. and Orduz, J. (2022) Artificial Intelligence Computing at the Quantum Level. Data, 7, Article 28. &gt;https://doi.org/10.3390/data7030028 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Khan, A.A., Ahmad, A., Waseem, M., Liang, P., Fahmideh, M., Mikkonen, T., et al. (2023) Software Architecture for Quantum Computing Systems—A Systematic Review. Journal of Systems and Software, 201, Article 111682. &gt;https://doi.org/10.1016/j.jss.2023.111682 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Khalid, M., Mujahid, U., Jafri, A., Choi, H. and Muhammad, N.U.I. (2021) An FPGA-Based Hardware Abstraction of Quantum Computing Systems. Journal of Computational Electronics, 20, 2001-2018. &gt;https://doi.org/10.1007/s10825-021-01765-w 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Heim, B., Soeken, M., Marshall, S., Granade, C., Roetteler, M., Geller, A., et al. (2020) Quantum Programming Languages. Nature Reviews Physics, 2, 709-722. &gt;https://doi.org/10.1038/s42254-020-00245-7 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Montanaro, A. (2016) Quantum Algorithms: An Overview. npj Quantum Information, 2, Article No. 15023. &gt;https://doi.org/10.1038/npjqi.2015.23 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Roffe, J. (2019) Quantum Error Correction: An Introductory Guide. Contemporary Physics, 60, 226-245. &gt;https://doi.org/10.1080/00107514.2019.1667078 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Quetschlich, N., Burgholzer, L. and Wille, R. (2023) Compiler Optimization for Quantum Computing Using Reinforcement Learning. 2023 60th ACM/IEEE Design Automation Conference (DAC), San Francisco, 9-13 July 2023, 1-6. &gt;https://doi.org/10.1109/dac56929.2023.10248002 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Altman, E., Brown, K.R., Carleo, G., Carr, L.D., Demler, E., Chin, C., et al. (2021) Quantum Simulators: Architectures and Opportunities. PRX Quantum, 2, Article 017003. &gt;https://doi.org/10.1103/prxquantum.2.017003 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Soeparno, H. and Perbangsa, A.S. (2021) Cloud Quantum Computing Concept and Development: A Systematic Literature Review. Procedia Computer Science, 179, 944-954. &gt;https://doi.org/10.1016/j.procs.2021.01.084 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Endo, S., Cai, Z., Benjamin, S.C. and Yuan, X. (2021) Hybrid Quantum-Classical Algorithms and Quantum Error Mitigation. Journal of the Physical Society of Japan, 90, Article 032001. &gt;https://doi.org/10.7566/jpsj.90.032001 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cross, A., Bishop, L., Smolin, J. and Gambetta, J. (2017) Open Quantum Assembly Language.
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Green, A.S., Lumsdaine, P.L., Ross, N.J., Selinger, P. and Valiron, B. (2013) Quipper. Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, Seattle, 6-19 June 2013, 333-342. &gt;https://doi.org/10.1145/2491956.2462177 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref15">
    <label>15</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Roetteler, M., Svore, K.M., Wecker, D. and Wiebe, N. (2017) Design Automation for Quantum Architectures. 2017 Design, Automation&amp;Test in Europe Conference&amp;Exhibition (DATE), Lausanne, 27-31 March 2017, 1312-1317. &gt;https://doi.org/10.23919/date.2017.7927196 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref16">
    <label>16</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Gödel, K. (1931) Godel’s Theorem in Focus. In: On Formally Undecidable Propositions of Principia Mathematica and Related Systems, Dover Publications, 17-47.
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref17">
    <label>17</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Cutland, N. (1980) Computability. Cambridge University Press. &gt;https://doi.org/10.1017/cbo9781139171496 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref18">
    <label>18</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Grover, L.K. (1996) A Fast Quantum Mechanical Algorithm for Database Search. Proceedings of the 28th Annual ACM Symposium on Theory of Computing—STOC’96, Philadelphia, 22-24 May 1996, 212-219. &gt;https://doi.org/10.1145/237814.237866 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref19">
    <label>19</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shor, P.W. (1994) Algorithms for Quantum Computation: Discrete Logarithms and Factoring. Proceedings of the 35th Annual Symposium on Foundations of Computer Science, Santa Fe, 20-22 November 1994, 124-134. &gt;https://doi.org/10.1109/sfcs.1994.365700 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref20">
    <label>20</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Chong, S. and Hwang, T. (2010) Quantum Key Agreement Protocol Based on BB84. Optics Communications, 283, 1192-1195. &gt;https://doi.org/10.1016/j.optcom.2009.11.007 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref21">
    <label>21</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Shor, P.W. and Preskill, J. (2000) Simple Proof of Security of the BB84 Quantum Key Distribution Protocol. Physical Review Letters, 85, 441-444. &gt;https://doi.org/10.1103/physrevlett.85.441 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref22">
    <label>22</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Bennett, C.H. and Brassard, G. (1984) An Update on Quantum Cryptography. In: Lecture Notes in Computer Science, Springer, 475-480. &gt;https://doi.org/10.1007/3-540-39568-7_39 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref23">
    <label>23</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Pedone, I., Atzeni, A., Canavese, D. and Lioy, A. (2021) Toward a Complete Software Stack to Integrate Quantum Key Distribution in a Cloud Environment. IEEE Access, 9, 115270-115291. &gt;https://doi.org/10.1109/access.2021.3102313 
    </mixed-citation>
   </ref>
   <ref id="scirp.140768-ref24">
    <label>24</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Saeed, M.H., Sattar, H., Durad, M.H. and Haider, Z. (2022) Implementation of QKD BB84 Protocol in Qiskit. 2022 19th International Bhurban Conference on Applied Sciences and Technology (IBCAST), Islamabad, 16-20 August 2022, 689-695. &gt;https://doi.org/10.1109/ibcast54850.2022.9990073
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>