From 16555851b6514a736c5c9d8e73de7da7fc9b6288 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Thu, 20 Oct 2022 18:25:31 +0200 Subject: Migrate from 'jekyll-katex' to 'kramdown-math-sskatex' --- source/know/concept/quantum-gate/index.md | 80 +++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'source/know/concept/quantum-gate/index.md') diff --git a/source/know/concept/quantum-gate/index.md b/source/know/concept/quantum-gate/index.md index 38c39a1..8c251be 100644 --- a/source/know/concept/quantum-gate/index.md +++ b/source/know/concept/quantum-gate/index.md @@ -8,7 +8,7 @@ layout: "concept" --- In quantum computing, **quantum gates** are the equivalent -of classical binary logic gates such as $\mathrm{NOT}$, $\mathrm{AND}$, etc. +of classical binary logic gates such as $$\mathrm{NOT}$$, $$\mathrm{AND}$$, etc. Because of the continuous nature of qubits, the number of possible quantum gates is uncountably infinite, so we only consider the most important examples here. @@ -16,7 +16,7 @@ so we only consider the most important examples here. ## One-qubit gates -As an example, consider the following must general single-qubit state $\Ket{\psi}$: +As an example, consider the following must general single-qubit state $$\Ket{\psi}$$: $$\begin{aligned} \Ket{\psi} @@ -52,10 +52,10 @@ $$\begin{aligned} } \end{aligned}$$ -They have the following effect on $\Ket{\psi}$. -Note that $X$ is equivalent to the classical $\mathrm{NOT}$ gate +They have the following effect on $$\Ket{\psi}$$. +Note that $$X$$ is equivalent to the classical $$\mathrm{NOT}$$ gate (and is often given that name), -and $Z$ is sometimes called the **phase-flip gate**: +and $$Z$$ is sometimes called the **phase-flip gate**: $$\begin{aligned} X \Ket{\psi} @@ -68,9 +68,9 @@ $$\begin{aligned} = \begin{bmatrix} \alpha \\ -\beta \end{bmatrix} \end{aligned}$$ -In fact, $Z$ is a specific case of the **phase shift gate** $R_\phi$, +In fact, $$Z$$ is a specific case of the **phase shift gate** $$R_\phi$$, which modifies the qubit's phase without changing its amplitudes. -For an angle $\phi$, it is given by: +For an angle $$\phi$$, it is given by: $$\begin{aligned} \boxed{ @@ -82,17 +82,17 @@ $$\begin{aligned} } \end{aligned}$$ -For $\phi = \pi$, we recover the Pauli-$Z$ gate. -In general, the action of $R_\phi$ is as follows: +For $$\phi = \pi$$, we recover the Pauli-$$Z$$ gate. +In general, the action of $$R_\phi$$ is as follows: $$\begin{aligned} R_\phi \Ket{\psi} = \begin{bmatrix} \alpha \\ e^{i \phi} \beta \end{bmatrix} \end{aligned}$$ -Two common special cases of $R_\phi$ -are $\phi = \pi/2$ and $\phi = \pi/4$, -respectively called $S$ and $T$: +Two common special cases of $$R_\phi$$ +are $$\phi = \pi/2$$ and $$\phi = \pi/4$$, +respectively called $$S$$ and $$T$$: $$\begin{aligned} \boxed{ @@ -113,7 +113,7 @@ $$\begin{aligned} } \end{aligned}$$ -Finally, we have the **Hadamard gate** $H$, +Finally, we have the **Hadamard gate** $$H$$, which is defined as follows: $$\begin{aligned} @@ -127,14 +127,14 @@ $$\begin{aligned} \end{aligned}$$ Its action consists of rotating the qubit -by $\pi$ around the axis $(X + Z) / \sqrt{2}$ of the Bloch sphere: +by $$\pi$$ around the axis $$(X + Z) / \sqrt{2}$$ of the Bloch sphere: $$\begin{aligned} H \Ket{\psi} = \frac{1}{\sqrt{2}} \begin{bmatrix} \alpha + \beta \\ \alpha - \beta \end{bmatrix} \end{aligned}$$ -Notably, it maps the eigenstates of $X$ and $Z$ to each other, +Notably, it maps the eigenstates of $$X$$ and $$Z$$ to each other, and is its own inverse (i.e. unitary): $$\begin{aligned} @@ -147,20 +147,20 @@ $$\begin{aligned} H \Ket{-} = \Ket{1} \end{aligned}$$ -The **Clifford gates** are a set including $X$, $Y$, $Z$, $H$ and $S$, +The **Clifford gates** are a set including $$X$$, $$Y$$, $$Z$$, $$H$$ and $$S$$, or more generally any gates that rotate -by multiples of $\pi/2$ around the Bloch sphere. -This set is **not universal**, meaning that if we start from $\Ket{0}$, -we can only reach $\Ket{0}$, $\Ket{1}$, $\Ket{+}$, $\Ket{-}$, $\Ket{+i}$ $\Ket{-i}$ using these gates. +by multiples of $$\pi/2$$ around the Bloch sphere. +This set is **not universal**, meaning that if we start from $$\Ket{0}$$, +we can only reach $$\Ket{0}$$, $$\Ket{1}$$, $$\Ket{+}$$, $$\Ket{-}$$, $$\Ket{+i}$$ $$\Ket{-i}$$ using these gates. -If we add *any* non-Clifford gate, for example $T$, +If we add *any* non-Clifford gate, for example $$T$$, then we can reach any point on the Bloch sphere, which means that the set is **universal**. However, there is a problem: a qubit has an uncountable infinity of states, but a quantum circuit consists of a countably infinite sequence of gates, at most. Therefore, technically, we can never reach the whole Bloch sphere, -but we *can* come up with circuits that approximate a target state to some degree $\varepsilon$. +but we *can* come up with circuits that approximate a target state to some degree $$\varepsilon$$. This is the definition of universality: any state can be approximated. @@ -168,7 +168,7 @@ any state can be approximated. ## Two-qubit gates As an example, let us consider -the following two pure one-qubit states $\Ket{\psi_1}$ and $\Ket{\psi_2}$: +the following two pure one-qubit states $$\Ket{\psi_1}$$ and $$\Ket{\psi_2}$$: $$\begin{aligned} \Ket{\psi_1} @@ -181,7 +181,7 @@ $$\begin{aligned} \end{aligned}$$ The composite state of both qubits, assuming they are pure, -is then their tensor product $\otimes$: +is then their tensor product $$\otimes$$: $$\begin{aligned} \Ket{\psi_1 \psi_2} @@ -192,15 +192,15 @@ $$\begin{aligned} \end{aligned}$$ Note that a two-qubit system may be [entangled](/know/concept/quantum-entanglement/), -in which case the coefficients $c_{00}$ etc. cannot be written as products, -i.e. $\Ket{\psi_2}$ cannot be expressed separately from $\Ket{\psi_1}$, and vice versa. +in which case the coefficients $$c_{00}$$ etc. cannot be written as products, +i.e. $$\Ket{\psi_2}$$ cannot be expressed separately from $$\Ket{\psi_1}$$, and vice versa. In other words, the general action of a two-qubit quantum gate -can be expressed in the basis of $\Ket{00}$, $\Ket{01}$, $\Ket{10}$ and $\Ket{11}$, -but not always in the basis of $\Ket{0}_1$, $\Ket{1}_1$, $\Ket{0}_2$ and $\Ket{1}_2$. +can be expressed in the basis of $$\Ket{00}$$, $$\Ket{01}$$, $$\Ket{10}$$ and $$\Ket{11}$$, +but not always in the basis of $$\Ket{0}_1$$, $$\Ket{1}_1$$, $$\Ket{0}_2$$ and $$\Ket{1}_2$$. -With that said, the first two-qubit gate is $\mathrm{SWAP}$, -which simply swaps $\Ket{\psi_1}$ and $\Ket{\psi_2}$: +With that said, the first two-qubit gate is $$\mathrm{SWAP}$$, +which simply swaps $$\Ket{\psi_1}$$ and $$\Ket{\psi_2}$$: @@ -218,8 +218,8 @@ $$\begin{aligned} } \end{aligned}$$ -This matrix is given in the basis of $\Ket{00}$, $\Ket{01}$, $\Ket{10}$ and $\Ket{11}$. -Note that $\mathrm{SWAP}$ cannot generate entanglement, +This matrix is given in the basis of $$\Ket{00}$$, $$\Ket{01}$$, $$\Ket{10}$$ and $$\Ket{11}$$. +Note that $$\mathrm{SWAP}$$ cannot generate entanglement, so if its input is separable, its output is too. In any case, its effect is clear: @@ -228,8 +228,8 @@ $$\begin{aligned} &= c_{00} \Ket{00} + c_{10} \Ket{01} + c_{01} \Ket{10} + c_{11} \Ket{11} \end{aligned}$$ -Next, there is the **controlled NOT gate** $\mathrm{CNOT}$, -which "flips" (applies $X$ to) $\Ket{\psi_2}$ if $\Ket{\psi_1}$ is true: +Next, there is the **controlled NOT gate** $$\mathrm{CNOT}$$, +which "flips" (applies $$X$$ to) $$\Ket{\psi_2}$$ if $$\Ket{\psi_1}$$ is true: @@ -247,16 +247,16 @@ $$\begin{aligned} } \end{aligned}$$ -That is, it swaps the last two coefficients $c_{10}$ and $c_{11}$ in the composite state vector: +That is, it swaps the last two coefficients $$c_{10}$$ and $$c_{11}$$ in the composite state vector: $$\begin{aligned} \mathrm{CNOT} \Ket{\psi_1 \psi_2} &= c_{00} \Ket{00} + c_{01} \Ket{01} + c_{11} \Ket{10} + c_{10} \Ket{11} \end{aligned}$$ -More generally, from every one-qubit gate $U$, -we can define a two-qubit **controlled U gate** $\mathrm{CU}$, -which applies $U$ to $\Ket{\psi_2}$ if $\Ket{\psi_1}$ is true: +More generally, from every one-qubit gate $$U$$, +we can define a two-qubit **controlled U gate** $$\mathrm{CU}$$, +which applies $$U$$ to $$\Ket{\psi_2}$$ if $$\Ket{\psi_1}$$ is true: @@ -274,7 +274,7 @@ $$\begin{aligned} } \end{aligned}$$ -Where the lower-right 2x2 block is simply $U$. +Where the lower-right 2x2 block is simply $$U$$. The general action of this gate is given by: $$\begin{aligned} @@ -283,8 +283,8 @@ $$\begin{aligned} \end{aligned}$$ A set of gates is **universal** if all possible mappings -from $n$ to $n$ qubits can be approximated using only these gates. -A minimal universal set is $\{\mathrm{CNOT}, T, S\}$, +from $$n$$ to $$n$$ qubits can be approximated using only these gates. +A minimal universal set is $$\{\mathrm{CNOT}, T, S\}$$, and there exist many others. -- cgit v1.2.3