Lecture 6: Early Quantum Algorithms I#

Warning

These lecture notes are a work in progress and are not a replacement for watching the lecture video, it’s intended to be a supplementary reading after watching the lecture.

Focus of Lecture#

After this lecture you should be able to:

  • Get an overview on the landscape of quantum algorithms that will be studied during the rest of the course.

  • Understand the Fourier transform and what it is used for.

  • Understand the quantum Fourier transform, how to make its circuit, and how it differs from the classical Fourier transform.

  • Introduce quantum phase estimation and its circuit.

  • Study the complexity and performance of quantum phase estimation.

Landscape of Quantum Algorithms#

../_images/algorithm_landscape.png

Fig. 40 Landscape of quantum algorithms.#

Fourier Analysis#

  • Invented by Joseph Fourier in the early 19th century, while studying heat transfer.

../_images/joseph_fourier.png

Fig. 41 Joseph Fourier.#

Fourier Analysis

Studies how complex functions can be approximated by sums of sines and cosines.

../_images/sincos.png

Fig. 42 Sine and cosine plots.#

Wide variety of applications:

  • Signal processing.

  • Electronics.

  • Machine learning.

  • Time series analysis.

  • Even quantum mechanics itself!

Fourier Transform: Definition#

  • Fourier Transform (FT): Converts a function into a representation of its frequency components:

\[\hat{f}(\omega) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}f(t)e^{-i\omega t}dt\]
  • Inverse Fourier Transform (IFT): Reconstructs a function from its frequency domain back to the original time domain:

\[{f}(t) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}\hat{f}(\omega)e^{i\omega t}d\omega\]

Fourier Transform: Frequency Composition#

../_images/fourier.gif

Fig. 43 Fourier transform animation (source: commons.wikipedia.org).#

  • The function can be expressed by a sum of trigonometric functions.

Note

The Fourier Transform gives us the frequencies of the functions composing the signal.

  • Remember the Euler formula:

\[e^{i\theta} = \cos\theta + i\sin\theta\]

Fourier Transform: Square Function#

../_images/fourier_spread.png

Fig. 44 Fourier transform of different square functions.#

  • Functions that are narrow in time are spread in frequency and vice versa.

  • Fourier transforms follow an uncertainty principle similar to Heisenberg’s one in quantum mechanics. A signal can’t be both localised in time and frequency:

\[\Delta t \cdot \Delta \omega \geq \frac{1}{2}\]

Quantum Fourier Transform: Definition#

  • Discrete Fourier Transform (DFT): Discrete analogue of FT. Transforms a vector of \(N\) complex numbers \((x_0,x_1,\dots,x_{N-1})\in\mathbb{C}\) to a vector \((y_0,y_1,\dots,y_{N-1})\in\mathbb{C}\):

\[y_j = \sum_{k=0}^{N-1}x_k e^{-i2\pi jk/N},\quad j=0,1,\dots,N-1\]
  • Quantum Fourier Transform (QFT): Converts a basis state \(\ket{j}\) to a superposition of all basis states, weighted by a complex phase encoding frequencies information:

\[\text{QFT}\ket{j} = \frac{1}{\sqrt{N}}\sum_{k=0}^{N-1}e^{i2\pi jk/N}\ket{k},\quad j=0,1,\dots,N-1\]
  • QFT is very similar to DFT, but:

    1. A normalisation term \(\frac{1}{\sqrt{N}}\) appears.

    2. The sign of the exponential is different (it is just a convention).

QFT: Basis States#

../_images/qft_1.png

Fig. 45 QFT of state \(\ket{0}\) (source: IBM Quantum Learning).#

\[\text{QFT} \ket{0} = \frac{1}{2} \left( e^{i 2\pi \cdot \textcolor{red}{0} \cdot 0 / 4} \ket{0} + e^{i 2\pi \cdot \textcolor{red}{0} \cdot 1 / 4} \ket{1} + e^{i 2\pi \cdot \textcolor{red}{0} \cdot 2 / 4} \ket{2} + e^{i 2\pi \cdot \textcolor{red}{0} \cdot 3 / 4} \ket{3} \right) = \frac{1}{2} \left( \ket{0} + \ket{1} + \ket{2} + \ket{3} \right)\]
  • \(\textcolor{red}{\text{QFT}\ket{j=0}}\) state produces an uniform superposition of all 4 basis states. All phases are 0.

