<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aditya Pal on Medium]]></title>
        <description><![CDATA[Stories by Aditya Pal on Medium]]></description>
        <link>https://medium.com/@decodeaditya?source=rss-105fa167113f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Gb83o1vgdsq42R78dCaMCQ.jpeg</url>
            <title>Stories by Aditya Pal on Medium</title>
            <link>https://medium.com/@decodeaditya?source=rss-105fa167113f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 10:21:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@decodeaditya/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Grover’s Algorithm: The Quantum Trick That Makes Searching Almost Instant.]]></title>
            <link>https://medium.com/@decodeaditya/grovers-algorithm-the-quantum-trick-that-makes-searching-almost-instant-fbbe48b834e0?source=rss-105fa167113f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbbe48b834e0</guid>
            <category><![CDATA[qiskit]]></category>
            <category><![CDATA[quantum-physics]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <category><![CDATA[grovers-algorithm]]></category>
            <dc:creator><![CDATA[Aditya Pal]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 20:58:02 GMT</pubDate>
            <atom:updated>2026-10-02T21:01:35.652Z</atom:updated>
            <content:encoded><![CDATA[<p>Suppose you are searching an unstructured database. As the number of entries in the database increases, the time complexity of finding the correct search result increases linearly in the worst-case scenario. You may have to check every single item one by one.</p><p>But <strong>quantum computers</strong> offer an incredibly fast way of searching through such an unstructured pile of data. It’s like finding a needle in a massive haystack with far fewer attempts than you would ever need classically. One of the algorithms that makes this possible is <strong>Grover’s Algorithm</strong>.</p><h4>How classical Computers search</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jL5k1SiYZnSE-y-7" /></figure><p>Let’s first discuss how Classical computers search.</p><p>Suppose you have a class of 10 students and you need to find the a student named <strong>Shehzad</strong>, so if you’ve done any programming, what we do there is that we run a loop and then filter one by one if that student’s name is equal to Shehzad.</p><p>Now two things can Happen, either,<br> → We may find first student to be Shehzad, <strong>in best case scenario</strong><br> → or <strong>in worst case</strong>, we only find him on the 10th (and final) iteration.</p><pre># Python example<br><br># All students<br>students = [&quot;Rahul&quot;, &quot;Raman&quot;, &quot;Umar&quot;, &quot;Kamla&quot;, &quot;Mohan&quot;, &quot;Marie&quot;,<br>             &quot;Zoya&quot;, &quot;Shehzad&quot;, &quot;Peter&quot;, &quot;Jean&quot;]<br># Target Student<br>target = students[7]<br><br># Looping one by one to Search target<br>for index, student in enumerate(students):<br>  if(student == target):<br>    print(f&quot;Found {target} in iteration {index}&quot;)<br>    break<br>  else:<br>    print(f&quot;Iteration {index} Wasted&quot;)</pre><p><strong>Another example: Searching ball in Box</strong></p><p>Imagine that there are <strong>40 boxes</strong> in a storeroom and exactly one of them contains a football, while others are empty.</p><p>So, to find the football, we may need to check the boxes one by one. We might get lucky and find it within the first 10 attempts, or we might have a bad day and find it only after checking all 40 boxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ehfwAgSGRsmQtGWR" /></figure><p>In both the cases, the number of checks grows <strong>linearly</strong> with the total number of items. We call it <strong>Linear Search </strong>and its time complexity is written as O(N)</p><h4>How Quantum Computers Speed Up Searches</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J4ypqqPGGiaodnUs" /></figure><p>As seen earlier, <strong>Classical computers</strong> check possibilities one by one. But <strong>Quantum computers do something fundamentally different.</strong></p><p>What gives that fundamental advantage to Quantum computers is <strong>Superposition</strong>, which is one of Properties of Quantum Physics. So Quantum computers can put <strong>all the possible answers into a single quantum state at the same time</strong>. In our case, that means the quantum computer can consider all 10 students simultaneously instead of checking them sequentially.</p><p>But, superposition alone isn’t enough — Suppose if you measure the quantum state right away, result will be a random student. The real magic of Grover’s Algorithm is a process called <strong>amplitude amplification</strong>.</p><p>Let’s first see Intuition, then we will move Towards Implementation:</p><p><strong>Step 1:</strong> First quantum computer starts by <strong>putting every possible answer into equal superposition</strong> (like, every student or every box has the equal probability to be a correct answer).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*y2tMkxIkZNRXr-g-eghv4A.png" /></figure><p><strong>Step 2:</strong> Then, the computer uses a special quantum operation (known as <strong>oracle</strong>) that marks the correct answer (like Shehzad or the box with the ball) by <strong>flipping the sign of its amplitude</strong>.</p><p>Think of it as putting a special invisible mark on the correct item — without actually telling us which one it is yet. But it’s not a magic, We design it based on the problem.</p><p>Like, if we are searching for the name Shehzad, the <strong>oracle is a quantum circuit that checks whether a given name equals the one we are searching for, </strong>and it flips the phase only when it matches.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*kilnYdHsJ7zk8ILiV3piow.png" /></figure><p><strong>Step 3:</strong> Now, after the correct answer has been marked, another quantum operation called the <strong>diffusion operator</strong> (or <strong>inversion about the average</strong>) is applied.</p><p>This step increases the amplitude of the marked item and decreases the amplitudes of all the unmarked (wrong) items by reflecting each state’s amplitude around the average amplitude of all the states.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*PuwiPUeIixh7JkIbsgNLJA.png" /></figure><p><strong>Step 4:</strong> Then, we repeat <strong>Steps 2 and 3</strong> roughly <strong><em>√N</em></strong>​ times. After the right number of repetitions, the probability of measuring the correct answer becomes very high (close to 100%).</p><p>So when we finally measure the quantum state, we are very likely to get the correct answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*ojN7Jo5QJQ-urJpnuqfkwg.png" /></figure><p>Here is comparison between Quantum and Classical Approach and you will observe a <strong>Quadratic speedup:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wt74wa2XiBDDq3AGyF0tag.png" /></figure><h4>Let’s Implement It in Practice</h4><p>So, before we dive into the code, make sure you understand basics of Quantum physics like <strong>superposition</strong>, <strong>entanglement </strong>and <strong>interference.</strong></p><p>Now let’s move on to implementing Grover’s Algorithm. <br>For implementation we will take example of <strong>8 students</strong> for simplicity.</p><h4>Step 1: Create superposition</h4><p>We will start with <strong>3 Qubits</strong> (all in state ∣0⟩) because it will make 2³ = 8 Possible combinations <strong>when Hadamard Gate is Applied</strong> as needed for our example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S6zrMbHfY39ESo5pVdumrQ.png" /><figcaption>(1) Applying Hadamard</figcaption></figure><p>After applying Hadamard gates on all 3 qubits, the quantum state becomes:</p><blockquote><strong><em>1/√8(∣000⟩ + ∣001⟩ + ∣010⟩ + ∣011⟩ + ∣100⟩ + ∣101⟩ + ∣110⟩ + ∣111⟩)</em></strong></blockquote><p>This means every possible student (every possible answer) now has <strong>exactly the same probability</strong> (i.e 1/8).</p><pre># Step 1: Create a Quantum Circuit with 3 qubit and Put in Superposition<br>qc = QuantumCircuit(3)<br>qc.h(0)<br>qc.h(1)<br>qc.h(2)</pre><p>This is the starting point of Grover’s Algorithm.</p><h4>Step 2: Applying the Oracle (Marking the right answer)</h4><p>After putting all states into a superposition, each with an equal probability, we will now apply the <strong>oracle</strong> so that we can identify the correct answer and <strong>flip its phase(Sign).</strong></p><p>Let’s say the student we are searching for is Shehzad, and we assign him the <strong>state ∣101⟩</strong> (<strong>binary 5</strong>).</p><p>Now, we will perform the transformation. The Grover <strong>phase oracle</strong> should transform the target state as follows:</p><blockquote><strong><em>∣101⟩ → −∣101⟩</em></strong></blockquote><p>As described theoretically in Step 2, the correct answer is marked by giving it a <strong>negative phase</strong>. We implement this transformation as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*62XnD9bzzwwmLd4igTEB7w.png" /><figcaption>(2) Amplifiing the Correct answer</figcaption></figure><ol><li>Applying the<strong> X gate</strong> changes the state from <strong>∣101⟩</strong> to <strong>∣111⟩</strong>.</li><li>Then, applying the <strong>CCZ gate</strong> to qubits 1, 2, and 3 <strong>flips the phase</strong> of ∣111⟩, producing<strong> −∣111⟩</strong>.</li><li>Finally, applying the <strong>X gate</strong> again changes −∣111⟩ back to −∣101⟩.</li></ol><p>Therefore, the oracle has <strong>flipped the phase of the correct possibility</strong>.</p><pre># Step 2: Applying a phase flip to correct possiblility i.e ∣101⟩<br>qc.x(1)<br>qc.ccz(0,1,2)<br>qc.x(1)</pre><h4>Step 3: Applying the Diffusion Operation</h4><p>Now that the major part of <strong>marking the correct possibility</strong> is complete, the next step is <strong>inversion about the average</strong>. This step helps us amplify the amplitude of the correct answer.</p><p>So, the formula</p><blockquote><strong><em>a′ = 2m − a</em></strong></blockquote><p>is used in the <strong>inversion-about-the-average step</strong>, also called the <strong>diffusion step</strong>.</p><p>Here:</p><ul><li>a is the <strong>original amplitude</strong>.</li><li>m is the <strong>average amplitude</strong>.</li><li>a’​ is the <strong>new amplitude after inversion about the average</strong></li></ul><p>Now let’s apply and understand it</p><p>Take a example, that the amplitudes are:</p><blockquote><strong><em>2, 2, 2 and −2</em></strong></blockquote><p>Here, −2 represents the marked state ∣101⟩.</p><p>So, the average amplitude is calculated as:</p><blockquote><strong><em>m = (2 + 2 + 2 − 2)/4 = 1</em></strong></blockquote><p>For the three unmarked states:</p><blockquote><strong><em>2(1) − 2=0</em></strong></blockquote><p>For the marked state:</p><blockquote><strong><em>2(1) − (−2) = 4</em></strong></blockquote><p>Therefore, the new amplitudes become:</p><blockquote><strong><em>0, 0, 0, 4</em></strong></blockquote><p>The amplitude of the marked state has been amplified, while the amplitudes of the unmarked states have become zero.</p><p>In an actual three-qubit Grover example, there are <strong>eight amplitudes</strong>, but the same inversion about the average applies.</p><p>For the three-qubit example, the diffusion operator is commonly implemented as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uq4WI1YrF8I0fcqmVKqbCw.png" /><figcaption>(3) Inversion about Average</figcaption></figure><pre># Step 3: Applying the Diffusion Step<br><br>qc.h([0,1,2])<br>qc.x([0,1,2])<br><br>qc.ccz(0,1,2) # Standard CCZ shifts the phase of |111&gt;<br><br>qc.x([0,1,2])<br>qc.h([0,1,2]</pre><h4>Step 4: Repeat the Process (Steps 2 &amp; 3)</h4><p>This step does not require any additional code. Instead, we repeat the previous steps to amplify the marked state further.</p><p>For a search space containing N possible states, Grover’s algorithm requires approximately</p><blockquote><strong><em>π/4 * √N </em></strong><em>iterations</em></blockquote><p>In each iteration, we:</p><ol><li>Apply the oracle to mark the correct state. <strong>(Step 2)</strong></li><li>Apply the diffusion operator to amplify its amplitude. <strong>(Step 3)</strong></li></ol><p>For our example, <br><strong>States</strong> <strong>N=8</strong>, so the optimal number of iterations is approximately</p><blockquote><strong><em>π/4 * √8 ≈ 2.22</em></strong></blockquote><p>Therefore for 3 qubits, we typically perform <strong>two complete Grover iterations</strong>. After these iterations, the marked state ∣101⟩ has a much higher probability of being measured.</p><h4>Results and Observations</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*clGLtvRUBDf5XuHh_8zkPQ.png" /><figcaption>Output on Cirqmon Simulator</figcaption></figure><p>Now that we have implemented Grover’s algorithm, let’s observe the results and check whether the state ∣101⟩ has the highest probability.</p><p><strong>Observe the Q sphere:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*X8mEgwnEZ6kqbu66bPyzpw.png" /></figure><p>Here, observe that the node corresponding to <strong>∣101⟩ is biggest in size </strong>indicating that it have<strong> highest amplitude among all states</strong>.</p><p>Its color represents its phase (~180° after you remove Global phase), including the phase change introduced by the oracle which was earlier 0°.</p><p><strong>Same you can Observer with Graph:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*F-aZKqYHYK3f4Fo-UUc1xA.png" /></figure><p>You can also observe the result using a measurement-counts graph too. The state <strong>∣101⟩ appear more frequently</strong> than the other states.</p><p>Finally, here is Code you can try Implementing in Qiskit SDK:</p><pre>from qiskit import QuantumCircuit<br>from qiskit.primitives import StatevectorSampler<br><br># 1. Create a Quantum Circuit with 3 qubit<br>qc = QuantumCircuit(3)<br><br># 2. Adding gates to the circuit<br><br># (Step 1)<br>qc.h([0, 1, 2])<br>qc.barrier()<br><br># (Step 2 - Phase flipping)<br>qc.x(1)          <br>qc.ccz(0, 1, 2) <br>qc.x(1)         <br>qc.barrier()<br><br># (Step 3 - Inversion about average)<br>qc.h([0, 1, 2])<br>qc.x([0, 1, 2])<br>qc.ccz(0, 1, 2) <br>qc.x([0, 1, 2])<br>qc.h([0, 1, 2])<br>qc.barrier()<br><br># 3. Measure the qubit and store the result<br>qc.measure_all()<br><br> # 4. Simulate the circuit<br>sampler = StatevectorSampler()<br>job = sampler.run([qc], shots=1024)<br>result = job.result()<br>pub_result = result[0]<br><br>print(&quot;Measurement Counts:&quot;, pub_result.data.meas.get_counts())</pre><p>For now, focus only on the steps we discussed (superposition → oracle → diffusion).</p><p>Don’t worry about the measurement part, shots=1024just tells the simulator to run the circuit 1024 times and count the outcomes.</p><p>In a 3-qubit Grover circuit with the correct number of iterations, the success probability is extremely high. You will typically see something like</p><pre>{&#39;101&#39;: 1000, &#39;000&#39;: 8, &#39;011&#39;: 5, ...}   # state 101 dominates heavily</pre><h4>Final conclusion</h4><p>We have now demonstrated how a quantum computer can perform an <strong>unstructured search</strong> using amplitude amplification. <br>Congratulations on learning Grover’s algorithm!</p><p><strong>Remember:</strong> For three qubits, applying the oracle and diffusion pair twice would amplify the marked state but applying too many iterations eventually reduces its probability again.</p><p>Thanks for Reading! Do comments for questions, ideas or if you have any Suggestion. Also you can try one of my Open source circuit simulator that i used in blog: <a href="https://www.cirqmon.dev/">https://www.cirqmon.dev/</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbbe48b834e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deutsch-Jozsa Algorithm: How Quantum Computers Solve Problems in One Shot]]></title>
            <link>https://medium.com/@decodeaditya/deutsch-jozsa-algorithm-how-quantum-computers-solve-problems-in-one-shot-22563d53dc72?source=rss-105fa167113f------2</link>
            <guid isPermaLink="false">https://medium.com/p/22563d53dc72</guid>
            <category><![CDATA[quantum-algorithms]]></category>
            <category><![CDATA[quantum-advantage]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <category><![CDATA[qiskit]]></category>
            <category><![CDATA[deutsch-jozsa-algorithm]]></category>
            <dc:creator><![CDATA[Aditya Pal]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 07:30:04 GMT</pubDate>
            <atom:updated>2026-08-14T07:30:04.604Z</atom:updated>
            <content:encoded><![CDATA[<p>You may have heard that Quantum computers solve problems incredibly fast as compared to Classical computers, utilizing the power of Quantum parallelism.</p><p>So, In this blog we will explore one of the first algorithms that practically demonstrated Quantum advantage and It was a foundational step to prove that Quantum computers can solve certain problems much faster than classical ones. We are Talking of <strong>Deutsch-Jozsa Algorithm.</strong></p><h4>Let’s Understanding problem to Solve</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Nnrqf2cvh2GPk43g" /></figure><p>Suppose we have a <strong>magical washing machine</strong>, and you can put any cloth into that magical washing machine to wash. But when you take the cloth out, only <strong>two things can happen</strong> (only 2 cases are possible):</p><ul><li><strong>Either All clothes become a red, round neck, M-size T-shirt.</strong> This machine is called a <strong>Constant washing machine</strong>.</li><li><strong>or Exactly Half of them are red and half are green.</strong> This one is called a <strong>Balanced washing machine</strong>.</li></ul><p>To categorize which type of machine it is, a <strong>Normal person</strong> would have to check clothes <strong>one by one</strong>, and in the worst case they need to look at <strong>at least half of the clothes</strong> before and after washing. But suppose <strong>Harry Potter</strong> can tell the type of machine <strong>just by looking at one cloth</strong>. Here, Harry is the <strong>quantum computer</strong>, and the normal human is the <strong>classical computer</strong>.</p><p>Now, let’s come to the computer world. Consider a function <strong>f(x)</strong>, also called an <strong>oracle function</strong>, that works like the washing machine.</p><p>The function takes an input <strong>x</strong>, which can be <strong>0 or 1</strong>, and returns an output which is also <strong>0 or 1</strong>.</p><p>Now this function is can to be only one of two types:</p><ol><li><strong>Constant function</strong>: No matter what input you give, the <strong>output is always the same</strong>. <br>Examples: <br> → f(0) = 0 and f(1) = 0 or <br> → f(0) = 1 and f(1) = 1</li><li><strong>Balanced function: </strong>The function returns <strong>0 for half of the inputs</strong> and <strong>1 for the other half</strong>.<br>Examples:<br> → f(0) = 0 and f(1) = 1<br> → f(0) = 1 and f(1) = 0 <br>If you have <strong>10 inputs</strong> in total, then a balanced function will output <strong>five 0s and five 1s</strong>.</li></ol><p>And our task is simple, which is to find out whether the given function is <strong>constant</strong> or <strong>balanced</strong>.</p><h4>How Classical computers attempt it</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UEq2V9pZ9dX2w_8-" /></figure><p>As we know, <strong>normal computers work with one bit at a time</strong> (either 0 or 1). So, in the worst case scenario, they have to <strong>check more than half of the possible inputs</strong>.</p><p>If you have checked only half and all outputs were the same, you still cannot be 100% sure, the function could still be balanced. You need to check one more input to be certain.</p><p>Suppose you have <strong>10 entries</strong> and you start applying <strong>f(x)</strong>:</p><p>A classical computer may need to check up to 6 inputs (half + 1) in the worst case before it can confidently say whether the function is constant or balanced.</p><ol><li>f(0) → Start from here; check whether the output is 0 or 1</li><li>f(1) → Again check; see whether the output is 0 or 1</li><li>f(1) → Repeat</li><li>f(1) → Repeat</li><li>f(1) → Repeat</li><li>f(1) → To be sure, you have to calculate till here</li><li>f(1) → No need to check</li><li>f(1) → No need to check</li><li>f(1) → No need to check</li><li>f(1) → No need to check</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*aoL2NxzNcfJMOZ6EViENvQ.png" /></figure><p>This might look normal, but suppose for <strong>10,000 entries</strong> you have to check <strong>5,000 + 1 entries</strong>. Now observe the time complexity: in the worst case it is almost <strong>O(n/2)</strong>, which <strong>increases linearly and becomes slow</strong>.</p><h4>Hero in rescue: Quantum Computers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dG39sd_MnPGYvkRe" /></figure><p>Now let’s see how quantum computers solve this problem with the <strong>Deutsch–Jozsa algorithm</strong>, improving compute speed and reduction in time complexity, and proving <strong>quantum advantage</strong>.</p><p>For solving this problem in a <strong>single shot</strong>, <strong>QPUs</strong> use <strong>quantum parallelism</strong>, which at its core happens with <strong>superposition</strong> and <strong>entanglement</strong>.</p><p>But just evaluating the function for all inputs is not enough. We also need a way to extract useful information. This is where <strong>interference </strong>comes in.</p><p>In short let me explain them:</p><ul><li><strong>Superposition</strong> → A concept of quantum physics that enables <strong>multiple states of a single entity at once</strong>, like electrons. In quantum computing, it means that a qubit can have <strong>equal chances of being 0 and 1 at the same time</strong>, not just either of them.</li></ul><p>We achieve superposition with the <strong>Hadamard gate</strong> in quantum computing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nXOQdDl2LGYYSjQdumJvg.jpeg" /></figure><ul><li><strong>Entanglement</strong> → Again, a phenomenon in quantum physics where <strong>two or more qubits become linked</strong> in such a way that the state of one qubit <strong>instantly influences</strong> the state of the other, <strong>no matter how far apart</strong> they are.</li></ul><p>In quantum computing, entanglement allows qubits to <strong>share information and correlate their outcomes</strong>, enabling complex computations that classical bits cannot perform efficiently. We create entanglement using gates like the <strong>CNOT gate</strong> in quantum circuits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b5XXwlgSsXOLvHgGUiMxWg.png" /><figcaption>2 Entangled States (Distances don’t matter!)</figcaption></figure><ul><li><strong>Interference </strong>→ A fundamental principle in quantum mechanics where <strong>quantum states (wave functions) combine</strong> to either <strong>amplify</strong> or <strong>cancel out</strong> certain outcomes, similar to Sound and light waves.</li></ul><p>In quantum computing, interference is used to <strong>boost the probability of correct answers</strong> and <strong>reduce the probability of wrong ones</strong> by carefully designing quantum gates and circuits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*B0UfmRTu5xGd0Bhwi-9kWA.gif" /></figure><p>This is achieved through <strong>constructive interference</strong> (where amplitudes add up) and <strong>destructive interference</strong> (where amplitudes cancel out), allowing the algorithm to <strong>proceed the computation toward the desired result</strong> in a single measurement.</p><p>Now let us discuss working of <strong>Deutsch–Jozsa algorithm:</strong></p><h4>1. Initialize the Qubits</h4><ul><li>We Start with <strong>two qubits, </strong>which is simplest Version of<strong> Deutsch-Jozsa Algorithm</strong>:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yF4IILsmzcIJT4SYp5hwSA.png" /><figcaption>Preparing Initial State</figcaption></figure><pre>from qiskit import QuantumCircuit<br>from qiskit.primitives import StatevectorSampler<br><br># Note that This Cirqmon shows ideal results and Qiskit code will inject some noise when Executed!<br><br># 1. Create a Quantum Circuit with 2 qubit<br>qc = QuantumCircuit(2,2)<br>qc.x(1)</pre><ul><li><strong>First qubit (input qubit): </strong>Initialize to ∣0⟩ → But, its Already in ∣0⟩, so nothing to do. <br>This will be the input that we will evaluate against the oracle function and <strong>we can have more than one input qubit</strong>.</li><li><strong>Second qubit (output qubit)</strong>: Initialize to ∣1⟩ → By convention, qubits start in ∣0⟩, so we apply an <strong>X (NOT) gate</strong> to flip the state from ∣0⟩ to ∣1⟩. <br>We also call this the <strong>ancillary qubit</strong>, and we flip it to take advantage of <strong>quantum interference</strong>, which will help us amplify the correct answers. We will have only <strong>one ancillary qubit</strong>, no matter how many input qubits there are.</li></ul><p>So, now our Initial state becomes: <strong>|ψ₀⟩ = |0⟩ ⊗ |1⟩ = 01⟩</strong></p><p>For <strong>n input qubits and 1 ancilla</strong>, this generalizes to:</p><blockquote><strong><em>|ψ₀⟩ </em></strong><em>= </em><strong><em>(|0⟩^⊗n) ⊗ |1⟩</em></strong></blockquote><p>That is, the first n qubits are each in <strong>|0⟩</strong>, and the ancilla qubit is in <strong>|1⟩</strong>.</p><h4>2. Apply Hadamard Gates (Create Superposition)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xFpmcEdutw2MayMzXGhlrw.png" /><figcaption>Superposition</figcaption></figure><pre># 2. Apply hadamard to both Qubits<br><br>qc.h(0)<br>qc.h(1)</pre><p>Now, to take <strong>quantum advantage</strong>, we apply a <strong>Hadamard gate (H)</strong> to both qubits.</p><ul><li><strong>H|0⟩</strong> → On applying Hadamard to the <strong>first qubit </strong>Q_0<strong>​</strong>, which was ∣0⟩ earlier, it now enters a superposition state:</li></ul><blockquote><em>→ </em><strong><em>H∣0⟩=∣0⟩ + ∣1⟩</em></strong><em>​ / </em><strong><em>√2</em></strong></blockquote><p>This is often called the <strong>∣+⟩ state</strong>.</p><ul><li><strong>H|1⟩</strong> → On applying Hadamard to the <strong>second qubit </strong>Q_1, which was ∣1⟩earlier, it now enters a superposition state:</li></ul><blockquote><em>→ </em><strong><em>H∣1⟩=∣0⟩ - ∣1⟩</em></strong><em>​ / </em><strong><em>√2</em></strong></blockquote><p>This is often called the <strong>∣-⟩ state</strong>.</p><blockquote><em>State after Hadamard:<br> → </em><strong><em>|ψ₁⟩ = (|0⟩ + |1⟩)/√2 ⊗ (|0⟩ − |1⟩)/√2</em></strong></blockquote><p>The <strong>input qubit</strong> is now in an equal superposition of ∣0⟩ and ∣1⟩, and the <strong>ancilla qubit</strong> is in a superposition with a relative minus sign (-), which will later help us use <strong>quantum interference</strong> to distinguish constant vs balanced functions and Amplify correct Calculations.</p><h4>3. Apply the Oracle Function (Uf)</h4><p>So basically, the <strong>oracle function</strong> is a special set of quantum gates that encodes the function f(x). (like inside dashed borders.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*TJKGwKCX0DHShKWQLTCdyQ.png" /><figcaption>Overall Deutsch Jozsa Algorithm Circuit</figcaption></figure><p>It performs the transformation, or you can call it a <strong>processing unit</strong> that gives a suitable output according to what kind of function this oracle box has encoded. We also call this a <strong>black box</strong> because we don’t know what is happening exactly at the quantum level to encode the function.<br>We only care about its input–output behavior, not its internal gate-level implementation.</p><p>In more technical terms, It’s a <strong>unitary transformation:</strong></p><blockquote><strong><em>Uf​ : ∣x⟩∣y⟩ ⟶ ∣x⟩∣ y⊕f(x) ⟩</em></strong></blockquote><p>Lets Understand this one but don’t be panicked if you don’t get it now, you can still conceptually understand what is Oracle function.</p><p>Now let’ s Break it down piece by piece:</p><ul><li><strong>Uf </strong>is the <strong>oracle</strong>: a unitary (reversible) quantum gate that “knows” the function f(x).</li><li><strong>∣x⟩</strong> is the <strong>input register</strong> (your data qubits, e.g. ∣0⟩ or ∣1⟩ for 1-bit input).</li><li><strong>∣y⟩</strong> is the <strong>output/ancilla qubit</strong> (the helper qubit).</li><li><strong>f(x)</strong> is the classical function’s output (0 or 1).</li><li><strong>⊕</strong> means <strong>XOR</strong> Operation (like in simple Electronics it returns 0 if Inputs are same and 1 if they are different):</li></ul><p>So the oracle does this:</p><blockquote><em>It </em><strong><em>leaves the input ∣x⟩ unchanged</em></strong><em>, and </em><strong><em>updates the second qubit</em></strong><em> from </em><strong><em>∣y⟩</em></strong><em> to ∣y ⊕ f(x)⟩.</em></blockquote><p>Or simply it says like - “ Take the current value of the <strong>second qubit (Ancilla)</strong> <strong>∣y⟩</strong>, XOR it with the function’s output for that input <strong>|x⟩</strong>, and update the result in the <strong>Ancillary </strong>qubit.”</p><p>Now let’s Understand with Examples:</p><p>Take <strong>x as input</strong> and<strong> y as ancillary</strong>:</p><p><strong>→ Ex-1: Constant function f(x)=0</strong></p><ul><li>Transformation: ∣x⟩∣y⟩ → ∣x⟩∣ y⊕0 ⟩</li><li>Here <strong>f(x) = 0</strong> and <strong>∣y⟩ = 1</strong> which means<strong> 0 ⊕ 1 = 1</strong> and since <strong>∣y⟩ is already 1, </strong>So the oracle does <strong>nothing</strong> (identity).</li></ul><p><strong>→ Ex-2: Constant function f(x)=1</strong></p><ul><li>Transformation: ∣x⟩∣y⟩ → ∣x⟩∣ y⊕1 ⟩</li><li>Here <strong>f(x) = 1 </strong>and <strong>∣y⟩ = 1</strong> which means<strong> 1 ⊕ 1 = 0 </strong>but <strong>∣y⟩ is 1,<br>So it</strong> <strong>flips</strong> the second qubit to <strong>0</strong> state (like an X gate on the ancilla).</li></ul><p><strong>→ Ex-3: Balanced function f(x)=x (either 0 or 1)</strong></p><p><strong>For x = 0:</strong></p><ul><li><strong>∣0⟩∣y⟩ → ∣0⟩∣ y⊕0 ⟩ = ∣0⟩∣y⟩</strong></li><li>So, it’s like <strong>f(x) = 0, ∣y⟩ = 1 </strong>meaning that<strong> 0 ⊕ 1 = 1. <br></strong>Here <strong>∣y⟩ is already 1, </strong>So nothing changes on the second qubit. We do nothing.</li></ul><p><strong>For x = 1:</strong></p><ul><li><strong>∣1⟩∣y⟩ → ∣1⟩∣ y⊕1 ⟩ = ∣1⟩∣ NOT(y) ⟩</strong></li><li>Here, it’s like Since <strong>f(x) = 1, ∣y⟩ = 1 </strong>and <strong>1 ⊕ 1 = 0, <br></strong>So we need to <strong>flip the Ancillary Qubit, </strong>or like Applying X gate to Output qubit<strong>.</strong></li></ul><p>This behavior is exactly the same as a <strong>CNOT gate</strong>, where the first qubit is the control and the second qubit is the target.</p><p>We will <strong>try Balanced function, by Applying CNOT Gate</strong> (Example 3).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PA6775BMVvgqVeOA2ejriA.png" /><figcaption>Oracle function</figcaption></figure><pre># 3. Apply CX Gate with Input (Q_1) as Control and (Q_2) as Target<br># Its for simple Balanced Oracle function<br><br>qc.cx(0, 1)</pre><h4>4. Apply Hadamard Gates Again</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2OMEeKKXov49cgKvTQF7ZA.png" /><figcaption>Again Hadamard</figcaption></figure><pre># 4. Apply Hadamard again to Amplify correct calculation<br>qc.h(0)</pre><p>Apply another <strong>Hadamard gate (H)</strong> to the <strong>input Qubits</strong> <strong>only</strong>.</p><p>This creates <strong>interference</strong> between the states, amplifying the correct answer.</p><p>State after second Hadamard:<br><strong>|ψ₃⟩</strong> (depends on whether f(x) is constant or balanced)</p><ul><li>If f(x) is <strong>constant</strong>, the amplitudes interfere <strong>constructively</strong> toward the <br><strong>∣0⟩^⊗n state</strong>. ∣ψ3​⟩ has the input register in ∣0⟩⊗n (all zeros)</li><li>If f(x) is <strong>balanced</strong>, the amplitudes interfere <strong>destructively</strong> for <strong>∣0⟩^⊗n</strong>, so the state ends up in some <strong>non-zero</strong> pattern. ∣ψ3​⟩ has <strong>zero amplitude</strong> on <br>∣0⟩^⊗n and non-zero amplitude on other basis states</li></ul><h4>5. Measurement and results</h4><pre><br># 5. Measure the qubit and store the result<br>qc.measure_all()<br><br> # 6. Simulate the circuit<br>sampler = StatevectorSampler()<br>job = sampler.run([qc], shots=1024)<br>result = job.result()<br>pub_result = result[0]<br><br>print(&quot;Measurement Counts:&quot;, pub_result.data.meas.get_counts())</pre><p>Now <strong>measure the first qubit</strong>. In this simulator, it shows results for <strong>all qubits including the ancilla</strong>, but to determine the kind of function, we only care about the <strong>input qubits</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*suMCPm6DArH4GBOIat9N3Q.png" /></figure><p>For example, if here outcomes are <strong>|01⟩</strong> and <strong>|11⟩</strong>, that means the <strong>first qubit</strong> is giving mixed results <strong>0</strong> and <strong>1</strong>, while the second bit is just the ancilla.</p><ul><li>If the <strong>input qubit(s)</strong> measure <strong>|0⟩</strong> (or all zeros for multiple inputs) → Function is <strong>Constant</strong>.</li><li>If the <strong>input qubit(s)</strong> measure <strong>|1⟩</strong> (or anything other than all zeros) → Function is <strong>Balanced</strong>.</li></ul><p>So Here:</p><ul><li><strong>|01⟩</strong> → first qubit = <strong>0</strong></li><li><strong>|11⟩</strong> → first qubit = <strong>1</strong></li></ul><p>The first qubit is giving <strong>mixed results</strong> (both 0 and 1). So <strong>this Function is Balanced.</strong></p><h4>Full Code:</h4><p>Code that you can Run on Qiskit’s noisy simulator.</p><pre>from qiskit import QuantumCircuit<br>from qiskit.primitives import StatevectorSampler<br><br># Note that This Cirqmon shows ideal results and Qiskit code will inject some noise when Executed!<br><br># 1. Create a Quantum Circuit with 2 qubit<br>qc = QuantumCircuit(2)<br>qc.x(1)<br>qc.h(0)<br>qc.h(1)<br>qc.cx(0, 1)<br>qc.h(0)<br><br># 3. Measure the qubit and store the result<br>qc.measure_all()<br><br> # 4. Simulate the circuit<br>sampler = StatevectorSampler()<br>job = sampler.run([qc], shots=1024)<br>result = job.result()<br>pub_result = result[0]<br><br>print(&quot;Measurement Counts:&quot;, pub_result.data.meas.get_counts())</pre><h4>Final Thoughts</h4><p>Now that you have understood one of the first proofs of quantum advantage through the Deutsch-Jozsa algorithm, you can try building it hands-on.</p><p>I have created a browser-based open source quantum simulator called <strong>Cirqmon</strong>, specially made for learners. It does not look complicated and needs no setup. You can just open it and start experimenting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SemNNOi9Y8c_JVD-8Ho4KQ.gif" /></figure><p>You can try it here: <a href="https://cirqmon.vercel.app/">https://cirqmon.vercel.app/</a></p><p>Also, if you want to explore more blogs on quantum computing, feel free to check my other posts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22563d53dc72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quantum Computing for Beginners: Qubits, Entanglement, Bell States and Qiskit]]></title>
            <link>https://medium.com/@decodeaditya/quantum-computing-for-beginners-qubits-entanglement-bell-states-and-qiskit-0ef4c47f8a36?source=rss-105fa167113f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0ef4c47f8a36</guid>
            <category><![CDATA[qubits-and-superposition]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[qiskit]]></category>
            <category><![CDATA[quantum-entanglement]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <dc:creator><![CDATA[Aditya Pal]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 15:07:58 GMT</pubDate>
            <atom:updated>2026-08-10T14:42:12.375Z</atom:updated>
            <content:encoded><![CDATA[<p>So, Most tutorials make quantum computing sound like science fiction, dumping complex matrix math or vague mystical analogies on you.</p><p>But I will skip the buzzwords and look at wht is actually happening under the hood.</p><h4>Why we need Quantum Computing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n4eRTG_0bodIHm0d" /></figure><p>Your PC, phone, and laptop are built entirely on classical computing. At their core, they only understand binary numbers: either 0s (off) or 1s (on).</p><p>Because classical bits can only exist in one state at a time, your computer has to solve problems sequentially. Suppose If you need to search through a database or test a variable for N number of possibilities, a classical computer must run a loop N times in the worst-case scenario.</p><p>But for massive data, cryptography, or complex molecular simulations, this sequential brute-forcing makes calculations incredibly slow, sometimes taking thousands of years. In fact cybersecurity algorithms like RSA take advantage of slow computing to make Encryption keys so Advanced that normal computers will take years to Break them.</p><h4>How Quantum Computing solves Faster</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vwkc5YI4L0fiKu8B" /></figure><p>Imagine, if you had a computer that could evaluate all N possibilities simultaneously instead of waiting for a loop to finish index by index?</p><p>This is where Quantum computers come into Scene. Instead of classical bits, <strong>they use qubits</strong>.</p><p>Qubit is described by a <strong>state vector, </strong>which is<strong> </strong>a mathematical object that holds the probability amplitudes of being in |0⟩ and |1⟩ at the same time.</p><p>So, a qubit means that a variable can hold the computational weight of 0 and 1 simultaneously. It isn&#39;t magic; it is a leveraged physical property of subatomic particles called <strong>Superposition.</strong></p><p>Think of an electron: in nature, a single subatomic particle can have an equal probability of existing in multiple different physical positions at the exact same time. Quantum computers capture that natural phenomenon and map it directly to data.</p><p>So actually Quantum computers will not replace Our daily CPU based computers because both excel at different tasks at all! <strong>Quantum computers excel at computational rigour</strong>, one task at a time and <strong>Classical computers does better multitasking</strong>. So future is hybrid model where we use both to achieve accuracy and faster computations.</p><h4>Problem with Quantum computers</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*678SPUtVMyjgOrCY" /></figure><p>Quantum systems are governed by the laws of nature and Since we are creating quantum conditions ourselves in <strong>Quantum processing units (QPUs)</strong>, there is a high chance of errors occurring in the calculations, or of the calculations failing altogether. So error correction, prevention and mitigation is major challenge to Solve for better computation and accuracy in results.</p><p>Consider a amazing concept of Quantum computing called <strong>entanglement</strong>. It means that if you have two states, you can determine the state of one simply by observing the other, no matter how far apart they are.</p><p>You might say that this is a common sense. For example, if you have two pairs of shoes, one pair in London and another in Nepal — and you find the right shoe in one box, you know that your friend has the left shoe. However, entanglement is not actually like that. In the classical world, we are 100% sure about what the other person will get because the result is already predetermined. <strong>In the quantum world, however, we do not know the states until they are measured.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iWnQCvCjttT0UsdY" /></figure><p>Actually the states are not known in advance, but the correlations between them are so strong that Einstein called it <strong>“spooky action at a distance”.</strong> You do not know the state of one particle, but once the state of the other particle is measured, the state of the first particle also becomes exactly known.</p><p>So Entanglement is very useful in quantum computing because Entanglement helps us reduce these errors to a great extent, because Nature guides it with so much perfection!</p><h4>Feeling Overwhelmed? Let’s Talk of Practical now</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FaXFBw8Yh-_eqgdT" /></figure><p>Now, If you are looking at this concept and starting to feel completely overwhelmed, take a deep breath. That is completely normal.</p><p>Think about modern web development. You have frameworks like React, Next.js, or Vue created by companies like Meta and Vercel. While they are amazing tools, but they change constantly. But What never changes? HTML, CSS, and JavaScript. They are the unshakeable foundation.</p><p>It is the exact same story in the quantum computing:</p><p><strong>The Frameworks </strong>like IBM Qiskit and Google Cirq are just <strong>high-level Python frameworks</strong>. They are the “React and Next.js” of the quantum world. You can call them as wrappers around research and Physical laws.</p><p>But that unchanging “HTML” underneath these frameworks is basic high school math — specifically <strong>Vectors, Matrices, and Linear Algebra</strong>, alongside concepts of <strong>Modern Physics</strong> like Entanglement, Superposition etc.</p><p>The thing is, You do not need to understand every single equation overnight to get started, but ignoring the math entirely will eventually hold you back.</p><p>While I can’t explain all of those foundational concepts here, this quantum computing course by freeCodeCamp, which I found myself, is one of the best courses available and is a great way to get started and take your first step toward creating a <strong>“Hello, World!” program in quantum computing</strong>. The course covers the mathematical foundations, quantum mechanics, qubits, quantum gates, entanglement, and several quantum algorithms too!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FtsbCSkvHhMo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DtsbCSkvHhMo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FtsbCSkvHhMo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8359d94c3ade3fc727ce6116c7e1930d/href">https://medium.com/media/8359d94c3ade3fc727ce6116c7e1930d/href</a></iframe><p>Remember, the goal isn’t to master theoretical physics by Monday morning. The goal is just to get started. Watch a few minutes, map the concepts to your code, and let the foundations click over time.</p><h4>Now let’s start Coding basic Circuits</h4><p>So, after you’re done learning those basics, let’s create a Bell state in Qiskit.</p><p>Basically, a Bell state is a state in a two-qubit system where the total possible states are <strong>00, 01, 10, and 11</strong>. Of these, the active states are <strong>00</strong> and <strong>11</strong>, with each having a probability of 50%, while <strong>01</strong> and <strong>10</strong> have a probability of 0%.</p><p>But before moving forward, here are a few points you should keep in mind.</p><ol><li>Qubit indexing starts at 0, just like in classical programming. Therefore, we name the qubits <em>Q0, Q1</em>, and so on. Also, <strong>at the beginning, each qubit has a 100% probability of being in the 0 state.</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Icl3WrZxxur8_uNPWn8iqA.png" /><figcaption>Observe both Qubits at Start</figcaption></figure><p>2. There are two ways to read a state such as 01: <strong>big-endian</strong> and <strong>little-endian.</strong></p><ul><li>In <strong>big-endian</strong> (common in physics textbooks), we read from left to right according to qubit order. So |01⟩ means qubit 0 is 0 and qubit 1 is 1.</li><li>In <strong>little-endian</strong> (what Qiskit uses), the rightmost bit is qubit 0. So the same string 01 means qubit 0 is 1 and qubit 1 is 0.</li></ul><p>Always remember this difference when you look at measurement results in Qiskit</p><h4>1. Import the required classes</h4><pre>from qiskit import QuantumCircuit<br>from qiskit.primitives import StatevectorSampler</pre><ul><li>QuantumCircuit is used to create and define the quantum circuit.</li><li>StatevectorSampler is used to simulate the circuit and sample measurement results.</li></ul><h4>2. Create a two-qubit circuit</h4><pre>qc = QuantumCircuit(2)</pre><p>This creates a quantum circuit containing two qubits:</p><ul><li>Qubit 0, written as q[0]</li><li>Qubit 1, written as q[1]</li></ul><p>Initially, <strong>both qubits are in the ∣0⟩ state</strong>, so the <strong>combined state is ∣00⟩</strong>.</p><h4>3. Apply the quantum gates</h4><p>Quantum gates are <strong>operations we perform on Quantum circuit to make it work according our needs</strong>.</p><pre># Hadamard Gate<br>qc.h(0)<br><br># Controlled Not (CX) Gate<br>qc.cx(0, 1)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RmrT5TYq5lVHpdgtnr9Hlg.png" /><figcaption>Bell State in Simulator</figcaption></figure><p>The <strong>Hadamard gate</strong> puts qubit 0 into a superposition of 0 and 1.</p><p>The state becomes:</p><blockquote><strong>(|00⟩ + |10⟩) / √2</strong></blockquote><p>Now <strong>CX Gate, Flips the target qubit only if the control qubit is |1⟩</strong>. If the control is |0⟩, the target remains unchanged:</p><p>Here, Qubit 0 is the control qubit and Qubit 1 is the target qubit.</p><blockquote><strong>(|00⟩ + |11⟩) / √2</strong></blockquote><p>The <strong>Hadamard-followed-by-CNOT pattern</strong> is the standard way to create this Bell state.</p><h4>4. Measure all the qubits</h4><pre>qc.measure_all()</pre><p>This measures both qubits and stores their results in classical bits.</p><p>The possible measurement results are:</p><p>00, 01 , 10 , 11</p><p>For this Bell state, 00 and 11 should appear, while 01 and 10 should not appear.</p><h4>5. Create the sampler</h4><pre>sampler = StatevectorSampler()</pre><p>This <strong>creates an ideal statevector-based simulator</strong> that calculates the probabilities of the quantum states and samples measurement outcomes.</p><p>Remember that <strong>real hardware is noisy, this simulator is perfect.</strong></p><h4>6. Run the circuit</h4><pre>job = sampler.run([qc], shots=1024)</pre><p>The shots=1024 argument means that the simulator measures the circuit 1,024 times. Ideally, approximately <strong>half of the results will be </strong>00<strong> and the other half will be </strong>11.</p><h4>7. Retrieve the result</h4><pre>result = job.result()<br>pub_result = result[0]</pre><ul><li>job.result() retrieves the completed simulation result.</li><li>result[0] retrieves the result for the first circuit, since the circuit was passed inside a list, remember we made quantumcircuit(2,2) at top.</li></ul><h4>8. Observe the measurement counts</h4><pre>print(&quot;Measurement Counts:&quot;, pub_result.data.meas.get_counts())</pre><p>This extracts and prints the number of times each state was measured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*nfqyrIfkOt6mS6t7bwT09w.png" /><figcaption>Probabilty Graph on Cirqmon simulator (No noise)</figcaption></figure><p>A possible output could be in noisy Simulator could be:</p><pre>Measurement Counts: {&#39;00&#39;: 511, &#39;11&#39;: 513}</pre><p>The exact numbers may vary slightly because the simulator samples the results randomly. However, 00 and 11 should be close to 512 each, while 01 and 10 should have zero counts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*vrQjhsIQyIcPUt__eBpUQA.png" /><figcaption>Visual Representation of Bell state on Q sphere</figcaption></figure><h4>Full Qiskit Code</h4><pre>from qiskit import QuantumCircuit<br>from qiskit.primitives import StatevectorSampler<br><br># 1. Create a quantum circuit with two qubits<br>qc = QuantumCircuit(2)<br><br># 2. Create a Bell state<br>qc.h(0)<br>qc.cx(0, 1)<br><br># 3. Measure all the qubits<br>qc.measure_all()<br><br># 4. Simulate the circuit<br>sampler = StatevectorSampler()<br>job = sampler.run([qc], shots=1024)<br><br># 5. Retrieve the result<br>result = job.result()<br>pub_result = result[0]<br><br># 6. Display the measurement counts<br>print(&quot;Measurement Counts:&quot;, pub_result.data.meas.get_counts())</pre><p>Congratulations on Making you First Circuit.</p><h4>A Few Resources for Further Learning</h4><p>Now that you have learned the foundations, I want to share a few resources that can help you move forward.</p><ul><li><strong>IBM Quantum Learning: </strong><a href="https://quantum.cloud.ibm.com/learning/en">https://quantum.cloud.ibm.com/learning/en</a></li></ul><p>This platform contains courses created by experts from IBM Quantum, including people involved in developing Qiskit. You can explore theoretical courses, learn more about quantum computing, and even run your circuits on real quantum computers.</p><ul><li><strong>Quantum Country: </strong><a href="https://quantum.country/">https://quantum.country/</a></li></ul><p>This is a collection of beginner-friendly essays that can help you learn quantum computing and quantum mechanics without feeling overwhelmed. It uses an interactive, memory-based approach to help you remember the concepts you learn.</p><ul><li><strong>Cirqmon Quantum Composer: </strong><a href="https://cirqmon.vercel.app/">https://cirqmon.vercel.app/</a></li></ul><p>This is one of my Open source projects. It’s a quantum circuit builder which runs entirely inside your browser. The execution system was written from scratch instead of using APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ac36eSyo4_m88MNSE7ZirA.png" /><figcaption>Cirqmon Playground</figcaption></figure><p>I created it because, when I started learning quantum computing, tools such as IBM Quantum Composer and Quirk felt too dry and academic. I wanted to create a tool that feels more like a game, does not become boring while you are learning, and makes quantum computing more approachable.</p><p>You can also explore the code, contribute to the project, and learn along the way. Do give it a try!</p><p>Thanks for Reading, if you have any question do comment or you can ask me directly, I would love to help and get to learn something new.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0ef4c47f8a36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solve Quadratic Equations With a Method You Never Learned in School]]></title>
            <link>https://medium.com/@decodeaditya/solve-quadratic-equations-with-a-method-you-never-learned-in-school-ef589ce50e04?source=rss-105fa167113f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef589ce50e04</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[math-education]]></category>
            <category><![CDATA[research-paper]]></category>
            <dc:creator><![CDATA[Aditya Pal]]></dc:creator>
            <pubDate>Wed, 06 May 2026 01:59:11 GMT</pubDate>
            <atom:updated>2026-05-07T06:13:21.259Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>There’s a simpler way. but nobody taught you this amazing way to find roots of Quadratic Equations.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KaZxmmYpjAUhvcB8" /></figure><p>So, You have probably solved dozens of quadratic equations in school and You might have memorized the quadratic formula, fumbled through factoring, maybe even survived “completing the square.”</p><p>But in 2019, a math professor named <strong>Po-Shen Loh, </strong>coach of the US Math Olympiad team — published a paper showing there’s a cleaner, more logical way to do it, the one that doesn’t require guessing or memorizing a formula.</p><p>But no worries you don’t have to read paper :)</p><p>Here’s the idea.</p><h3>What School Taught You (Traditional Approach)</h3><h4>Factorization</h4><p>Let’s Solve —</p><blockquote><strong>x² − 8x + 12 = 0</strong></blockquote><p>You will find two numbers that multiply to 12 and add to 8</p><p><strong>6 and 2 work in this Case</strong></p><blockquote><em>(x − 6)(x − 2) = 0</em></blockquote><p>So either:</p><blockquote><em>x − 6 = 0 → x = </em><strong><em>6</em></strong></blockquote><p>Or:</p><blockquote><em>x − 2 = 0 → x = </em><strong><em>2</em></strong></blockquote><p>Its Simple. But only works when the numbers are friendly.</p><h4>Quadratic Formula</h4><blockquote>Same equation. <strong>x² − 8x + 12 = 0;</strong></blockquote><blockquote><em>x = (8 ± √(64 − 48)) / 2</em></blockquote><blockquote><em>x = (8 ± √16) / 2</em></blockquote><blockquote><em>x = (8 ± 4) / 2</em></blockquote><p>So either:</p><blockquote><em>x = (8 + 4) / 2 = </em><strong><em>6</em></strong></blockquote><p>Or:</p><blockquote><em>x = (8 − 4) / 2 = </em><strong><em>2</em></strong></blockquote><p>Here also It worked.</p><h3><strong>Now Try This One</strong></h3><blockquote><strong>x² − 6x + 11 = 0</strong></blockquote><p><strong>Factorization?</strong> Two numbers that multiply to 11 and add to 6. 11 is prime. Nothing works. Stuck.</p><p><strong>Quadratic Formula?</strong></p><blockquote><em>x = (6 ± √(36 − 44)) / 2</em></blockquote><blockquote><em>x = (6 ± </em><strong><em>√</em></strong><em>(−8)) / 2</em></blockquote><p>A <strong>negative number under the square root</strong>. The formula hands you the answer but gives you no sense of <em>why</em> it happened or what it means.</p><h3>Let’s try A Better Way</h3><p>For any quadratic equation <strong>x² + bx + c = 0</strong>, two roots r and s always satisfy:</p><blockquote><strong><em>Sum of roots:</em></strong><em> r + s = −b</em></blockquote><blockquote><strong><em>Product of roots:</em></strong><em> r × s = c</em></blockquote><p>This is a simple property of quadratic equations</p><h4>Step 1: Find the Average of the Roots</h4><p>Since r + s = −b, so their average is:</p><blockquote><em>average = −b/2</em></blockquote><p>Both roots sit symmetrically around this average on the number line. One root is some distance to the <strong>left</strong>, the other is the exact <strong>same distance to the</strong> <strong>right</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hgNFIxcgSKRd7U_EdMVYiA.png" /><figcaption>Observe that Root (r) = 2 and Root (s) = 6, both equally distanced from Average = 4</figcaption></figure><h4>Step 2: Express Both Roots in Terms of That Average</h4><p>Call that distance <strong>u</strong>. So:</p><blockquote><em>r = −b/2 + u</em></blockquote><blockquote><em>s = −b/2 − u</em></blockquote><p>We know the average. We just need to find u.</p><h4>Step 3: Use the Product to Find u</h4><p>Since product of roots: r × s = c:</p><blockquote><em>(−b/2 + u)(−b/2 − u) = c</em></blockquote><p>This is a difference of squares:</p><blockquote><em>(−b/2)² − u² = c</em></blockquote><blockquote><em>u² = (b/2)² − c</em></blockquote><blockquote><strong><em>u = √((b/2)² − c)</em></strong></blockquote><h4>Step 4: Write both Roots</h4><blockquote><em>r = −b/2 + u</em></blockquote><blockquote><em>s = −b/2 − u</em></blockquote><h3>Let’s solve using new Method</h3><p>So, We were stuck solving:</p><blockquote><strong>x² − 6x + 11 = 0</strong></blockquote><p>Let’s do it using <strong>New Method</strong></p><p><strong>1: Find the Average of Roots</strong></p><blockquote>(r + s)/2</blockquote><blockquote>→ (6)/2 = <strong>3</strong></blockquote><p><strong>2: Add and Subtract u</strong></p><blockquote>r = 3 + u,</blockquote><blockquote>s = 3 − u</blockquote><p><strong>3: Find the value of u</strong></p><blockquote>u² = 9 − 11 = <strong>−2</strong></blockquote><blockquote>→ u = i√2</blockquote><p><strong>4: We found the roots!</strong></p><blockquote><em>r = 3 + i√2</em></blockquote><blockquote><em>s = 3 − i√2</em></blockquote><p><strong>u² went negative. That is the exact moment the parabola stops touching the x-axis.</strong> The formula never told you that. This method shows it visually and algebraically at the same time.</p><h3>Why This one is really better</h3><p>The quadratic formula gives you the <strong>answer.</strong></p><p>This method gives you the <strong>understanding and feel </strong>of why, behind each quadratic equation you solve whether with rational or Irrational roots.</p><p><strong>Further Reading</strong></p><ul><li><a href="https://arxiv.org/abs/1910.06709">Original Paper — arXiv</a></li><li><a href="https://poshenloh.com/quadratic">Po-Shen Loh’s Explanation</a></li><li><a href="https://www.youtube.com/watch?v=ZBalWWHYFQc">Watch him explain it</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef589ce50e04" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Most Social Good Apps Fail (and How a Few Actually Succeed)]]></title>
            <link>https://medium.com/@decodeaditya/why-most-social-good-apps-fail-and-how-a-few-actually-succeed-b2abbd2c4340?source=rss-105fa167113f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2abbd2c4340</guid>
            <category><![CDATA[india]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[social-impact]]></category>
            <dc:creator><![CDATA[Aditya Pal]]></dc:creator>
            <pubDate>Thu, 18 Sep 2025 05:21:07 GMT</pubDate>
            <atom:updated>2026-05-05T10:28:08.300Z</atom:updated>
            <content:encoded><![CDATA[<h3>Biryani, Reels, and Rescues: Why Your Phone Makes it Easier to Eat Than to Help.</h3><blockquote>We built apps for everything. So why are animals still dying on the street?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*O2ktw0n-qrTGqnRb" /></figure><p>We live in a world where technology has taught us how to order biryani in two clicks, find a ride in five minutes, and stream endless reels without lifting a finger.</p><p>But try to find help for a child lost on the street. A family without shelter. An animal bleeding on the road.</p><p>Suddenly there’s no button. No trained network. No one-tap solution. You’re Googling, calling numbers that don’t pick up, hoping someone shows up.</p><p>I know this feeling personally. It’s why I built <strong>Savarrior </strong>— a platform to connect injured street animals with vets and NGOs in real time. And it’s why, after building it, I hit a wall I wasn’t ready for.</p><p>This is what I learned about why good apps built for good reasons keep failing — and what it would actually take to change that.</p><h3><strong>The Habit Trap: Why we choose Reels over Rescue</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8glRUhgqfVZnksPc" /></figure><p>You probably haven’t opened your email app today. But you’ve checked Instagram at least twice.</p><p>It’s not because your emails are less important. It’s because Instagram gives you something your inbox doesn’t — instant, effortless reward. You tap, you laugh, you feel something. No effort required.</p><p>Psychologists call this a dopamine loop. Your brain learns: this app = good feeling = open again. Over time, opening Instagram becomes as automatic as breathing.</p><p>Now think about a social good app. Reporting an injured animal requires emotional energy. It might mean making calls, waiting, following up. In the best case, it asks something of you. Your brain — the same brain that loves Instagram — quietly files it in the same folder as email. Important. But not now.</p><p>It don’t mean you are a bad person. It’s biology. And until builders understand this, they’ll keep making apps that feel meaningful to build and invisible to use.</p><h3>Tech is Just 10% of the Solution</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*plRojFRD3QuYbcNL" /></figure><p>Now, Imagine the best restaurant in the world. Beautiful menu. Stunning design. One problem — no kitchen, no chef, no food.</p><p>That’s what most social good apps are.</p><p>When you hit “report injured animal” on Savarrior at 2 AM, that button is beautiful. The code behind it works perfectly. But the real product isn’t the app — it’s the network of vets, volunteers, and NGO workers who are awake, available, and able to move.</p><p>Without them, the button is just a button.</p><p>Netflix works the same whether you’re in Mumbai or a village in Bengal. A rescue app only works if there’s an active community within 5 kilometers of you. That’s not a tech problem. That’s an infrastructure problem. And no amount of clean UI fixes it.</p><p>I learned this the hard way. I called close to a hundred NGOs to get them onto Savarrior. Five joined. Not because they didn’t care — but because they were already overwhelmed, underfunded, and one more app felt like one more thing to manage, not one more resource.</p><p>So the lesson is that, when you build for social good, you’re not just writing code. You’re trying to hold together a safety net made of exhausted, underpaid, deeply committed humans. If they’re not there, the net doesn’t exist.</p><h3>Funds &amp; Money: The Secret Gamechanger</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lKbyhymgb8iP8tkX" /></figure><p>You pay for Netflix every month without thinking. Spotify too. Maybe YouTube Premium.</p><p>Not because they matter more than clean water or animal welfare. But because they deliver something reliable and immediate in return — entertainment, escape, a small daily vacation from real life.</p><p>Now think about the last time you donated to a local NGO. Or paid for an app that existed to help someone else.</p><p>Most of us haven’t. And that silence is slowly bankrupting the people doing the most important work.</p><p>Here’s what running a rescue operation actually costs: fuel for the ambulance, medicine for the surgery, rent for the shelter, a salary for the vet who has their own family to feed. None of that is covered by passion. None of it is covered by downloads.</p><p>Most social good apps aren’t built by companies with funding. They’re built by students and young founders — people like me — paying for server costs out of pocket just to keep the report button working. Not because we’re heroes. Because we care and we don’t know what else to do.</p><p>The harsh truth: in the eyes of most investors, “improving a life” isn’t as profitable as “disrupting a market.” Until that changes — until users start supporting social good the way they support their entertainment subscriptions — the people doing the real work will keep running on empty.</p><h3><strong>The “Tata Strategy”: Why Empathy Must Come Before the App</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*-dKqy0QGVaL1CR5FLXGzJA.jpeg" /><figcaption>Mr. Ratan Tata</figcaption></figure><p>We keep waiting for a viral app to fix things. It won’t.</p><p>Ratan Tata didn’t change India by telling people to be better. He built things people actually needed — cars, steel, hospitals — and then used the strength from that success to fund the world he wanted to see. He didn’t preach empathy. He operationalized it.</p><p>That’s the model worth copying.</p><p>If you know how to code, build something people need. If you understand design, make something people actually use. Take the skills you have, earn real traction with them, and then point that energy at something that matters. This is less frustrating than waiting for the world to change — and it puts the power in your hands right now.</p><p>But here’s the part that doesn’t fit in an app: the small, physical, real-world acts that build the trust no platform can manufacture.</p><p>Help your street dog get vaccinated. Visit the NGO you’ve been meaning to donate to. Stop for the person who needs help before you look for an app that might connect you to someone who will. Real change has always started in the physical world first. Technology just helps it scale.</p><h3>What I Did When I Hit the Wall</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n9KN7XMjLwbKFN8Y" /></figure><p>When <strong>Savarrior </strong>hit its limits, I had a choice. Shut it down and call it a learning experience. Or find a way to keep it alive in a form that actually worked.</p><p>I didn’t have billions to rewire human habits. I couldn’t shift government budgets or hire engineers. I was a teenager with a laptop and a cause.</p><p>So I stopped trying to pull people into the app and took Savarrior to where people already were — social media, WhatsApp groups, real communities. The mission stayed identical. The execution got realistic.</p><p>Apps get deleted. Communities stay.</p><h3>Final Thought</h3><blockquote>Technology can accelerate change. But only humans can make change real.</blockquote><p>The reason good apps fail isn’t bad code. It’s that we built digital solutions for problems that are still, at their core, human ones — problems of habit, infrastructure, money, and trust. Fixing those things takes longer than a sprint cycle. It takes presence. Consistency. Showing up even when the downloads are low and the calls go unanswered.</p><p>If we choose empathy over instant gratification — even slightly, even slowly — the market will follow. It always does.</p><p>Until then: build your skills, earn your strength, and be the person you’ve been waiting for someone else to be.</p><p>Building something for social good? I’d love to hear about it. Find me at <a href="https://www.instagram.com/decodeaditya/">@decodeaditya</a> or through <a href="https://www.savarrior.com/">Savarrior</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2abbd2c4340" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Was 16 When I Built a Rescue App for Street Animals in India. Here’s What Broke.]]></title>
            <link>https://medium.com/@decodeaditya/savarrior-app-how-one-teen-built-a-tech-solution-for-animal-welfare-4fbcea5a4c55?source=rss-105fa167113f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fbcea5a4c55</guid>
            <category><![CDATA[animal-welfare]]></category>
            <category><![CDATA[india]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Aditya Pal]]></dc:creator>
            <pubDate>Wed, 17 Sep 2025 08:49:19 GMT</pubDate>
            <atom:updated>2026-05-05T08:03:14.774Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>From Coding Clones to Solving Real-World Pain</strong></h3><blockquote>What building an animal rescue app in India taught me about the gap between code and real-world impact.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GX_z8oG_NXP5CNCDNetPmw.jpeg" /></figure><p>I was standing on a road <strong>watching a dog bleed</strong>. I had a phone in my hand. Fifty apps on it. Zomato, Amazon — things that could get me anything in under an hour. But I had no idea which vet was nearby. No idea which NGO operated in my area. No idea if anyone was even coming.</p><p>I just stood there. Helpless. Phone in hand.</p><p>That moment stayed with me for a long time. Because it wasn’t just about that one dog. It was about a system that had figured out how to deliver biryani in two taps but hadn’t figured out how to get help to an animal bleeding on the same road.</p><p>I was already volunteering with animal welfare organizations by then — IMPAAC Foundation, Save a Stray — watching NGO workers run on passion and zero infrastructure. Watching how much time got lost in the gap between “someone saw an injured animal” and “someone actually showed up.”</p><p>I was a teenager who knew how to code. And I kept thinking: this is a coordination problem. I can build something for this.</p><p>That’s where Savarrior began.</p><h3><strong>Branding of a Mission: Why “Savarrior”?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*tQWi9LqkOz-4yppOHSr1FQ.png" /></figure><p>Names usually come last. This one came like a gut feeling.</p><p>I needed something that could hold two things at once — the softness it takes to stop for a street animal when everyone else walks by, and the stubbornness it takes to keep going when systems fail and people say it can’t be done.</p><p>So I fused two words into one. <strong>Savior + Warrior = Savarrior.</strong></p><p>The Savior half is empathy — the quiet belief that every rescue, however small, is a universe saved for that one animal. The Warrior half is grit — because fighting for creatures who have no voice means pushing against apathy, broken infrastructure, and the long silence of ignored reports.</p><p>Every person who files a rescue, adds a vet to the database, or shares a story is a Savarrior. They are the ones making the mission real. The app was always meant to serve them.</p><h3>The first wall: A website nobody needed</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VSf5zki-1B-TUoJwM1-ukQ.png" /></figure><p>I built a website first. I was genuinely proud of it.</p><p>Then I thought about the actual moment it was supposed to help — an animal injured on a busy road, adrenaline spiking, someone standing there not knowing what to do.</p><p>Nobody in that moment is opening a browser, typing a URL, and waiting for a page to load. The website was built for a calm desk. The problem lived on a chaotic street. I had solved the wrong version of the problem entirely.</p><p>So I scrapped it. I stayed up late for weeks teaching myself App Development, because I kept thinking about that dog on the road and I couldn’t justify moving slowly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0YOJ9SjR55XsfkFwlq9HgA.png" /></figure><p>The app that came out of it finally matched the urgency:</p><ul><li><strong>Real-time alerts</strong> that pinged nearby users and NGOs the moment a rescue was reported — not sitting in a database, actually moving.</li><li><strong>Live locator</strong> using geolocation to find the nearest vets and NGOs right now, with working numbers.</li><li><strong>One-tap reporting</strong> — as fast as taking a photo, because in those moments every second matters.</li></ul><p><strong>The Lesson I got :</strong><br>Don’t get attached to your codebase. Get attached to the problem. If your work doesn’t survive contact with reality, your effort doesn’t matter.</p><h3>The second wall: An activist’s blunt truth</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3fNxSLdagDy-T5DIb9Y6Qg.jpeg" /><figcaption>Going to Vegan fest :)</figcaption></figure><p>With the app built, I rolled up my sleeves and went to the ground.</p><p>I spent time with Volunteers and activists — not to show them what I’d made, but to see if it survived contact with reality. One activist looked at the app, looked at me, and said something I wasn’t ready to hear:</p><p><em>“Due to limited facilities on the ground, an app alone won’t work in most of India.”</em></p><p>It stung. I had been so focused on building a clean, functional product that I hadn’t fully confronted what existed on the other side of the notification. You can send an alert in seconds. But if the NGO receiving it has no vehicle, no space, no available volunteer — the alert saves no one.</p><p>I had been building for a world where the network just needed a digital bridge. What I found was that the network itself was fractured. NGOs running on empty. Vets already stretched. Infrastructure that no sprint cycle could fix.</p><p>That conversation broke my assumptions open in the best possible way. I stopped building for an ideal world and started building for the real one — patchy and exhausting and still worth trying.</p><p>Around this time, I met <strong>Robin Singh</strong> — co-founder of Peepal Farm, one of India’s most respected animal welfare organizations. Someone who has spent years healing animals the world walked past.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FyezC-NKsimo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fshorts%2FyezC-NKsimo%3Fsi%3D_xt0NYe2EpzQKk6i&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FyezC-NKsimo%2Fhq2.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a2b622c82eef205ddbf4f33bfeeebcbc/href">https://medium.com/media/a2b622c82eef205ddbf4f33bfeeebcbc/href</a></iframe><p>So, He told me the app was good. That meant something — Robin doesn’t say things he doesn’t mean. But then he said something that hit harder than any compliment could:</p><p><em>“Tech is a vehicle, not a destination.”</em></p><p>I had been so in love with building the car that I had completely forgotten where it was supposed to go. I was optimizing features, fixing bugs, making the UI cleaner — while the actual mission was sitting in the backseat waiting. One line from him reframed everything I thought I was doing.</p><h3>What actually happened!</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FRqkraxCDorU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DRqkraxCDorU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FRqkraxCDorU%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/879478608ce92b93e5aac581c225e323/href">https://medium.com/media/879478608ce92b93e5aac581c225e323/href</a></iframe><p>I called close to a hundred NGOs to get them on the platform.</p><p>Five joined.</p><p>I sat with that number for a while. Not with self-pity — but with real curiosity. Why didn’t more join? Was it the pitch? The timing? The infrastructure problem the activist had warned me about? I started asking those questions honestly, and the answer was usually some version of: <em>they were already overwhelmed, and one more app wasn’t going to change that.</em></p><p>Downloads were modest. The “Uber for rescue” model I had imagined ran into the same wall most social good apps hit — you can’t code an ambulance into existence. The supply side didn’t exist at scale yet.</p><p>I could have called it a failure. But I found an old Urdu couplet that described it better than I could:</p><blockquote>“वो अफ़्साना जिसे अंजाम तक लाना न हो मुमकिन,<em> </em>उसे इक ख़ूब-सूरत मोड़ दे कर छोड़ना अच्छा”</blockquote><blockquote>(When a story cannot reach its intended end, it is better to give it a beautiful turn and let it evolve.)</blockquote><p>So Savarrior evolved.</p><h3>What Savarrior Is Now</h3><p>Apps get deleted. Communities stay.</p><p>Savarrior shifted from a standalone rescue app to something more grounded — a growing community on social media and WhatsApp, a database of vets and NGOs built one real connection at a time, a space where rescue stories live and where the infrastructure is being built slowly, the way real things get built.</p><p>The mission is identical. The execution just got realistic.</p><p>Every vet added, every story shared, every person who joins makes the foundation stronger — and more ready to scale when the real-world infrastructure finally catches up. I believe it will.</p><p>Savarrior is still compiling. The database is growing. And when the ground is ready, the code will be waiting for it.</p><h3>What Building This Taught Me</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u1a7wbh-l36wOvgT" /></figure><p><strong>Code is a tool, not a savior.</strong> Software bridges gaps. It doesn’t bandage dogs. If your product ignores the exhaustion of an NGO worker or the cost of fuel for a rescue vehicle, it’s solving a problem on paper that doesn’t exist on the street.</p><p><strong>Infrastructure matters more than connectivity.</strong> Tech fixes the gap between people knowing and people connecting. Only community fixes the gap between connecting and actually helping. Community takes time, trust, and presence that no two-week sprint can manufacture.</p><p><strong>Talk to the people already doing the work — before you decide what to build.</strong> The most useful feedback I received didn’t come from beta testers. It came from a vet in Himachal and an activist who’d been on the streets for a decade. Get uncomfortable. Ask real people real questions.</p><p><strong>Modest adoption isn’t failure.</strong> The five NGOs who joined when most didn’t — that meant something. The skills built through all of this — resilience, the ability to sit with honest failure, the discipline to keep going — those compound. You carry them into everything you build next.</p><p><strong>Passion is the only fuel that doesn’t run out.</strong> When the downloads flatlined, when the calls went unanswered, the only thing that kept this alive was genuinely caring about the cause. That’s not a soft thing. That’s the only durable thing I found.</p><h3>Join the Mission</h3><p>The story of Savarrior is still being written — and it needs more people willing to be part of it.</p><ol><li><strong>Join the Community:</strong> <a href="https://www.savarrior.com/join-community">https://www.savarrior.com/join-community</a></li><li><strong>Contribute:</strong> <a href="https://forms.gle/Fit7Y7mRjZaNR2q36">Add a vet or NGO to our database</a></li><li><strong>Be the Bridge:</strong> Tag <strong>@savarrior_project</strong>, share a rescue story, help us grow this infrastructure of empathy one real connection at a time.</li></ol><p>All links: <a href="https://linktr.ee/savarrior_project">linktr.ee/savarrior_project</a></p><p><em>Want to understand why most social good apps fail at execution, not intention? </em><a href="https://medium.com/@decodeaditya/why-most-social-good-apps-fail-and-how-a-few-actually-succeed-b2abbd2c4340"><em>I wrote about that here.</em></a></p><p>And I couldn’t end this without saying — Siddharth Mishra and Aditya Gupta — you didn’t have to show up for this. But you did, every time. That means more than I’ll probably ever say out loud.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fbcea5a4c55" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>