mirror of
https://github.com/saymrwulf/QuantumLearning.git
synced 2026-05-14 20:58:00 +00:00
631 lines
26 KiB
Text
631 lines
26 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Notebook-level rule, objective, or usage guidance.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"# Gates and Measurement Studio\n",
|
|
"\n",
|
|
"This studio asks for protocol design. You are no longer just interpreting prepared examples. You are choosing how to prepare, how to probe, and how to report. That is exactly the kind of ownership a professional circuit designer needs.\n"
|
|
],
|
|
"id": "7a0884ef"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Official walkthrough guardrail.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"<!-- COURSE_NAV_TOP -->\n",
|
|
"## Mainline Navigation\n",
|
|
"\n",
|
|
"Step 14 of 59. Follow the official walkthrough in order.\n",
|
|
"\n",
|
|
"Previous notebook: [Gates and Measurement Problems](problems.ipynb)\n",
|
|
"\n",
|
|
"Next notebook: [Circuit Construction and Analysis Lecture](../../qiskit_engineering/module_01_circuit_construction_and_analysis/lecture.ipynb)\n",
|
|
"\n",
|
|
"Rule: complete the mandatory cells in this notebook before you open the next one.\n"
|
|
],
|
|
"id": "859bf1db"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Notebook-level rule, objective, or usage guidance.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Studio Standard\n",
|
|
"\n",
|
|
"Every answer should separate three layers explicitly: preparation, measurement basis, and reporting. If those layers remain fused in your language, the design is not yet under control.\n"
|
|
],
|
|
"id": "c81af194"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "setup"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #6b7280; background:#e5e7eb; color:#111827; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY SETUP</strong> · Difficulty 1/10 · Environment, import, or helper cell required by the notebook.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "36a43fbf"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from pathlib import Path\n",
|
|
"import sys\n",
|
|
"\n",
|
|
"project_root = Path.cwd().resolve()\n",
|
|
"while not (project_root / \"pyproject.toml\").exists():\n",
|
|
" if project_root.parent == project_root:\n",
|
|
" raise RuntimeError(\"Could not locate the project root from this notebook.\")\n",
|
|
" project_root = project_root.parent\n",
|
|
"\n",
|
|
"src_path = project_root / \"src\"\n",
|
|
"if str(src_path) not in sys.path:\n",
|
|
" sys.path.insert(0, str(src_path))\n"
|
|
],
|
|
"id": "50c7b992"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "6ce28ece"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from quantum_learning import (\n",
|
|
" counts_to_probabilities,\n",
|
|
" editable_circuit_lab,\n",
|
|
" plot_counts,\n",
|
|
" plot_probabilities,\n",
|
|
" quiz_block,\n",
|
|
" reflection_box,\n",
|
|
" simulate_counts,\n",
|
|
" statevector_probabilities,\n",
|
|
" step_reference_table,\n",
|
|
")\n",
|
|
"from qiskit import QuantumCircuit\n",
|
|
"from qiskit.quantum_info import Statevector\n"
|
|
],
|
|
"id": "6b4fdd33"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Notebook-level rule, objective, or usage guidance.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Brief 1: One-Qubit Basis Contrast\n",
|
|
"\n",
|
|
"Build a one-qubit protocol that produces a deterministic result in one basis and a non-deterministic result in another. The point is not novelty. The point is to justify why the contrast is caused by a changed question rather than by hand-waving.\n"
|
|
],
|
|
"id": "c61be8b9"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "e80ad6c8"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"editable_code = '\\ncircuit = QuantumCircuit(1, 1)\\n# [1] Try changing the preparation gate sequence.\\ncircuit.x(0)\\ncircuit.h(0)\\n# [2] Optionally add Z or another H before measurement.\\n# circuit.z(0)\\n# circuit.h(0)\\n# [3] Measure the result.\\ncircuit.measure(0, 0)\\n'\n",
|
|
"editable_circuit_lab(\n",
|
|
" initial_code=editable_code,\n",
|
|
" context={\"QuantumCircuit\": QuantumCircuit, \"simulate_counts\": simulate_counts},\n",
|
|
" title='Studio Brief 1: Basis Contrast',\n",
|
|
" instructions='Use a small gate vocabulary to make one basis deterministic and another basis informative. Explain the protocol clearly.',\n",
|
|
" shots=256,\n",
|
|
")\n"
|
|
],
|
|
"id": "6d7a8a42"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "8ca09466"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Why does your protocol count as a basis contrast rather than just a different state-preparation demo?')\n"
|
|
],
|
|
"id": "1a7eb7ba"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Notebook-level rule, objective, or usage guidance.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Brief 2: Two-Qubit Correlation Probe\n",
|
|
"\n",
|
|
"Start from the Bell preparation and decide which basis or readout change best tests the story you want to claim. Write your explanation as if another engineer had to review it.\n"
|
|
],
|
|
"id": "07aadce0"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "0f2d38dc"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"editable_code = '\\ncircuit = QuantumCircuit(2, 2)\\n# [1] Prepare the correlated state.\\ncircuit.h(0)\\ncircuit.cx(0, 1)\\n# [2] Change the basis of the first measurement question.\\ncircuit.h(0)\\n# [3] Measure both qubits into the matching classical bits.\\ncircuit.measure([0, 1], [0, 1])\\n'\n",
|
|
"editable_circuit_lab(\n",
|
|
" initial_code=editable_code,\n",
|
|
" context={\"QuantumCircuit\": QuantumCircuit, \"simulate_counts\": simulate_counts},\n",
|
|
" title='Studio Brief 2: Correlation Probe',\n",
|
|
" instructions='Tune the basis choices and defend what kind of correlation evidence the circuit should produce.',\n",
|
|
" shots=256,\n",
|
|
")\n"
|
|
],
|
|
"id": "ab55e010"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "ed0949ad"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('What evidence in the counts would actually support your claim, and what evidence would falsify it?')\n"
|
|
],
|
|
"id": "6e654735"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Notebook-level rule, objective, or usage guidance.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Brief 3: Reporting-Layer Stress Test\n",
|
|
"\n",
|
|
"Use swapped or altered classical wiring deliberately. The point is to produce a circuit whose quantum preparation is fine but whose reporting layer could mislead a careless reader. Then write the warning note that a reviewer should leave.\n"
|
|
],
|
|
"id": "61f3a38b"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "bac37432"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"editable_code = '\\ncircuit = QuantumCircuit(2, 2)\\n# [1] Prepare a Bell-style state.\\ncircuit.h(0)\\ncircuit.cx(0, 1)\\n# [2] Try swapping the classical wiring.\\ncircuit.measure([0, 1], [1, 0])\\n'\n",
|
|
"editable_circuit_lab(\n",
|
|
" initial_code=editable_code,\n",
|
|
" context={\"QuantumCircuit\": QuantumCircuit, \"simulate_counts\": simulate_counts},\n",
|
|
" title='Studio Brief 3: Reporting-Layer Stress Test',\n",
|
|
" instructions='Use classical wiring deliberately and then explain how a review note should prevent misinterpretation.',\n",
|
|
" shots=256,\n",
|
|
")\n"
|
|
],
|
|
"id": "25a8c1d0"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "test"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY TEST</strong> · Difficulty 3/10 · Official walkthrough multiple-choice test.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "94a9fcc5"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'What does the measurement studio demand that the lecture does not?', 'options': ['Deliberate protocol design and explicit justification of why a chosen measurement reveals what you claim', 'Less writing', 'No circuit edits'], 'correct_index': 0, 'explanation': 'The studio is where you own the protocol rather than merely understand it.'}, {'prompt': 'What is the hallmark of a good studio answer?', 'options': ['It separates preparation, basis choice, wiring, and evidence instead of blurring them together', 'It uses the most gates possible', 'It avoids comparison between alternatives'], 'correct_index': 0, 'explanation': 'Review language should make the protocol legible and falsifiable.'}], heading='Measurement Studio Check')\n"
|
|
],
|
|
"id": "d5623cb9"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "c5a957cd"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('What is the most subtle protocol mistake you can now imagine making in your own notebook work?')\n"
|
|
],
|
|
"id": "61815d8d"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "mandatory",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY EXERCISE</strong> · Difficulty 3/10 · Official walkthrough runnable or written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "16f3fa60"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Which part of measurement reasoning now feels reliable, and which part still feels too dependent on the exact example in front of you?')\n"
|
|
],
|
|
"id": "e9ec8475"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY READING</strong> · Difficulty 3/10 · Official walkthrough reading cell.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Studio Rubric\n",
|
|
"\n",
|
|
"Use a strict rubric on yourself here. A good studio answer makes the preparation explicit, makes the basis choice explicit, makes the classical mapping explicit, and says what evidence would count as success or failure. It also admits uncertainty honestly. If you are unsure whether your chosen probe actually distinguishes two candidate explanations, write that uncertainty down and propose the next check. That is not weakness. That is proper review culture.\n",
|
|
"\n",
|
|
"This rubric is intentionally demanding because measurement notebooks are where many people learn bad habits: overclaiming from too little evidence, blurring protocol choices together, or treating a nice-looking plot as proof. The studio exists to train the opposite behavior. Clear protocol, explicit evidence, and disciplined interpretation. Nothing less will scale to professional work.\n"
|
|
],
|
|
"id": "cbb193af"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #15803d; background:#dcfce7; color:#14532d; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>MANDATORY READING</strong> · Difficulty 3/10 · Official walkthrough reading cell.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Studio Exit\n",
|
|
"\n",
|
|
"A strong studio result is not the most elaborate circuit. It is the clearest protocol. If you can prepare, question, report, and defend the evidence chain cleanly, the module has done its job.\n"
|
|
],
|
|
"id": "b66f764b"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Official walkthrough guardrail.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"<!-- COURSE_NAV_BOTTOM -->\n",
|
|
"## What To Open Next\n",
|
|
"\n",
|
|
"Next notebook: [Circuit Construction and Analysis Lecture](../../qiskit_engineering/module_01_circuit_construction_and_analysis/lecture.ipynb)\n",
|
|
"\n",
|
|
"Official walkthrough rule: once every mandatory cell above is complete, open the next notebook. Anything below this cell is facultative.\n"
|
|
],
|
|
"id": "d0a41b3c"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "facultative_zone",
|
|
"ql_track": "meta",
|
|
"ql_role": "reading",
|
|
"ql_difficulty": 1,
|
|
"ql_note": "Optional-zone boundary. The official walkthrough is already complete above."
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #2563eb; background:#dbeafe; color:#1e3a8a; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>META READING</strong> · Difficulty 1/10 · Optional-zone boundary. The official walkthrough is already complete above.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"<!-- QL_OPTIONAL_ZONE -->\n",
|
|
"## Facultative Extension Zone\n",
|
|
"\n",
|
|
"You have already completed the mandatory walkthrough for **Gates and Measurement Studio**. Everything below is optional. Use it only if you want deeper consolidation or extra transfer work.\n"
|
|
],
|
|
"id": "8a92d552"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "facultative",
|
|
"ql_track": "facultative",
|
|
"ql_role": "reading",
|
|
"ql_difficulty": 5,
|
|
"ql_note": "Optional extension reading."
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #ea580c; background:#ffedd5; color:#9a3412; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>FACULTATIVE READING</strong> · Difficulty 5/10 · Optional extension reading.\n",
|
|
"</div>\n",
|
|
"\n",
|
|
"## Facultative Extension Reading\n",
|
|
"\n",
|
|
"Use this optional studio extension only if the mandatory route in **Gates and Measurement Studio** feels stable. The right stretch here is not random complexity; it is one extra candidate, one sharper criterion, and one clearer written defence of the final decision.\n"
|
|
],
|
|
"id": "189170aa"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "facultative",
|
|
"ql_role": "test"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #ea580c; background:#ffedd5; color:#9a3412; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>FACULTATIVE TEST</strong> · Difficulty 6/10 · Optional multiple-choice extension.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "91fc2d15"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"ql_injected": "facultative",
|
|
"ql_track": "facultative",
|
|
"ql_role": "test",
|
|
"ql_difficulty": 6,
|
|
"ql_note": "Optional multiple-choice extension.",
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'What makes a facultative studio stretch worthwhile?', 'options': ['It sharpens a design judgement without breaking the single mandatory route', 'It replaces the mandatory brief', 'It adds complexity with no explicit criterion'], 'correct_index': 0, 'explanation': 'A studio stretch should sharpen judgement, not blur the route.'}, {'prompt': 'If a stretch candidate fails, what should change first?', 'options': ['The written explanation of the failure and the next criterion', 'The notebook order', 'The insistence that the failed candidate was still best'], 'correct_index': 0, 'explanation': 'The useful move is clearer review language and a better criterion.'}], heading='Facultative Extension Test')\n"
|
|
],
|
|
"id": "a97620af"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"ql_injected": "badge",
|
|
"ql_track": "facultative",
|
|
"ql_role": "exercise"
|
|
},
|
|
"source": [
|
|
"<!-- QL_BADGE -->\n",
|
|
"<div style=\"padding:0.55rem 0.8rem; border-left:6px solid #ea580c; background:#ffedd5; color:#9a3412; border-radius:0.35rem; font-family:Helvetica, Arial, sans-serif; margin:0.15rem 0 0.85rem 0;\">\n",
|
|
"<strong>FACULTATIVE EXERCISE</strong> · Difficulty 7/10 · Optional written exercise.\n",
|
|
"</div>\n"
|
|
],
|
|
"id": "24b56680"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"ql_injected": "facultative",
|
|
"ql_track": "facultative",
|
|
"ql_role": "exercise",
|
|
"ql_difficulty": 7,
|
|
"ql_note": "Optional written exercise.",
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Write one optional stretch brief for Gates and Measurement Studio: objective, criterion, and the single risk that would matter most in your design review.')\n"
|
|
],
|
|
"id": "e4e3c83b"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "QuantumLearning (.venv)",
|
|
"language": "python",
|
|
"name": "quantum-learning"
|
|
},
|
|
"language_info": {
|
|
"name": "python",
|
|
"version": "3.12"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|