diff --git a/tutorials/Classiq_tutorial/classiq_overview_tutorial.ipynb b/tutorials/Classiq_tutorial/classiq_overview_tutorial.ipynb index e4da61d7..3e456ffa 100644 --- a/tutorials/Classiq_tutorial/classiq_overview_tutorial.ipynb +++ b/tutorials/Classiq_tutorial/classiq_overview_tutorial.ipynb @@ -54,7 +54,6 @@ "outputs": [], "source": [ "@qfunc\n", - "\n", "def main(x: Output[QNum], y: Output[QNum]) -> None:\n", " allocate(3,x)\n", " hadamard_transform(x)\n", diff --git a/tutorials/Classiq_tutorial/synthesis_tutorial.ipynb b/tutorials/Classiq_tutorial/synthesis_tutorial.ipynb index a21afb4d..c4fdd850 100644 --- a/tutorials/Classiq_tutorial/synthesis_tutorial.ipynb +++ b/tutorials/Classiq_tutorial/synthesis_tutorial.ipynb @@ -14,12 +14,14 @@ }, { "cell_type": "code", + "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2025-02-19T09:57:25.784056Z", "start_time": "2025-02-19T09:57:25.755663Z" } }, + "outputs": [], "source": [ "from classiq import *\n", "\n", @@ -28,48 +30,48 @@ " allocate(x)\n", " hadamard_transform(x)\n", " y |= x**2 + 1" - ], - "outputs": [], - "execution_count": 3 + ] }, { "cell_type": "markdown", "metadata": {}, - "source": "First, let's synthesize to optimize on circuit depth, i.e. to minimize the longest chain of gates in the circuit and hence the overall execution time (and required coherence time)." + "source": [ + "First, let's synthesize to optimize on circuit depth, i.e. to minimize the longest path formed by gates in the circuit (and hence affects the required coherence time)." + ] }, { "cell_type": "code", + "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2025-02-19T09:57:33.595260Z", "start_time": "2025-02-19T09:57:25.795982Z" } }, + "outputs": [], "source": [ "qprog_opt_depth = synthesize(\n", " model=main,\n", " constraints=Constraints(optimization_parameter=OptimizationParameter.DEPTH) \n", ")" - ], - "outputs": [], - "execution_count": 4 + ] }, { "cell_type": "markdown", "metadata": {}, - "source": "We can inspect the resulting circuit using Classiq's web visualization:\n" + "source": [ + "We can inspect the resulting circuit using Classiq's web visualization:\n" + ] }, { "cell_type": "code", + "execution_count": 5, "metadata": { "ExecuteTime": { "end_time": "2025-02-19T09:57:35.150980Z", "start_time": "2025-02-19T09:57:33.606889Z" } }, - "source": [ - "show(qprog_opt_depth)" - ], "outputs": [ { "name": "stdout", @@ -79,7 +81,9 @@ ] } ], - "execution_count": 5 + "source": [ + "show(qprog_opt_depth)" + ] }, { "cell_type": "markdown", @@ -108,20 +112,20 @@ }, { "cell_type": "code", + "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2025-02-19T09:57:38.617264Z", "start_time": "2025-02-19T09:57:35.204530Z" } }, + "outputs": [], "source": [ "qprog_opt_width = synthesize(\n", " model=main,\n", " constraints=Constraints(optimization_parameter=OptimizationParameter.WIDTH) \n", ")" - ], - "outputs": [], - "execution_count": 6 + ] }, { "cell_type": "markdown", @@ -132,13 +136,13 @@ }, { "cell_type": "code", + "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2025-02-19T09:57:39.812986Z", "start_time": "2025-02-19T09:57:38.625126Z" } }, - "source": "show(qprog_opt_width)", "outputs": [ { "name": "stdout", @@ -148,7 +152,9 @@ ] } ], - "execution_count": 7 + "source": [ + "show(qprog_opt_width)" + ] }, { "cell_type": "markdown",