From aeacfca5aea5df7c107cf0c12e72ab5d496c96e1 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Tue, 3 Jan 2023 19:48:17 +0100 Subject: More improvements to knowledge base --- source/know/concept/toffoli-gate/index.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 23dc81e..b8caba1 100644 --- a/source/know/concept/toffoli-gate/index.md +++ b/source/know/concept/toffoli-gate/index.md @@ -49,7 +49,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{ @@ -67,16 +67,16 @@ $$\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} - \mathrm{CCNOT} \Ket{\psi} - &= \mathrm{CCNOT} \big( c_{000} \Ket{000} + c_{001} \Ket{001} + c_{010} \Ket{010} + c_{011} \Ket{011} + \\ - &\qquad\qquad\quad\:\; c_{100} \Ket{100} + c_{101} \Ket{101} + c_{110} \Ket{110} + c_{111} \Ket{111} \big) + \mathrm{CCNOT} \ket{\psi} + &= \mathrm{CCNOT} \big( c_{000} \ket{000} + c_{001} \ket{001} + c_{010} \ket{010} + c_{011} \ket{011} + \\ + &\qquad\qquad\quad\:\; c_{100} \ket{100} + c_{101} \ket{101} + c_{110} \ket{110} + c_{111} \ket{111} \big) \\ - &= c_{000} \Ket{000} + c_{001} \Ket{001} + c_{010} \Ket{010} + c_{011} \Ket{011} + \\ - &\quad\,\, c_{100} \Ket{100} + c_{101} \Ket{101} + c_{111} \Ket{110} + c_{110} \Ket{111} + &= c_{000} \ket{000} + c_{001} \ket{001} + c_{010} \ket{010} + c_{011} \ket{011} + \\ + &\quad\,\, c_{100} \ket{100} + c_{101} \ket{101} + c_{111} \ket{110} + c_{110} \ket{111} \end{aligned}$$ -- cgit v1.2.3