diff --git a/docs/tutorials/grover_with_sampler.ipynb b/docs/tutorials/grover_with_sampler.ipynb index a1cbd2787..de017a145 100644 --- a/docs/tutorials/grover_with_sampler.ipynb +++ b/docs/tutorials/grover_with_sampler.ipynb @@ -212,7 +212,7 @@ "outputs": [], "source": [ "optimal_num_iterations = math.floor(\n", - " math.pi / 4 * math.sqrt(2**grover_op.num_qubits / len(marked_states))\n", + " math.pi / (4 * math.asin(math.sqrt(len(marked_states) / 2**grover_op.num_qubits)))\n", ")" ] },