From f074f71197eb5d246484f5f7709cea999e77a644 Mon Sep 17 00:00:00 2001 From: kevin-tian Date: Thu, 28 Dec 2023 10:51:49 -0500 Subject: [PATCH] update grover tutorial equation --- docs/tutorials/grover_with_sampler.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", ")" ] },