Skip to content

Commit

Permalink
Merge pull request qiskit-community#138 from schwarmco/134-toffoli-state
Browse files Browse the repository at this point in the history
Toffoli Controls need to be in state |1>
  • Loading branch information
Abraham Asfaw authored Jan 10, 2020
2 parents c97b55a + 1b175f0 commit a6bc9e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/ch-gates/basic-circuit-identities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit a6bc9e4

Please sign in to comment.