Sitemap
Michael Kim

Michael Kim

Quantum Computing, Seen Through the Eyes of an Old IT Guy (Part 4)

10 min readJul 13, 2026

--

Kor version ← Click!

Picking apart the quantum algorithms I kept running into

The deeper I got into quantum computing, the more I realized how much I didn’t know. Getting comfortable with the vocabulary was hard enough, but the algorithms were so foreign and tangled that I decided it was time to sort them out.

I can’t cover them all, so I picked only the ones that kept showing up while I was studying.

I’m not sure how simply I can put this in writing, but explaining alongside pictures should help. The algorithms are complex, sure, but my bet is this: if you know what each one is FOR, and you can follow the circuit diagram, you can see how it achieves its goal.

A mathematical approach would be nice too, but hey, I’m an IT guy.

1. Essential Algorithms

The most basic? Maybe. But truly important.

  • QFT
  • QPE
Press enter or click to view image in full size

1–1. QFT (Quantum Fourier Transform)

Converts data into wave phase information and stores it inside a quantum superposition. In other words, it maps the 0 & 1 information that lived in qubit amplitudes onto phase angles on the complex plane.

Put simply: it turns data into phase.

Use Cases

  • The core engine for building quantum algorithms
  • Shor’s Algorithm: factoring huge numbers far faster than classical computers
  • QPE (Quantum Phase Estimation): finding the phase of a quantum operation. The foundation of quantum chemistry

QFT Circuit

Press enter or click to view image in full size
  1. q_2 passes through an H gate and enters superposition
  2. If q_1 is 1, rotate q_2’s phase by 90 degrees — P(pi/2).
    If q_1 is 0, nothing happens
  3. If q_0 is 1, rotate q_2’s phase by 45 degrees — P(pi/4).
    If q_0 is 0, nothing happens.
    q_2’s possible phases: (0, 45, 90, 135, 180, 225, 270, 315)
  4. q_1 passes through an H gate and enters superposition
  5. If q_0 is 1, rotate q_1’s phase by 90 degrees — P(pi/2).
    If q_0 is 0, nothing happens.
    q_1’s possible phases: (0, 90, 180, 270)
  6. q_0 passes through an H gate and enters superposition.
    q_0’s possible phases: (0, 180)
  7. Swap the states of q_0 and q_2

After the full QFT circuit:

  • q_0’s phase: (0, 45, 90, 135, 180, 225, 270, 315)
  • q_1’s phase: (0, 90, 180, 270)
  • q_2’s phase: (0, 180)

1–2. QPE (Quantum Phase Estimation)

An algorithm that finds a phase and extracts it as digital data (0s and 1s). Direction wise, it’s the opposite of QFT: QFT turns data into phase, QPE reads phase back out as data. (And in fact, an inverse QFT sits inside the QPE circuit as a core component.)

Use Cases

  • Shor’s Algorithm: the core engine that finds a function’s period for factoring
  • Quantum chemistry and materials simulation: computing ground state energies of molecules and atoms with high precision
  • HHL algorithm: the basis of finding a matrix’s eigenvalues and inverting them to solve linear systems

QPE Circuit

Press enter or click to view image in full size
  1. q_0 passes through H and enters superposition.
    q_1 passes through H and enters superposition.
    q_2 passes through X and becomes 1
  2. When q_0 is 1, apply a P(pi/2) rotation to the target q_2 (= rotating q_0’s phase by 90 degrees).
    Because q_2 was set to 1 by the X gate, phase kickback occurs at P: q_2’s phase stays put and q_0’s phase changes instead.
    A P gate meeting a 1 triggers phase kickback (each gate has its own conditions = complicated).
    If q_0 is 0, nothing happens.
    q_0’s phase: (90) — skipping the 0-degree reference, we say q_0’s relative phase is now fixed at 90 degrees
  3. When q_1 is 1, apply P(pi) to the target q_2.
    Again phase kickback: q_2’s phase stays, q_1’s phase rotates by 180 degrees.
    If q_1 is 0, nothing happens.
    q_1’s phase: (180)
  4. Swap the phases of q_0 and q_1.
    q_0: (180), q_1: (90)
  5. q_1 passes through H, converting phase into value.
    Since this is q_1’s second H gate, the phase disappears and it takes on a value.
    Because q_1 carried a 90-degree phase into superposition, interference makes its wave churn.
    q_0: 180, q_1: phase unreadable
  6. If q_0 is 1, rotate q_1’s phase by -90 degrees — P(-pi/2).
    q_1 swapped phases with q_0 earlier, and q_0 had been influenced by P(pi/2), so P(-pi/2) cancels that leftover 90 degrees of noise and cleans up q_1’s wave.
    q_0: 180, q_1: phase unreadable
  7. q_0 passes through H, converting phase into value.
    Second H for q_0, so the phase disappears and it takes on a value.
    q_0: phase unreadable, q_1: phase unreadable
  8. Read q_0 and q_1 through the M gates = stored in c: 0 1.
    q_0: phase gone, q_1: phase gone

