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/toffoli-gate/index.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/know/concept/toffoli-gate/index.md') diff --git a/source/know/concept/toffoli-gate/index.md b/source/know/concept/toffoli-gate/index.md index ea546dc..7de7600 100644 --- a/source/know/concept/toffoli-gate/index.md +++ b/source/know/concept/toffoli-gate/index.md @@ -11,17 +11,17 @@ The **Toffoli gate** or **controlled-controlled-NOT (CCNOT) gate** is a logic gate that is *reversible* (no information is lost) and *universal* (all reversible logic circuits can be built using Toffoli gates). -It takes three input bits $A$, $B$ and $C$, -of which it returns $A$ and $B$ unchanged, -and flips $C$ if both $A$ and $B$ are true. +It takes three input bits $$A$$, $$B$$ and $$C$$, +of which it returns $$A$$ and $$B$$ unchanged, +and flips $$C$$ if both $$A$$ and $$B$$ are true. In circuit diagrams, its representation is: -This gate is reversible, because $A$ and $B$ are preserved, -and are all you need to reconstruct to $C$. +This gate is reversible, because $$A$$ and $$B$$ are preserved, +and are all you need to reconstruct to $$C$$. Moreover, this gate is universal, because we can make a NAND gate from it: @@ -47,8 +47,8 @@ Note that NOT is a special case of NAND: Using these, we can, as an example, make an OR gate from three Toffoli gates, -thanks to the fact that $A \lor B = \neg (\neg A \land \neg B)$, -i.e. OR is NAND of NOT $A$ and NOT $B$: +thanks to the fact that $$A \lor B = \neg (\neg A \land \neg B)$$, +i.e. OR is NAND of NOT $$A$$ and NOT $$B$$: @@ -57,7 +57,7 @@ i.e. OR is NAND of NOT $A$ and NOT $B$: Thanks to its reversibility and universality, the Toffoli gate is interesting for quantum computing. Its [quantum gate](/know/concept/quantum-gate/) form is often called **CCNOT**. -In the basis $\Ket{A} \Ket{B} \Ket{C}$, its matrix is: +In the basis $$\Ket{A} \Ket{B} \Ket{C}$$, its matrix is: $$\begin{aligned} \boxed{ @@ -75,7 +75,7 @@ $$\begin{aligned} } \end{aligned}$$ -If we apply this gate to an arbitrary three-qubit state $\Ket{\psi}$, +If we apply this gate to an arbitrary three-qubit state $$\Ket{\psi}$$, it swaps the last two coefficients: $$\begin{aligned} -- cgit v1.2.3