From afdc74024b89585652a60f23098212d7ca525849 Mon Sep 17 00:00:00 2001 From: AnnePicus Date: Sun, 23 Feb 2025 15:46:09 +0200 Subject: [PATCH] Graph Cut Search Problem with Grover Oracle English suggestions --- .../grover/grover_max_cut/grover_max_cut.ipynb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/algorithms/grover/grover_max_cut/grover_max_cut.ipynb b/algorithms/grover/grover_max_cut/grover_max_cut.ipynb index 2cc1c115..21effbde 100644 --- a/algorithms/grover/grover_max_cut/grover_max_cut.ipynb +++ b/algorithms/grover/grover_max_cut/grover_max_cut.ipynb @@ -13,13 +13,13 @@ "id": "5193de81-389e-4a87-89dc-1acb2f2630e0", "metadata": {}, "source": [ - "The \"Maximum Cut Problem\" (MaxCut) [[1](#MaxCutWiki)] is an example of combinatorial optimization problem. It refers to finding a partition of a graph into two sets, such that the number of edges between the two sets is maximal.\n", + "The \"Maximum Cut Problem\" (MaxCut) [[1](#MaxCutWiki)] is an example of a combinatorial optimization problem. It refers to finding a partition of a graph into two sets, such that the number of edges between the two sets is the maximum.\n", "\n", "## Mathematical Formulation\n", "\n", - "Given a graph $G=(V,E)$ with $|V|=n$ nodes and $E$ edges, a cut is defined as a partition of the graph into two complementary subsets of nodes. In the MaxCut problem we look for a cut where the number of edges between the two subsets is maximal. We can represent a cut of the graph by a binary vector $x$ of size $n$, assigning 0 and 1 to nodes in the first and second subsets, respectively. The number of connecting edges for a given cut is simply given by summing over $x_i (1-x_j)+x_j (1-x_i)$ for every pair of connected nodes $(i,j)$.\n", + "Given a graph $G=(V,E)$ with $|V|=n$ nodes and $E$ edges, a cut is defined as a partition of the graph into two complementary subsets of nodes. In the MaxCut problem we look for a cut where the number of edges between the two subsets is the maximum. We can represent a cut of the graph by a binary vector $x$ of size $n$, assigning 0 and 1 to nodes in the first and second subsets, respectively. The number of connecting edges for a given cut is simply given by summing over $x_i (1-x_j)+x_j (1-x_i)$ for every pair of connected nodes $(i,j)$.\n", "\n", - "# Solving with the Classiq Platform\n" + "## Solving with the Classiq Platform\n" ] }, { @@ -52,7 +52,7 @@ "id": "6e32027b-edd3-47d2-bb68-233bbea58fc9", "metadata": {}, "source": [ - "### Define the Cut Search Problem" + "### Defining the Cut Search Problem" ] }, { @@ -60,7 +60,7 @@ "id": "a651a787-2c21-476d-8426-5a5f1be75e10", "metadata": {}, "source": [ - "We use SymPy to create an formula for the cut, for use later in the quantum algorithm." + "We use SymPy to create an formula for the cut, for use later in the quantum algorithm:" ] }, { @@ -90,7 +90,7 @@ "id": "39d882bc-56e8-4680-8803-14b1dd05d115", "metadata": {}, "source": [ - "### Define a Specific Problem Input" + "### Defining a Specific Problem Input" ] }, { @@ -219,7 +219,7 @@ } }, "source": [ - "## Synthesizing the Circuit\n", + "### Synthesizing the Circuit\n", "\n", "We synthesize the circuit using the Classiq synthesis engine. The synthesis takes several seconds:" ] @@ -246,7 +246,7 @@ "tags": [] }, "source": [ - "## Showing the Resulting Circuit\n", + "### Showing the Resulting Circuit\n", "\n", "After the Classiq synthesis engine finishes the job, we display the resulting circuit in the interactive GUI:" ] @@ -302,7 +302,7 @@ } }, "source": [ - "### Execute on a Simulator to Find a Valid Solution\n", + "### Executing on a Simulator to Find a Valid Solution\n", "Lastly, we run the resulting circuit on the Classiq execute interface using the `execute` function." ] },