diff --git a/example_notebooks/blind_z_gate.ipynb b/example_notebooks/blind_z_gate.ipynb index 22e43d57..d4338ebc 100644 --- a/example_notebooks/blind_z_gate.ipynb +++ b/example_notebooks/blind_z_gate.ipynb @@ -7,7 +7,7 @@ "source": [ "# Blind Z Gate\n", "\n", - "In the following we exemplify how to implement an X gate with `pytket-mbqc`.\n", + "In the following we exemplify how to implement an Z gate with `pytket-mbqc`.\n", "\n", "We first initialise a graph state with 2 physical qubits and 3 logical qubits. The number of logical qubits can be higher than the number of phisical qubits if qubits are reused, as is the case here." ] @@ -35,7 +35,7 @@ "id": "3515b03b", "metadata": {}, "source": [ - "Note that before any operations constructing a graph state have been added there is a round of randomness generation. This randomness is saved in the `rand` registers.\n", + "Note that before any operations constructing a graph state have been added there is a round of randomness generation. \n", "\n", "Next we create a linear cluster state consisting of 3 qubits. Note that vertices are measured once all of the edges they connect to are added. This allows for some qubit reuse.\n", "\n", @@ -53,7 +53,7 @@ "\n", "input_vertex = graph_circuit.add_graph_vertex(measurement_order=0)\n", "\n", - "graph_vertex = graph_circuit.add_graph_vertex(measurement_order=None)\n", + "graph_vertex = graph_circuit.add_graph_vertex(measurement_order=1)\n", "graph_circuit.add_edge(input_vertex, graph_vertex)\n", "graph_circuit.corrected_measure(vertex=input_vertex, t_multiple=4)\n", "\n", @@ -101,7 +101,7 @@ "compiled_circuit = backend.get_compiled_circuit(graph_circuit)\n", "n_shots = 100\n", "result = backend.run_circuit(circuit=compiled_circuit, n_shots=n_shots)\n", - "result.get_counts(cbits=output_reg)" + "graph_circuit.get_output_result(result=result).get_counts()" ] } ], diff --git a/example_notebooks/verified_z_gate.ipynb b/example_notebooks/verified_z_gate.ipynb index 3d00eb7d..d75043c9 100644 --- a/example_notebooks/verified_z_gate.ipynb +++ b/example_notebooks/verified_z_gate.ipynb @@ -18,6 +18,7 @@ "metadata": {}, "outputs": [], "source": [ + "import networkx as nx\n", "import pytest\n", "\n", "from ocvqc_py import GraphCircuit\n", @@ -41,7 +42,9 @@ "graph_circuit.add_edge(vertex_two, vertex_three)\n", "graph_circuit.corrected_measure(vertex=vertex_two, t_multiple=0)\n", "\n", - "graph_circuit.corrected_measure(vertex=vertex_three, t_multiple=0)" + "graph_circuit.corrected_measure(vertex=vertex_three, t_multiple=0)\n", + "\n", + "nx.draw(graph_circuit.entanglement_graph, with_labels=True)" ] }, {