2. NISQ (Noisy Intermediate Scale Quantum)

The way I understand it: a quantum computer with the potential to beat supercomputers, but still unable to fix its own errors, so it can’t compute for long.

The signature usage pattern of this era is the hybrid algorithm. The quantum computer just throws hints, and the heavy calculation and orchestration get handed to a classical computer.

Two pairs to look at:

  • QAOA & LR-QAOA
  • VQE & QC-AFQMC

2–1. QAOA & LR-QAOA

Press enter or click to view image in full size

QAOA (Quantum Approximate Optimization Algorithm)

A hybrid quantum algorithm designed to solve combinatorial optimization problems, finding the best answer among enormous numbers of possibilities.

A classical optimizer repeatedly tunes the parameters inside the quantum circuit, pushing the probability of the right answer as high as it can go.

Use Cases

  • Logistics: finding the fastest route across many delivery stops
  • Finance: finding the asset allocation that minimizes risk and maximizes return
  • Scheduling: building the most efficient factory schedules or shift tables

QAOA Circuit

  • q_0 passes through H and enters superposition
  • q_1 passes through H and enters superposition
  • When q_0 is 1, flip the target q_1 — CNOT
  • Rotate q_1’s phase by 2γ (gamma) — Rz(2*γ)
  • When q_0 is 1, flip q_1 back to restore it — CNOT. This sandwich distinguishes when the two qubits differ (01, 10) from when they match (00, 11)
  • Based on the problem’s conditions, the wave gets a penalty or reward phase (a score) of γ
  • q_0 passes through Rx(2*β) and the waves mix
  • q_1 passes through Rx(2*β) and the waves mix. The Rx gate uses the angle β (beta) to stir the phases and trigger interference. Wrong-answer waves get erased by destructive interference, right-answer waves get amplified by constructive interference

LR-QAOA (Linear Ramp Quantum Approximate Optimization Algorithm)

Get Michael Kim’s stories in your inbox

Join Medium for free to get updates from this writer.

In vanilla QAOA, every layer requires the classical computer to grind through rounds of optimization hunting for the best gamma and beta. Naturally, that becomes a time and resource bottleneck.

LR-QAOA is the version that throws away the classical hamster wheel entirely.

Instead, it feeds the qubits a predetermined straight-line course (the Linear Ramp): gamma rises steadily from 0, beta falls steadily from its maximum down to 0.

Use Cases

  • Overhead-Free Optimization: run the circuit straight through on the pre-set ramp schedule, no classical intervention, solving logistics or finance optimization in far less time
  • Scalable Quantum Benchmarking: with no randomly searched parameters, the result is deterministic. Run the same LR-QAOA schedule on different quantum computers (IBM, IonQ, Quantinuum, and so on) and compare which hardware survives deeper circuits without errors. A stress-test tool

2–2. VQE & QC-AFQMC

Press enter or click to view image in full size

VQE (Variational Quantum Eigensolver)

A hybrid quantum algorithm where quantum and classical computers cooperate to find a complex system’s most stable state (the lowest-energy state, the ground state).

The classical computer repeatedly adjusts the quantum circuit’s parameters, hunting for the quantum state that yields the lowest energy.

Use Cases

  • Chemistry: accurately computing ground-state energies of complex molecules and atoms to simulate chemical reactions
  • Novel Materials: reliably designing new materials and drugs (batteries, catalysts) whose structures are too heavy for classical computers to calculate

VQE Circuit

  • q_0 passes through an Ry gate, rotating around the Y axis by an angle the classical computer chose (θ[0]). This puts q_0 into a superposition with a specific probability proportional to the angle, not the 50:50 split an H gate gives
  • q_1 passes through an Ry gate, rotating by θ[1] into its own weighted superposition
  • If q_0 is 1, flip the target q_1 — CNOT. If q_0 is 0, nothing happens
  • The now-entangled q_0 passes through a second Ry gate, rotating once more by a new angle (θ[2])
  • The now-entangled q_1 passes through a second Ry gate, rotating by θ[3]

If the computed energy isn’t the minimum, the classical computer nudges θ[0] through θ[3] and runs the whole thing again from the top. Repeat forever until the energy stops dropping!

QC-AFQMC (Quantum-Classical Auxiliary-Field Quantum Monte Carlo)

