From 1fd7884c3c71ed1f012e18937343f3ad2d48de28 Mon Sep 17 00:00:00 2001 From: Joachim Schwarm Date: Thu, 2 Jan 2020 13:23:07 +0100 Subject: [PATCH 1/2] Toffoli Controls need to in state |1> --- content/ch-gates/basic-circuit-identities.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ch-gates/basic-circuit-identities.ipynb b/content/ch-gates/basic-circuit-identities.ipynb index 4bdb1d84c..4359c3cc1 100644 --- a/content/ch-gates/basic-circuit-identities.ipynb +++ b/content/ch-gates/basic-circuit-identities.ipynb @@ -371,7 +371,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The Toffoli gate is a three-qubit gate with two controls and one target. It performs an X on the target only if both controls are in the state $|0\\rangle$. The final state of the target is then equal to either the AND or the NAND of the two controls, depending on whether the initial state of the target was $|0\\rangle$ or $|1\\rangle$. A Toffoli can also be thought of as a controlled-controlled-NOT, and is also called the CCX gate.\n", + "The Toffoli gate is a three-qubit gate with two controls and one target. It performs an X on the target only if both controls are in the state $|1\\rangle$. The final state of the target is then equal to either the AND or the NAND of the two controls, depending on whether the initial state of the target was $|0\\rangle$ or $|1\\rangle$. A Toffoli can also be thought of as a controlled-controlled-NOT, and is also called the CCX gate.\n", "\n", "```python\n", "# Toffoli with control qubits a and b and target t\n", From 1b175f0d63f65f29cfdffeccd5eccd9eb7e7c6b6 Mon Sep 17 00:00:00 2001 From: Abraham Asfaw Date: Fri, 10 Jan 2020 13:27:24 -0500 Subject: [PATCH 2/2] Update basic-circuit-identities.ipynb --- content/ch-gates/basic-circuit-identities.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/ch-gates/basic-circuit-identities.ipynb b/content/ch-gates/basic-circuit-identities.ipynb index 4359c3cc1..02528c9b1 100644 --- a/content/ch-gates/basic-circuit-identities.ipynb +++ b/content/ch-gates/basic-circuit-identities.ipynb @@ -351,7 +351,7 @@ "\n", "![A controlled version of a gate V](https://s3.us-south.cloud-object-storage.appdomain.cloud/strapi/4efe86a907a64a59a720b4dc54a98a88iden1.png)\n", "\n", - "Here `A`, `B` and `C` are gates that implement $A$ , $B$ and $C$, and must be defined as custom gates. For example, if we wanted $A$ to be $R_x(\\pi/4)$, the custom would be defined as\n", + "Here `A`, `B` and `C` are gates that implement $A$ , $B$ and $C$, respectively, and must be defined as custom gates. For example, if we wanted $A$ to be $R_x(\\pi/4)$, the custom would be defined as\n", "\n", "```python\n", "qc_a = QuantumCircuit(1, name='A')\n",