Sitemap
Lokesh P D

Lokesh P D

Stay Hungry, Stay Curious

๐Ÿš€ ๐Ÿฏ๐Ÿฌ ๐——๐—ฎ๐˜†๐˜€ โ€ข ๐Ÿฏ๐Ÿฌ ๐—–๐—ผ๐—ป๐—ฐ๐—ฒ๐—ฝ๐˜๐˜€ ๐—ผ๐—ณ ๐—ค๐˜‚๐—ฎ๐—ป๐˜๐˜‚๐—บ ๐—–๐—ผ๐—บ๐—ฝ๐˜‚๐˜๐—ถ๐—ป๐—ด | ๐——๐—ฎ๐˜† ๐Ÿญ๐Ÿญ

2 min readJul 23, 2026

--

Hi everyone !

โ€œClassical computers process bits. Quantum computers transform quantum states.โ€

In the previous post, we learned that a qubit is described by probability amplitudes, not just probabilities. These amplitudes behave like waves and determine the likelihood of measuring 0 or 1.

But this leads to an important questionโ€ฆ

๐Ÿค” How does a quantum computer change these amplitudes to perform computation?

The answer is Quantum Gates.

๐—ช๐—ต๐—ฎ๐˜ ๐—ฎ๐—ฟ๐—ฒ ๐—ค๐˜‚๐—ฎ๐—ป๐˜๐˜‚๐—บ ๐—š๐—ฎ๐˜๐—ฒ๐˜€?

In a classical computer, logic gates like AND, OR, and NOT manipulate bits.

A quantum computer also uses gates โ€” but instead of changing bits, they transform the quantum state of qubits.

Rather than simply flipping 0 to 1, quantum gates modify a qubitโ€™s probability amplitudes and phase, allowing it to evolve according to the laws of quantum mechanics.

Think of them as the instructions that guide how a qubit changes over time.

๐—ง๐—ต๐—ฒ ๐—›๐—ฎ๐—ฑ๐—ฎ๐—บ๐—ฎ๐—ฟ๐—ฑ (๐—›) ๐—š๐—ฎ๐˜๐—ฒ

Imagine a qubit starts in the state:

|0โŸฉ

Measuring it now always gives 0.

Now apply a Hadamard (H) Gate.

The state becomes:

(|0โŸฉ + |1โŸฉ) / โˆš2

The H gate doesnโ€™t tell the qubit to become 1.

Instead, it transforms the quantum state so that measuring the qubit gives:

Get Lokesh P Dโ€™s stories inย yourย inbox

Join Medium for free to get updates fromย thisย writer.

โ€ข 50% โ†’ |0โŸฉ
โ€ข 50% โ†’ |1โŸฉ

It creates superposition, enabling the qubit to explore multiple possibilities simultaneously.

๐—ง๐—ต๐—ฒ ๐—ญ ๐—š๐—ฎ๐˜๐—ฒ: ๐—–๐—ต๐—ฎ๐—ป๐—ด๐—ถ๐—ป๐—ด ๐—ฃ๐—ต๐—ฎ๐˜€๐—ฒ

Now apply a Z Gate.

The state changes to:

(|0โŸฉ โˆ’ |1โŸฉ) / โˆš2

Interestingly, the measurement probabilities remain 50% and 50%.

So what changed?

The phase.

Although invisible during a single measurement, phase determines how qubits interfere with each other after more quantum gates are applied. This interference strengthens some outcomes while weakening others.

Press enter or click to view image in full size

๐—ช๐—ต๐˜† ๐—”๐—ฟ๐—ฒ ๐—ค๐˜‚๐—ฎ๐—ป๐˜๐˜‚๐—บ ๐—š๐—ฎ๐˜๐—ฒ๐˜€ ๐—ฆ๐—ผ ๐—œ๐—บ๐—ฝ๐—ผ๐—ฟ๐˜๐—ฎ๐—ป๐˜?

A quantum computer doesnโ€™t solve problems by checking every answer one by one.

Instead, it applies carefully designed quantum gates that continuously reshape amplitudes and phases.

Through quantum interference, the probability of correct answers increases while incorrect ones become less likely.

Only after all these transformations are complete does the computer perform a measurement.

This is the foundation of powerful algorithms like Groverโ€™s Search and Shorโ€™s Algorithm.

๐—ง๐—ต๐—ผ๐˜‚๐—ด๐—ต๐˜ ๐—ผ๐—ณ ๐˜๐—ต๐—ฒ ๐——๐—ฎ๐˜†

โ€œQuantum gates donโ€™t tell a qubit what answer to give โ€” they shape the wave that makes the right answer most likely.โ€

๐—ก๐—ฒ๐˜…๐˜ ๐—ถ๐—ป ๐˜๐—ต๐—ฒ ๐—ฆ๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€

๐——๐—ฎ๐˜† ๐Ÿญ๐Ÿฎ โ€ข ๐—ค๐˜‚๐—ฎ๐—ป๐˜๐˜‚๐—บ ๐—–๐—ถ๐—ฟ๐—ฐ๐˜‚๐—ถ๐˜๐˜€: ๐—›๐—ผ๐˜„ ๐—ค๐˜‚๐—ฎ๐—ป๐˜๐˜‚๐—บ ๐—š๐—ฎ๐˜๐—ฒ๐˜€ ๐—ช๐—ผ๐—ฟ๐—ธ ๐—ง๐—ผ๐—ด๐—ฒ๐˜๐—ต๐—ฒ๐—ฟ ๐˜๐—ผ ๐—ฆ๐—ผ๐—น๐˜ƒ๐—ฒ ๐—–๐—ผ๐—บ๐—ฝ๐—น๐—ฒ๐˜… ๐—ฃ๐—ฟ๐—ผ๐—ฏ๐—น๐—ฒ๐—บ๐˜€.

--

--

Lokesh P D
Lokesh P D

Written by Lokesh P D

Stay Hungry, Stay Curious