diff --git a/docs/guides/q-ctrl-performance-management.ipynb b/docs/guides/q-ctrl-performance-management.ipynb index a7767019b7b..54d98394205 100644 --- a/docs/guides/q-ctrl-performance-management.ipynb +++ b/docs/guides/q-ctrl-performance-management.ipynb @@ -117,9 +117,7 @@ "source": [ "from qiskit_ibm_catalog import QiskitFunctionsCatalog\n", "\n", - "catalog = QiskitFunctionsCatalog(\n", - " channel=\"ibm_quantum_platform\", instance=\"USER_CRN\", token=\"USER_API_KEY\"\n", - ")\n", + "catalog = QiskitFunctionsCatalog()\n", "\n", "# Access Function\n", "perf_mgmt = catalog.load(\"q-ctrl/performance-management\")" @@ -229,7 +227,7 @@ "from qiskit_ibm_runtime import QiskitRuntimeService\n", "\n", "service = QiskitRuntimeService()\n", - "backend_name = service.least_busy().name" + "backend_name = \"ibm_torino\"" ] }, { @@ -544,7 +542,8 @@ "pub_result = sampler_result[0]\n", "counts = pub_result.data.c.get_counts()\n", "\n", - "print(f\"Counts for the meas output register: {counts}\")" + "# Show a few items from the counts dictionary\n", + "list(counts.items())[:10]" ] }, { @@ -557,6 +556,28 @@ "Plot the bitstring with the highest counts to see if the hidden bitstring was the mode." ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "799a7331-c029-4d50-8819-c7fe23627d27", + "metadata": { + "editable": true, + "slideshow": { + "slide_type": "" + }, + "tags": [ + "remove-cell" + ] + }, + "outputs": [], + "source": [ + "# This cell is hidden from the user. It checks the top result is the\n", + "# hidden bitstring. This can sometimes happen if the backend is having\n", + "# a bad day.\n", + "most_common_result = max(counts.items(), key=lambda x: x[1])[0][0]\n", + "assert most_common_result == hidden_bitstring" + ] + }, { "cell_type": "code", "execution_count": 15,