../_images/qft_2.png

Fig. 46 QFT of state \(\ket{1}\) (source: IBM Quantum Learning).#

\[\text{QFT} \ket{1} = \frac{1}{2} \left( e^{i 2\pi \cdot \textcolor{red}{1} \cdot 0 / 4} \ket{0} + e^{i 2\pi \cdot \textcolor{red}{1} \cdot 1 / 4} \ket{1} + e^{i 2\pi \cdot \textcolor{red}{1} \cdot 2 / 4} \ket{2} + e^{i 2\pi \cdot \textcolor{red}{1} \cdot 3 / 4} \ket{3} \right) = \frac{1}{2} \left( \ket{0} + i\ket{1} - \ket{2} - i\ket{3} \right)\]
  • \(\textcolor{red}{\text{QFT}\ket{j}}\) will apply a phase increase of \(2\pi jk/N\) to each of the \(\ket{k}=0,1,...,N\) superposed states obtained.

../_images/qft_3.png

Fig. 47 QFT of state \(\ket{2}\) (source: IBM Quantum Learning).#

\[\text{QFT} \ket{2} = \frac{1}{2} \left( e^{i 2\pi \cdot \textcolor{red}{2} \cdot 0 / 4} \ket{0} + e^{i 2\pi \cdot \textcolor{red}{2} \cdot 1 / 4} \ket{1} + e^{i 2\pi \cdot \textcolor{red}{2} \cdot 2 / 4} \ket{2} + e^{i 2\pi \cdot \textcolor{red}{2} \cdot 3 / 4} \ket{3} \right) = \frac{1}{2} \left( \ket{0} - \ket{1} + \ket{2} - \ket{3} \right)\]
  • As we increase \(\textcolor{red}{\ket{j}}\) the rate of phase change will increase.

../_images/qft_4.png

Fig. 48 QFT of state \(\ket{3}\) (source: IBM Quantum Learning).#

\[\text{QFT} \ket{3} = \frac{1}{2} \left( e^{i 2\pi \cdot \textcolor{red}{3} \cdot 0 / 4} \ket{0} + e^{i 2\pi \cdot \textcolor{red}{3} \cdot 1 / 4} \ket{1} + e^{i 2\pi \cdot \textcolor{red}{3} \cdot 2 / 4} \ket{2} + e^{i 2\pi \cdot \textcolor{red}{3} \cdot 3 / 4} \ket{3} \right) = \frac{1}{2} \left( \ket{0} - i\ket{1} - \ket{2} + i\ket{3} \right)\]

Attention

Like in FT, in all cases we see that a narrow signal (the basis vector \(\textcolor{red}{\ket{j}}\)) is spread into a superposition of states, with phases varying with \(\textcolor{red}{j}\).

QFT: General States and Inverse#

  • For a general state \(\ket{\psi}=\sum_{j=0}^{N-1}x_j\ket{j}\):

