summaryrefslogtreecommitdiff
path: root/source/know/concept/toffoli-gate
diff options
context:
space:
mode:
Diffstat (limited to 'source/know/concept/toffoli-gate')
-rw-r--r--source/know/concept/toffoli-gate/and.avifbin0 -> 2109 bytes
-rw-r--r--source/know/concept/toffoli-gate/index.md24
-rw-r--r--source/know/concept/toffoli-gate/nand.avifbin0 -> 1834 bytes
-rw-r--r--source/know/concept/toffoli-gate/not.avifbin0 -> 1518 bytes
-rw-r--r--source/know/concept/toffoli-gate/or.avifbin0 -> 3505 bytes
-rw-r--r--source/know/concept/toffoli-gate/toffoli.avifbin0 -> 1261 bytes
-rw-r--r--source/know/concept/toffoli-gate/xor.avifbin0 -> 2128 bytes
7 files changed, 6 insertions, 18 deletions
diff --git a/source/know/concept/toffoli-gate/and.avif b/source/know/concept/toffoli-gate/and.avif
new file mode 100644
index 0000000..357c40d
--- /dev/null
+++ b/source/know/concept/toffoli-gate/and.avif
Binary files differ
diff --git a/source/know/concept/toffoli-gate/index.md b/source/know/concept/toffoli-gate/index.md
index 7de7600..ba9d3ba 100644
--- a/source/know/concept/toffoli-gate/index.md
+++ b/source/know/concept/toffoli-gate/index.md
@@ -16,43 +16,31 @@ of which it returns $$A$$ and $$B$$ unchanged,
and flips $$C$$ if both $$A$$ and $$B$$ are true.
In circuit diagrams, its representation is:
-<a href="toffoli.png">
-<img src="toffoli.png" style="width:19%">
-</a>
+{% include image.html file="toffoli.png" width="19%" alt="Toffoli gate symbol" %}
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:
-<a href="nand.png">
-<img src="nand.png" style="width:38%">
-</a>
+{% include image.html file="nand.png" width="38%" alt="NAND gate made of Toffoli gate" %}
A NAND is enough to implement every conceivable circuit.
That said, we can efficiently implement NOT, AND, and XOR using a single Toffoli gate too.
Note that NOT is a special case of NAND:
-<a href="not.png">
-<img src="not.png" style="width:32%">
-</a>
+{% include image.html file="not.png" width="32%" alt="NOT gate made of Toffoli gate" %}
-<a href="and.png">
-<img src="and.png" style="width:35%">
-</a>
+{% include image.html file="and.png" width="35%" alt="AND gate made of Toffoli gate" %}
-<a href="xor.png">
-<img src="xor.png" style="width:35%">
-</a>
+{% include image.html file="xor.png" width="35%" alt="XOR gate made of Toffoli gate" %}
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$$:
-<a href="or.png">
-<img src="or.png" style="width:50%">
-</a>
+{% include image.html file="or.png" width="50%" alt="OR gate made of Toffoli gates" %}
Thanks to its reversibility and universality,
the Toffoli gate is interesting for quantum computing.
diff --git a/source/know/concept/toffoli-gate/nand.avif b/source/know/concept/toffoli-gate/nand.avif
new file mode 100644
index 0000000..53a5d65
--- /dev/null
+++ b/source/know/concept/toffoli-gate/nand.avif
Binary files differ
diff --git a/source/know/concept/toffoli-gate/not.avif b/source/know/concept/toffoli-gate/not.avif
new file mode 100644
index 0000000..b277a83
--- /dev/null
+++ b/source/know/concept/toffoli-gate/not.avif
Binary files differ
diff --git a/source/know/concept/toffoli-gate/or.avif b/source/know/concept/toffoli-gate/or.avif
new file mode 100644
index 0000000..82dd391
--- /dev/null
+++ b/source/know/concept/toffoli-gate/or.avif
Binary files differ
diff --git a/source/know/concept/toffoli-gate/toffoli.avif b/source/know/concept/toffoli-gate/toffoli.avif
new file mode 100644
index 0000000..9c34431
--- /dev/null
+++ b/source/know/concept/toffoli-gate/toffoli.avif
Binary files differ
diff --git a/source/know/concept/toffoli-gate/xor.avif b/source/know/concept/toffoli-gate/xor.avif
new file mode 100644
index 0000000..8ed742d
--- /dev/null
+++ b/source/know/concept/toffoli-gate/xor.avif
Binary files differ