diff --git a/tutorials/workshops/QMOD_workshop/QMOD_Workshop_Part_2.ipynb b/tutorials/workshops/QMOD_workshop/QMOD_Workshop_Part_2.ipynb index eedb222d9..835ab2561 100644 --- a/tutorials/workshops/QMOD_workshop/QMOD_Workshop_Part_2.ipynb +++ b/tutorials/workshops/QMOD_workshop/QMOD_Workshop_Part_2.ipynb @@ -324,19 +324,7 @@ " \\end{cases}\n", "$$\n", "\n", - "Notes:\n", - "- You cannot use `x` directly as the control variable in a `control` operator because it also occurs in the nested scope. To determine if `x` is in the lower or upper half of the domain, duplicate the most significant bit (MSB) onto a separate variable called `label`.\n", - "- In Python, assignment operators cannot be used in lambda expressions, so the computation of the function needs to be factored out to a named Python function (but not necessarily a Qmod function).\n", - "\n", - "\n", - "
\n", - " Hint\n", - " dup_msb(x, label)
\n", - " control(label, ...) # 0.5 <= x < 1.0
\n", - " X(label)
\n", - " control(label, ...) # 0.0 <= x < 0.5
\n", - "
\n", - "\n" + "Note: in Python, assignment operators cannot be used in lambda expressions, so the computation of the function needs to be factored out to a named Python function.\n" ] }, { @@ -421,7 +409,7 @@ "\n", "The second `bind` operation concatenates the variables back to the `res` output variable.\n", "\n", - "For this exercise, fill in the missing code parts in the above snippet and use the `control` statement to manually generate the 3-qubit probability distribution: `[1/8, 1/8, 1/8, -sqrt(3)/16, 1/8 + sqrt(3)/16, 1/8, 1/8, 1/8, 1/8]`.\n", + "For this exercise, fill in the missing code parts in the above snippet and use the `control` statement to manually generate the 3-qubit probability distribution: `[1/8, 1/8, 1/8, 1/8 - sqrt(3)/16, 1/8 + sqrt(3)/16, 1/8, 1/8, 1/8, 1/8]`.\n", "\n", "The following sequence of operations generates it:\n", "1. Perform the Hadamard transform on all three qubits.\n", @@ -452,7 +440,7 @@ " 1 / 8,\n", " 1 / 8,\n", " 1 / 8,\n", - " -sqrt(3) / 16,\n", + " 1 / 8 - sqrt(3) / 16,\n", " 1 / 8 + sqrt(3) / 16,\n", " 1 / 8,\n", " 1 / 8,\n",