\[\text{QFT} \ket{\psi} = \sum_{j=0}^{N-1} x_j \colorbox{#86efac}{\(\displaystyle\frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} e^{i 2\pi j k / N} \ket{k}\)}\]

The highlighted term is the QFT applied to the basis vectors.

  • The QFT also has an inverse (IQFT):

\[\text{QFT}^\dagger \ket{\psi} = \sum_{j=0}^{N-1} x_j \left( \frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} e^{\colorbox{#bfdbfe}{$\displaystyle-$}i 2\pi j k / N} \ket{k}\right)\]

Only the sign changes with respect to the QFT.

  • \(\textcolor{red}{\text{QFT}^\dagger\text{QFT}}\ket{\psi}=\ket{\psi}\). From the previous section: \(\text{QFT}^\dagger\left (\frac{1}{2}\sum_{i=0}^{N-1}\ket{i}\right )=\ket{0}\)

QFT: Product representation I#

  • Binary representation of a n-qubit basis:

\[\ket{j} = \ket{j_{1}2^{n-1} + j_{2}2^{n-2} + \cdots + j_{n}2^{0}} \equiv \textcolor{red}{\ket{j_1j_2\cdots j_n}}\]
  • Binary fraction notation:

\[0. j_{l}j_{l+1}\dots j_{m}=\frac{j_l}{2}+\frac{j_{l+1}}{4}+\cdots+\frac{j_m}{2^{m-l+1}}\]
\[\begin{split}\textcolor{blue}{\boldsymbol{\rightarrow}}\begin{array}{c}\textcolor{green}{j_1}=1 \\ \textcolor{blue}{j_2} =0 \\ \textcolor{green}{j_3} =1 \end{array}\rightarrow 0.j_1j_2j_3=\frac{\textcolor{green}{1}}{2}+\frac{\textcolor{blue}{0}}{4}+\frac{\textcolor{green}{1}}{8}\end{split}\]
  • Hadamard gate in binary fraction notation:

\[H\ket{j_1}=\frac{1}{\sqrt{2}}\left(\ket{0}+e^{i2\pi 0.j_1}\ket{1}\right)\]
\[\begin{split}\textcolor{blue}{\boldsymbol{\rightarrow}}\begin{array}{c} H\ket{0}=\frac{1}{\sqrt{2}}\left(\ket{0}+e^{i2\pi\cdot\textcolor{red}{0}/2}\ket{1}\right)=\frac{1}{\sqrt{2}}\left(\ket{0}+\ket{1}\right)\\H\ket{1}=\frac{1}{\sqrt{2}}\left(\ket{0}+e^{i2\pi\cdot\textcolor{red}{1}/2}\ket{1}\right)=\frac{1}{\sqrt{2}}\left(\ket{0}-\ket{1}\right)\end{array}\end{split}\]

QFT: Product representation II#

  • Using some algebra we get the product representation of QFT:

\[\begin{split}\begin{aligned} \ket{j} &\rightarrow \frac{1}{2^{n/2}} \sum_{k=0}^{2^n - 1} e^{2\pi i jk / 2^n} \ket{k} \\ &= \frac{1}{2^{n/2}} \sum_{k_1 = 0}^{1} \cdots \sum_{k_n = 0}^{1} e^{2\pi i j \sum_{l=1}^{n} k_l 2^{-l}} \ket{k_1 \dots k_n} \\ &= \frac{1}{2^{n/2}} \sum_{k_1 = 0}^{1} \cdots \sum_{k_n = 0}^{1} \bigotimes_{l=1}^{n} e^{2\pi i jk_l 2^{-l}}\ket{k_l} \\ &= \frac{1}{2^{n/2}} \bigotimes_{l=1}^{n}\left(\sum_{k_l=0}^{1} e^{2\pi i jk_l2^{-l}} \ket{k_l} \right) \\ &= \frac{1}{2^{n/2}} \bigotimes_{l=1}^{n} \left( \ket{0} + e^{2\pi i j 2^{-l}} \ket{1} \right) \\ &= \frac{1}{2^{n/2}} \left( \ket{0} + e^{2\pi i \, 0.j_n} \ket{1} \right) \left( \ket{0} + e^{2\pi i \, 0.j_{n-1} j_n} \ket{1} \right) \cdots \left( \ket{0} + e^{2\pi i \, 0.j_1 j_2 \cdots j_n} \ket{1} \right) \end{aligned}\end{split}\]

Expanding the notation:

\[\ket{j_1 j_2 \cdots j_n}\rightarrow\frac{1}{\sqrt{N}} \left(\ket{0} + e^{i2\pi \frac{j_n}{2}}\ket{1}\right) \left(\ket{0} + e^{i2\pi \left(\frac{j_{n-1}}{2}+\frac{j_n}{4}\right)}\ket{1}\right) \cdots \left(\ket{0} + e^{i2\pi \left(\frac{j_1}{2}+\frac{j_2}{4}+\cdots+\frac{j_n}{2^n}\right)}\ket{1}\right)\]

Attention

Product representation will help us understanding how the QFT circuit is built!

QFT: Circuit I#

  • Parameterised version of phase rotation gate:

\[\begin{split} R_k = \left(\begin{array}{cc}1 & 0 \\ 0 & e^{i2\pi/2^{k}}\end{array}\right) \rightarrow R_k\ket{j_1} = e^{i2\pi j_1/2^{k}}\ket{j_1}\end{split}\]
  • Controlled phase rotation (\(CR_k\)) gate:

\[CR_k\ket{j_1j_2} = \ket{j_1}e^{i2\pi j_1j_2/2^{k}}\ket{j_2}\]
../_images/cr_gate.png

Fig. 49 Building block of the QFT circuit.#

\[\ket{\psi_1}=\left(\ket{0} + e^{i2\pi0.j_1}\ket{1}\right)\ket{j_2}\]
\[\ket{\psi_2}=\left(\ket{0} + e^{i2\pi0.j_1j_2}\ket{1}\right)\ket{j_2}\]

QFT: Circuit II#

../_images/qft_circuit.png

Fig. 50 3 qubit QFT circuit.#

\[\ket{\psi_1} = \left(\textcolor{blue}{\ket{0}+e^{i2\pi0.j_1j_2j_3}\ket{1}}\right)\ket{j_2}\ket{j_3}\]
\[\ket{\psi_2} = \left({\ket{0}+e^{i2\pi0.j_1j_2j_3}\ket{1}}\right)\left(\textcolor{blue}{\ket{0}+e^{i2\pi0.j_2j_3}\ket{1}}\right)\ket{j_3}\]
\[\ket{\psi_3} = \left(\textcolor{blue}{\ket{0}+e^{i2\pi0.j_3}\ket{1}}\right)\left({\ket{0}+e^{i2\pi0.j_2j_3}\ket{1}}\right)\left({\ket{0}+e^{i2\pi0.j_1j_2j_3}\ket{1}}\right)\]

IQFT: Circuit#

../_images/iqft_circuit.png

Fig. 51 3 qubit IQFT circuit.#

  • The order of gates is inverted.

  • The order of qubits is inverted.

  • We use the adjoints of the operators.

  • Hadamard and SWAP are hermitian operators, so they are equal to their adjoints.

QFT and FT#

Quantum Fourier Transform

Classical Fourier Transform

Data

\(N\) amplitudes held in only \(n = \log N\) qubits

\(N\) numbers stored explicitly

Cost

\(O(\log N \log N)\) gates

\(O(N \log N)\) operations

Output

Cannot read the amplitudes; a measurement returns one \(k\), sampled with probability \(\lvert y_k\rvert^2\)

Can read all \(N\) values \(y_k\)

Input

Need the state \(\sum_j x_j\ket{j}\) already prepared, which can itself be expensive

Any vector you can write down

  • The QFT has better computational complexity in terms of input size, but its speedup only materialises when embedded in a larger quantum algorithm.

Attention

Even though quantum amplitudes are not directly accessible, the QFT plays a central role in powerful quantum algorithms such as Shor’s factoring algorithm and Quantum Phase Estimation (QPE).

Quantum Phase Estimation: Definition#

  • Initially introduced by Alexei Kitaev in 1995.

../_images/kitaev.png

Fig. 52 Alexei Kitaev.#

  • A unitary operator \(U\) has norm-1 eigenvalues:

\[U\ket{u} = e^{i2\pi\phi}\ket{u}\]

Quantum Phase Estimation

Quantum Phase Estimation (QPE) tries to estimate \(\phi\).

  • QPE assumes that:

    1. \(\textcolor{blue}{\ket{u}}\) can be efficiently prepared.

    2. A controlled-\(\textcolor{blue}{U^{2^{t}}}\) gate can be prepared.

This is a reasonable assumption because:

  1. Extracting eigenvalues classically is hard.

  2. Many problems in quantum mechanics and physics involve finding eigenvalues of an operator.

QPE: Circuit Preliminaries I#

  • A unitary operator \(U\) verifies that:

\[U^{2^t} \ket{u} = \underbrace{U \cdots U}_{\textcolor{red}{2^t}} \ket{u} = \underbrace{e^{i 2\pi \phi} \cdots e^{i 2\pi \phi}}_{\textcolor{red}{2^t}} \ket{u} = e^{i 2\pi {\textcolor{red}{2^t}}\phi} \ket{u}\]
  • We can build a controlled version of this gate \(C\text{-}U^{2^t}\) so that:

\[\begin{split}\begin{array}{c} C\text{-}U^{2^t}\ket{0}\ket{u} = \ket{0}\ket{u} \\[10pt] C\text{-}U^{2^t}\ket{1}\ket{u} = \ket{1}e^{i2\pi {\textcolor{red}{2^t}}\phi}\ket{u}\end{array}\end{split}\]

QPE: Circuit Preliminaries II#

../_images/qpe_1.png

Fig. 53 Building block of the QPE circuit.#

\[\ket{\psi_1} = \ket{0}\ket{u}\]
\[\ket{\psi_2} = \frac{1}{\sqrt{2}}\left(\ket{0}\ket{u}+\ket{1}\ket{u}\right)\]
\[\ket{\psi_3} = \frac{1}{\sqrt{2}}\left(\ket{0}\ket{u}+\ket{1}e^{i 2\pi 2^{t}\phi}\ket{u}\right) = \frac{1}{\sqrt{2}}\left(\ket{0}+\ket{1}e^{i 2\pi 2^{t}\phi}\right)\ket{u}\]

QPE: Circuit I#

../_images/qpe_2.png

Fig. 54 QPE first step circuit.#

  • The state of the first register will be:

\[\frac{1}{2^{t/2}} \left(\ket{0} + e^{2\pi i 2^{t-1}\phi}\ket{1}\right) \cdots \left(\ket{0} + e^{2\pi i 2^{1}\phi}\ket{1}\right) \left(\ket{0} + e^{2\pi i 2^{0}\phi}\ket{1}\right)\]

QPE: Circuit II#

  • Recalling the binary fraction notation for \(\phi\):

\[0.\phi_1\phi_2\cdots\phi_t = \frac{\phi_1}{2} + \frac{\phi_2}{4} + \cdots + \frac{\phi_t}{2^t}\]
  • We can rewrite the state of the first register as:

\[\frac{1}{2^{t/2}} \left(\ket{0} + e^{2\pi i \,0.\phi_t}\ket{1}\right) \left(\ket{0} + e^{2\pi i \,0.\phi_{t-1}\phi_t}\ket{1}\right) \cdots \left(\ket{0} + e^{2\pi i \,0.\phi_1\phi_2\cdots\phi_t}\ket{1}\right)\]

Demonstration. The qubit with the power \(2^k\), for \(k=0,1,\dots,t-1\), is in the state:

\[\ket{0} + e^{2\pi i\, 2^{k}\phi}\ket{1}\]

Using the binary fraction expansion of \(\phi\), multiplying by \(2^k\) shifts every bit \(k\) places to the left:

\[2^k\phi = \sum_{m=1}^{t}\phi_m\,2^{k-m}\]

We split the sum at \(m=k\). The terms with \(m\leq k\) have a non-negative exponent, so they add up to an integer \(N_k\). The terms with \(m>k\) have a negative exponent, so they are a binary fraction:

\[2^k\phi = \underbrace{\sum_{m=1}^{k}\phi_m\,2^{k-m}}_{\text{integer } N_k} + \underbrace{\sum_{m=k+1}^{t}\frac{\phi_m}{2^{\,m-k}}}_{=\,0.\phi_{k+1}\phi_{k+2}\cdots\phi_t}\]

Since \(e^{2\pi i N_k}=1\) for any integer \(N_k\), the integer part has no effect on the phase:

\[e^{2\pi i\, 2^{k}\phi} = e^{2\pi i N_k}\,e^{2\pi i\,0.\phi_{k+1}\cdots\phi_t} = e^{2\pi i\,0.\phi_{k+1}\cdots\phi_t}\]

Only the bits to the right of the binary point survive, so each qubit keeps a different number of bits of \(\phi\):

Power

Qubit state

Bits kept

\(k=t-1\)

\(\ket{0} + e^{2\pi i \,0.\phi_t}\ket{1}\)

last bit

\(k=t-2\)

\(\ket{0} + e^{2\pi i \,0.\phi_{t-1}\phi_t}\ket{1}\)

last two bits

\(\vdots\)

\(\vdots\)

\(\vdots\)

\(k=0\)

\(\ket{0} + e^{2\pi i \,0.\phi_1\phi_2\cdots\phi_t}\ket{1}\)

all bits

Taking the product of the \(t\) qubits, with the \(\frac{1}{\sqrt{2}}\) of each Hadamard giving the global factor \(\frac{1}{2^{t/2}}\), we obtain the expression above. For example, for \(t=3\):

\[\begin{split}\begin{aligned} 4\phi &= 2\phi_1+\phi_2+\tfrac{\phi_3}{2} \;\rightarrow\; 0.\phi_3 \\ 2\phi &= \phi_1+\tfrac{\phi_2}{2}+\tfrac{\phi_3}{4} \;\rightarrow\; 0.\phi_2\phi_3 \\ \phi &= \tfrac{\phi_1}{2}+\tfrac{\phi_2}{4}+\tfrac{\phi_3}{8} \;\rightarrow\; 0.\phi_1\phi_2\phi_3 \end{aligned}\end{split}\]

This derivation assumes that \(\phi\) can be written exactly with \(t\) bits.

  • This is the QFT acting on \(\phi = 0.\phi_1\phi_2\cdots\phi_t\)

Quantum Phase Estimation

Applying the inverse QFT to the first register yields \(\ket{\phi_1\phi_2\cdots\phi_t}\), and therefore the desired eigenvalue.

QPE: Circuit III#

../_images/qpe_3.png

Fig. 55 QPE full circuit.#

QPE: Complexity and performance I#

  • If \(\phi\) can be exactly expressed as a binary fraction, QPE yields the correct result 100% of the time. For example, \(\phi=\tfrac{3}{8} = \tfrac{0}{2}+\tfrac{1}{4}+\tfrac{1}{8}\), so QPE outputs \(\ket{011}\) with probability = 1.

  • If \(\phi\) can’t be exactly expressed as a binary fraction, e.g. \(\phi = \tfrac{1}{6}=0.16666...\), it has a repeating binary expansion \(\tfrac{1}{6} = 0.00\overline{10}\ldots\) that never terminates. QPE outputs the closest value to \(\phi\) with probability \(\textcolor{green}{\geq\frac{4}{\pi^{2}}\approx 0.40}\).

  • Increasing the number of qubits in the first register improves the approximation:

\(t\) qubits

Best approximation of \(\tfrac{1}{6}\)

Error

3

\(\tfrac{1}{8} = 0.125\)

\(0.042\)

4

\(\tfrac{3}{16} = 0.1875\)

\(0.021\)

5

\(\tfrac{5}{32} = 0.15625\)

\(0.010\)

QPE: Complexity and performance II#

../_images/qpe_results.png

Fig. 56 Result of QPE for an eigenvalue of 1/6.#

  • For \(\phi = \tfrac{1}{6}=0.166...\) we obtain the result \(\alpha=\ket{001}\) with highest probability (higher than \(\frac{4}{\pi^{2}}\)).

  • To estimate \(\phi\) to \(n\) bits of precision with failure probability at most \(\varepsilon\), the number of qubits \(t\) in the first register is given by:

\[t = \textcolor{red}{n} + \textcolor{green}{\left\lceil \log\left(2 + \frac{1}{2\varepsilon}\right)\right\rceil}\]
../_images/qpe_extra_qubits.png

Fig. 57 Extra qubits needed to reach a given failure probability.#

../_images/qpe_success_probability.png

Fig. 58 Success probability vs. extra qubits.#

QPE: Why it matters#

  • Comparison to classical: estimating eigenvalues of an \(N\times N\) unitary classically requires resources that scale with \(N=2^{n}\), whereas QPE needs only \(O(n)\) qubits and a number of controlled-\(U\) calls that is polynomial in \(n\), an exponential advantage whenever \(U\) can be implemented efficiently.

  • Apart from having many applications of its own, QPE is a core subroutine that powers many of the most important quantum algorithms, e.g.:

    • Shor’s algorithm for factoring.

    • Quantum chemistry and material sciences.

    • Solving linear systems (HHL algorithm).

    • Quantum walk and search algorithms.

Wrap-up#

  • The Fourier Transform decomposes a function into its frequency components, trading localisation in time for localisation in frequency.

  • The Quantum Fourier Transform (QFT) is the quantum analogue of the Discrete Fourier Transform, computable with exponentially fewer operations than the classical FFT, though its amplitudes cannot be read out directly.

  • Quantum Phase Estimation (QPE) uses the QFT to estimate the eigenvalue phase \(\phi\) of a unitary operator \(U\).

  • QPE and QFT are a core subroutine underlying many of the most important quantum algorithms, such as Shor’s algorithm, quantum chemistry simulation, and the HHL algorithm for linear systems.