diff --git a/docs/build/circuit-library.ipynb b/docs/build/circuit-library.ipynb index 07072ca7fc0..0c4496897bf 100644 --- a/docs/build/circuit-library.ipynb +++ b/docs/build/circuit-library.ipynb @@ -19,6 +19,57 @@ "This page lists the different circuit categories the library provides. For a full list of circuits, see the [circuit library API documentation](/api/qiskit/circuit_library)." ] }, + { + "cell_type": "markdown", + "id": "0b473350", + "metadata": {}, + "source": [ + "## Standard gates\n", + "\n", + "The circuit library also includes standard quantum gates. Some are more fundamental gates (such as the `UGate`), and others are multi-qubit gates that usually need building from single- and two-qubit gates. To add imported gates to your circuit, use the `append` method; the first argument is the gate, and the next argument is a list of qubits to apply the gate to.\n", + "\n", + "For example, the following code cell creates a circuit with a Hadamard gate and a multi-controlled-X gate." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a846a845-7ac5-4c92-b124-d2b90a773ba2", + "metadata": {}, + "outputs": [ + { + "data": { + "image/svg+xml": [ + "" + ], + "text/plain": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from qiskit import QuantumCircuit\n", + "from qiskit.circuit.library import HGate, MCXGate\n", + "mcx_gate = MCXGate(3)\n", + "hadamard_gate = HGate()\n", + "\n", + "qc = QuantumCircuit(4)\n", + "qc.append(hadamard_gate, [0])\n", + "qc.append(mcx_gate, [0,1,2,3])\n", + "qc.draw('mpl')" + ] + }, + { + "cell_type": "markdown", + "id": "e5066595", + "metadata": {}, + "source": [ + "See [Standard gates](/api/qiskit/circuit_library#standard-gates) in the circuit library API documentation." + ] + }, { "cell_type": "markdown", "id": "f1d7c8c9-1b4d-45e1-9cd5-c5d76c2e25ab", @@ -389,58 +440,6 @@ "See [Arithmetic circuits](/api/qiskit/circuit_library#arithmetic-circuits) in the circuit library API documentation." ] }, - { - "cell_type": "markdown", - "id": "ee5a64f5-1316-4217-a443-f09cb6d35c19", - "metadata": {}, - "source": [ - "## Standard gates\n", - "\n", - "The circuit library also includes standard quantum gates. Some are more fundamental gates (such as the `UGate`), and others are multi-qubit gates that usually need building from single- and two-qubit gates. To add imported gates to your circuit, use the `append` method; the first argument is the gate, and the next argument is a list of qubits to apply the gate to.\n", - "\n", - "For example, the following code cell creates a circuit with a Hadamard gate and a multi-controlled-X gate." - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "a846a845-7ac5-4c92-b124-d2b90a773ba2", - "metadata": {}, - "outputs": [ - { - "data": { - "image/svg+xml": [ - "" - ], - "text/plain": [ - "
" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from qiskit import QuantumCircuit\n", - "from qiskit.circuit.library import HGate, MCXGate\n", - "mcx_gate = MCXGate(3)\n", - "hadamard_gate = HGate()\n", - "\n", - "qc = QuantumCircuit(4)\n", - "qc.append(hadamard_gate, [0])\n", - "qc.append(mcx_gate, [0,1,2,3])\n", - "qc.draw('mpl')" - ] - }, - { - "cell_type": "markdown", - "id": "d6c33a70", - "metadata": {}, - "source": [ - "See [Standard gates](/api/qiskit/circuit_library#standard-gates) in the circuit library API documentation." - ] - }, { "cell_type": "markdown", "id": "9a900a84-c52f-4a03-b3e9-87c71fa93e88",