A hybrid algorithm combining a quantum computer’s VQE hypothesis with a classical computer’s computational muscle (AFQMC).

AFQMC, the classical method, nails molecular energies, but it has a weakness: without a Trial State (an initial hypothesis) to set its direction, its mathematical error (the sign problem) blows up.

The quantum computer (VQE), on the other hand, is great at building those complex states, but it’s so noisy that carrying the calculation to the end skews the answer.

How it works: so the quantum computer (VQE) only builds the near-perfect Trial State, and the classical computer (AFQMC) takes it from there to derive the final energy.

Use Cases

  • Strongly Correlated Materials: pinning down the properties of transition-metal compounds, catalysts, and high-temperature superconductors, where electron interactions are too tangled for classical supercomputers
  • Overcoming NISQ: even when noise keeps VQE alone from reaching the perfect answer (chemical accuracy), as long as VQE sets a good reference, classical AFQMC corrects it and delivers the result. A classical-plus-quantum allied force that squeezes practical results out of today’s imperfect quantum computers

3. FTQC (Fault Tolerant Quantum Computing)

The real quantum computer: one that fixes its own errors as they occur and can therefore carry out long, complex computations. FTQC bundles unstable Physical Qubits together into one unbreakable Logical Qubit.

People say things like ‘RSA could collapse’ or ‘cryptocurrency could be broken’ once FTQC arrives. Maybe. I’m honestly not sure it plays out that way. Post-quantum cryptography (PQC) standardization is already underway, and by then encryption will probably have leveled up too.

For FTQC, two algorithms:

  • Shor’s Algorithm
  • Grover’s Algorithm

3–1. Shor’s Algorithm

Press enter or click to view image in full size

Named after Peter Shor, the mathematician who published it in 1994.

The legendary quantum algorithm that factors huge numbers in a flash, numbers that a classical computer couldn’t crack even given the age of the universe.

  • Core idea: convert factoring, a math problem, into period finding, a physics problem about waves
  • QPE and QFT are the core machinery. Pass the tangled waves through QFT to extract the phase, and a classical computer uses that value as the clue to compute the final primes

Use Cases

  • Breaking RSA Encryption: the most famous and most lethal use case. Banks, email, and HTTPS worldwide rely on RSA, which depends on ‘factoring big numbers is really hard.’ The moment Shor’s algorithm runs for real, they say nearly every digital lock on the planet swings open
  • Breaking ECC: beyond factoring, the Discrete Logarithm Problem underlying elliptic-curve cryptography (used by Bitcoin and other cryptocurrencies) also falls to Shor’s algorithm
  • Catalyst for Post-Quantum Cryptography (PQC): Shor’s algorithm can’t yet run properly due to hardware limits (NISQ), but its theoretical existence alone has governments and companies worldwide racing to develop and standardize quantum-resistant cryptography
  • FTQC Benchmark: Shor’s algorithm only produces an answer if the machine survives thousands or tens of thousands of gate operations without error. So the day someone says ‘our quantum computer ran codebreaking-scale Shor,’ it also means the era of true FTQC with full error correction has arrived

3–2. Grover’s Algorithm

Press enter or click to view image in full size

Named after Lov Grover, the computer scientist who devised it in 1996.

A quantum search algorithm that finds the answer in a massive unsorted database far faster than a classical computer. (Square-root speed.)

If a classical computer has to open 100 boxes one by one, needing up to 100 tries, Grover’s algorithm finds the answer in just 10.

  • Core idea: Amplitude Amplification. Lay all the data out in superposition, then a device called the Oracle flips only the answer’s wave (phase). Then a device called the Diffuser reflects the flipped wave about the average of all waves, shaving down the wrong answers’ probabilities while amplifying the right one’s. Repeat a few times and the answer’s probability approaches 100%

Use Cases

  • Unstructured Database Search: finding data matching a condition inside a jumbled pile with no index or structure
  • Symmetric Key & Hash Cryptanalysis: if Shor breaks RSA, Grover threatens symmetric ciphers like AES and hash functions like SHA. It cuts brute-force attack time to its square root, which is why the security industry responds by doubling key lengths (e.g., AES-128 to AES-256)
  • Speeding up NP-Complete Search: for problems with insane numbers of possibilities and no clean formula (traveling salesman, scheduling, Sudoku), it cuts the brute-force search down to square-root scale
  • Quantum Machine Learning Subroutines: an engine that dramatically shortens the time spent searching huge feature spaces for pattern recognition or anomaly detection

Phew~~~ That was a long, long breath.
The more I look at it, the more it seems like there is more to do.

I truly respect the people who research QC. They must be insane..…

Part 5 ← Click!

--

--