<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Reference &amp;mdash; Computer Science Honours Project</title>
    <link>https://chinenyeakaluka.writeas.com/tag:Reference</link>
    <description>CHINENYE AKALUKA.       SUPERVISOR : Dr. Parimala Thulasiraman.     </description>
    <pubDate>Sun, 14 Jun 2026 21:04:37 +0000</pubDate>
    <item>
      <title>GROVER&#39;S ALGORITHM</title>
      <link>https://chinenyeakaluka.writeas.com/more-grover?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[GROVER&#39;S ALGORITHM&#xA;&#xA;more background information&#xA;Quantum states (|0⟩, |1⟩, |+⟩, |-⟩) can be represented as a superposition.&#xA;|ψ⟩= α|0⟩+ β|1⟩&#xA;&#xA;|α|^2+ |β|^2=1&#xA;&#xA;α=√(1-p,)         β=e^jφ √p,          0≤p≤1,0≤φ&lt;2π&#xA;&#xA;|ψ⟩=√(1-p)|0⟩+ e^jφ √p,|1⟩&#xA;&#xA;e^jφ  is the phase&#xA;&#xA;The phase can be used to offset the qubit. There are different gates we can use to do the offsets (T, S, Z etc.)&#xA;&#xA;A phase change example can be found here. https://quantum-computing.ibm.com/composer/d065727b7bdddc3f658e2ad8badeb1ba.&#xA;&#xA;Grover&#39;s Algorithm&#xA;Grover&#39;s algorithm shows the exponential advantage of a quantum computer. It is a search algorithm that provides a huge improvement to a regular classical sorting algorithm. This is because Quantum Mechanics systems can be in a state of superposition and algorithms can simultaneously examine multiple states. A search for an item from a random list of n items can be obtained in O(√n)steps.&#xA;&#xA;!--more--&#xA;&#xA;Basically, all the states (right and wrong answers) are superposed together using a function and then phase angle change operations are applied to the superposition. This makes the probability of the right answer a lot higher than the other answers making it more probable to be measured.&#xA;&#xA;Grover&#39;s Algorithm Encoding&#xA;The search list is provided in superposition to a function f which returns f(x) = 1 for the right answer and f(x) = 0 for the wrong answer.&#xA;We binary encode the items as qubits x,w ∈ {0,1}^(n) so that N = 2^n.&#xA;&#xA;We define an oracle matrix to act on any single.  U|x⟩= (-1)^f(x)|x⟩, which is -|x⟩ if the item is found.&#xA;&#xA;Grover&#39;s Algorithm Function&#xA;&#xA;Uniform superposition&#xA;Oracle refection&#xA;Additional reflection&#xA;&#xA;The two reflections equal to a rotation. The whole procedure ( 3 steps ) is repeated several times until the answer is the focus. This is approximately √n times.&#xA;&#xA;You can find an example of this algorithm here. Grover N=2 A=00&#xA;https://quantum-computing.ibm.com/composer/39354dfd1bb6ac3edb8f9a9659c834d4&#xA;&#xA;𝑈𝜔|𝑥⟩=(−1)^𝑓(𝑥)|𝑥⟩  is the oracle. Inputs are represented by this function but in a superposition.&#xA;&#xA;The superposition of all inputs |s⟩&#xA;&#xA;|𝑠⟩=sin𝜃|𝑤⟩+cos𝜃|𝑠′⟩, where  𝜃=arcsin⟨𝑠|𝑤⟩=arcsin√N&#xA;superposition of the right answer and all the wrong answers.&#xA;&#xA;Amplitude amplification singles out the right answer in the superposition by using quantum gate circuitry to adjust the amplitude of the right answer.&#xA;&#xA;Superposition is done by a Hadamard gate.&#xA; 𝜃=arcsin(1/2)=𝜋/6.&#xA;&#xA;all the states = 1/2(|00⟩+|01⟩+|10⟩+|11⟩)&#xA;&#xA;The circuit currently.&#xA;&#xA;We apply the oracle reflection (see equation above)&#xA;&#xA;Oracle for  |𝜔⟩=|11⟩&#xA;  &#xA;Let&#39;s look at the case  |𝑤⟩=|11⟩&#xA;&#xA; . The oracle  𝑈𝜔 in this case acts as follows:&#xA;&#xA;𝑈𝜔|𝑠⟩=𝑈𝜔.1/2(|00⟩+|01⟩+|10⟩+|11⟩)=1/2(|00⟩+|01⟩+|10⟩−|11⟩)&#xA;&#xA;This is gotten by the controlled z gate = H gate + CNOT gate + H gate. &#xA;The CNOT applies an  𝑋 to its target qubit whenever its control is in state  |1⟩&#xA;&#xA;see full circuit https://quantum-computing.ibm.com/composer/89fe6d3a014ad268b44b5f8b4a5f4b9c&#xA;&#xA;Reference&#xA;https://quantum-computing.ibm.com/docs/iqx/guide/]]&gt;</description>
      <content:encoded><![CDATA[<h3 id="grover-s-algorithm" id="grover-s-algorithm"><strong>GROVER&#39;S ALGORITHM</strong></h3>

<p><strong>more background information</strong>
Quantum states (|0⟩, |1⟩, |+⟩, |-⟩) can be represented as a superposition.
|ψ⟩= α|0⟩+ β|1⟩</p>

<p>|α|^2+ |β|^2=1</p>

<p>α=√(1-p,)         β=e^jφ √p,          0≤p≤1,0≤φ&lt;2π</p>

<p>|ψ⟩=√(1-p)|0⟩+ e^jφ √p,|1⟩</p>

<p>e^jφ  is the phase</p>

<p>The phase can be used to offset the qubit. There are different gates we can use to do the offsets (T, S, Z etc.)</p>

<p>A phase change example can be found here. <a href="https://quantum-computing.ibm.com/composer/d065727b7bdddc3f658e2ad8badeb1ba" rel="nofollow">https://quantum-computing.ibm.com/composer/d065727b7bdddc3f658e2ad8badeb1ba</a>.</p>

<h3 id="grover-s-algorithm-1" id="grover-s-algorithm-1">Grover&#39;s Algorithm</h3>

<p>Grover&#39;s algorithm shows the exponential advantage of a quantum computer. It is a search algorithm that provides a huge improvement to a regular classical sorting algorithm. This is because Quantum Mechanics systems can be in a state of superposition and algorithms can simultaneously examine multiple states. A search for an item from a random list of n items can be obtained in O(√n)steps.</p>



<p>Basically, all the states (right and wrong answers) are superposed together using a function and then phase angle change operations are applied to the superposition. This makes the probability of the right answer a lot higher than the other answers making it more probable to be measured.</p>

<h3 id="grover-s-algorithm-encoding" id="grover-s-algorithm-encoding"><strong>Grover&#39;s Algorithm Encoding</strong></h3>

<p>The search list is provided in superposition to a function f which returns f(x) = 1 for the right answer and f(x) = 0 for the wrong answer.
We binary encode the items as qubits x,w ∈ {0,1}^(n) so that N = 2^n.</p>

<p>We define an oracle matrix to act on any single.  U|x⟩= (-1)^f(x)|x⟩, which is –|x⟩ if the item is found.</p>

<h3 id="grover-s-algorithm-function" id="grover-s-algorithm-function"><strong>Grover&#39;s Algorithm Function</strong></h3>
<ol><li>Uniform superposition</li>
<li>Oracle refection</li>
<li>Additional reflection</li></ol>

<p>The two reflections equal to a rotation. The whole procedure ( 3 steps ) is repeated several times until the answer is the focus. This is approximately √n times.
<img src="https://i.snap.as/EnKJ9WKF.png" alt=""/>
You can find an example of this algorithm here. Grover N=2 A=00
<a href="https://quantum-computing.ibm.com/composer/39354dfd1bb6ac3edb8f9a9659c834d4" rel="nofollow">https://quantum-computing.ibm.com/composer/39354dfd1bb6ac3edb8f9a9659c834d4</a></p>

<p><img src="https://i.snap.as/9i0R5ZM3.png" alt=""/></p>

<p>𝑈𝜔|𝑥⟩=(−1)^𝑓(𝑥)|𝑥⟩  is the oracle. Inputs are represented by this function but in a superposition.</p>

<p>The superposition of all inputs |s⟩</p>

<p>|𝑠⟩=sin𝜃|𝑤⟩+cos𝜃|𝑠′⟩, where  𝜃=arcsin⟨𝑠|𝑤⟩=arcsin√N
superposition of the right answer and all the wrong answers.</p>

<p>Amplitude amplification singles out the right answer in the superposition by using quantum gate circuitry to adjust the amplitude of the right answer.</p>
<ol><li>Superposition is done by a Hadamard gate.
𝜃=arcsin(½)=𝜋/6.</li></ol>

<p><img src="https://i.snap.as/8g8wQiGb.png" alt=""/></p>

<p>all the states = ½(|00⟩+|01⟩+|10⟩+|11⟩)</p>

<p>The circuit currently.
<img src="https://i.snap.as/gdjNk5D7.png" alt=""/></p>
<ol><li>We apply the oracle reflection (see equation above)</li></ol>

<p>Oracle for  |𝜔⟩=|11⟩</p>

<p>Let&#39;s look at the case  |𝑤⟩=|11⟩</p>

<p> . The oracle  𝑈𝜔 in this case acts as follows:</p>

<p>𝑈𝜔|𝑠⟩=𝑈𝜔.½(|00⟩+|01⟩+|10⟩+|11⟩)=½(|00⟩+|01⟩+|10⟩−|11⟩)</p>

<p>This is gotten by the controlled z gate = H gate + CNOT gate + H gate.
The CNOT applies an  𝑋 to its target qubit whenever its control is in state  |1⟩</p>

<p><img src="https://i.snap.as/dqmj1ju5.png" alt=""/></p>

<p><strong>see full circuit</strong> <a href="https://quantum-computing.ibm.com/composer/89fe6d3a014ad268b44b5f8b4a5f4b9c" rel="nofollow">https://quantum-computing.ibm.com/composer/89fe6d3a014ad268b44b5f8b4a5f4b9c</a></p>

<p>##<a href="https://chinenyeakaluka.writeas.com/tag:Reference" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">Reference</span></a>
<a href="https://quantum-computing.ibm.com/docs/iqx/guide/" rel="nofollow">https://quantum-computing.ibm.com/docs/iqx/guide/</a></p>
]]></content:encoded>
      <guid>https://chinenyeakaluka.writeas.com/more-grover</guid>
      <pubDate>Wed, 21 Oct 2020 19:04:38 +0000</pubDate>
    </item>
  </channel>
</rss>