mirror of
https://github.com/saymrwulf/QuantumLearning.git
synced 2026-05-18 21:30:13 +00:00
816 lines
33 KiB
Text
816 lines
33 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",
|
|
"# Hardware-Aware Redesign Studio Studio\n"
|
|
],
|
|
"id": "f64f3de2"
|
|
},
|
|
{
|
|
"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 50 of 59. Follow the official walkthrough in order.\n",
|
|
"\n",
|
|
"Previous notebook: [Hardware-Aware Redesign Studio Problems](problems.ipynb)\n",
|
|
"\n",
|
|
"Next notebook: [Noise-Aware Verification and Mitigation Lecture](../module_03_noise_aware_verification/lecture.ipynb)\n",
|
|
"\n",
|
|
"Rule: complete the mandatory cells in this notebook before you open the next one.\n"
|
|
],
|
|
"id": "bfd144b6"
|
|
},
|
|
{
|
|
"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",
|
|
"The studio makes the redesign standard explicit: build, compare, justify.\n"
|
|
],
|
|
"id": "89cd6443"
|
|
},
|
|
{
|
|
"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",
|
|
"## Design Brief\n",
|
|
"\n",
|
|
"\n",
|
|
" Create a small local redesign memo that begins with an abstract target, benchmarks at least two constrained candidates, and ends with a clear recommendation tied to the declared topology and basis assumptions.\n"
|
|
],
|
|
"id": "44029154"
|
|
},
|
|
{
|
|
"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": "d3172a31"
|
|
},
|
|
{
|
|
"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": "8ad03118"
|
|
},
|
|
{
|
|
"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": "540f0930"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"from quantum_learning import (\n",
|
|
" build_demo_noise_model,\n",
|
|
" counts_to_probabilities,\n",
|
|
" draw_circuit,\n",
|
|
" editable_circuit_lab,\n",
|
|
" evidence_checklist,\n",
|
|
" feedback_iteration_panel,\n",
|
|
" line_coupling_map,\n",
|
|
" load_assessment_blueprint,\n",
|
|
" plot_counts,\n",
|
|
" plot_probabilities,\n",
|
|
" quiz_block,\n",
|
|
" reflection_box,\n",
|
|
" rubric_scorecard,\n",
|
|
" simulate_counts,\n",
|
|
" statevector_probabilities,\n",
|
|
" step_reference_table,\n",
|
|
" transpile_summary,\n",
|
|
")\n",
|
|
"from qiskit import QuantumCircuit\n",
|
|
"from qiskit.providers.basic_provider import BasicSimulator\n"
|
|
],
|
|
"id": "aa77b87b"
|
|
},
|
|
{
|
|
"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 Prompt 1: Stress A Clean Ideal Circuit\n",
|
|
"\n",
|
|
"\n",
|
|
" Start from a clean abstract target and let the local constraint model expose where it becomes awkward.\n"
|
|
],
|
|
"id": "2bc403ca"
|
|
},
|
|
{
|
|
"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": "256f55de"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"LOCAL_BASIS = [\"rz\", \"sx\", \"x\", \"cx\"]\n",
|
|
"\n",
|
|
"def simulate_line_counts(circuit, shots=256):\n",
|
|
" return simulate_counts(\n",
|
|
" circuit,\n",
|
|
" shots=shots,\n",
|
|
" basis_gates=LOCAL_BASIS,\n",
|
|
" coupling_map=line_coupling_map(circuit.num_qubits),\n",
|
|
" optimization_level=1,\n",
|
|
" )\n",
|
|
"\n",
|
|
"editable_code = '\\nfrom qiskit import QuantumCircuit\\n\\ndef naive_star_ghz() -> QuantumCircuit:\\n circuit = QuantumCircuit(4, 4)\\n # [1] Express the ideal entangling target directly.\\n circuit.h(0)\\n circuit.cx(0, 1)\\n circuit.cx(0, 2)\\n circuit.cx(0, 3)\\n # [2] Keep the evidence path stable while topology pressure is studied elsewhere.\\n circuit.measure([0, 1, 2, 3], [0, 1, 2, 3])\\n return circuit\\n\\ncircuit = naive_star_ghz()\\n'\n",
|
|
"editable_circuit_lab(\n",
|
|
" initial_code=editable_code,\n",
|
|
" context={\"QuantumCircuit\": QuantumCircuit, \"simulate_counts\": simulate_line_counts},\n",
|
|
" title='Studio 1: Ideal Target Under Pressure',\n",
|
|
" instructions='Use the naive target as a reference point, not as the automatic winner.',\n",
|
|
" shots=256,\n",
|
|
")\n"
|
|
],
|
|
"id": "dc828519"
|
|
},
|
|
{
|
|
"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 Prompt 2: Propose A Human Alternative\n",
|
|
"\n",
|
|
"\n",
|
|
" Produce an alternative whose structure anticipates the line rather than waiting for the transpiler to rescue it.\n"
|
|
],
|
|
"id": "b08360c8"
|
|
},
|
|
{
|
|
"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": "f726e04e"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"LOCAL_BASIS = [\"rz\", \"sx\", \"x\", \"cx\"]\n",
|
|
"\n",
|
|
"def simulate_line_counts(circuit, shots=256):\n",
|
|
" return simulate_counts(\n",
|
|
" circuit,\n",
|
|
" shots=shots,\n",
|
|
" basis_gates=LOCAL_BASIS,\n",
|
|
" coupling_map=line_coupling_map(circuit.num_qubits),\n",
|
|
" optimization_level=1,\n",
|
|
" )\n",
|
|
"\n",
|
|
"editable_code = '\\nfrom qiskit import QuantumCircuit\\n\\ndef line_friendly_ghz() -> QuantumCircuit:\\n circuit = QuantumCircuit(4, 4)\\n circuit.h(1)\\n circuit.cx(1, 0)\\n circuit.cx(1, 2)\\n circuit.cx(2, 3)\\n circuit.measure([0, 1, 2, 3], [0, 1, 2, 3])\\n return circuit\\n\\ncircuit = line_friendly_ghz()\\n'\n",
|
|
"editable_circuit_lab(\n",
|
|
" initial_code=editable_code,\n",
|
|
" context={\"QuantumCircuit\": QuantumCircuit, \"simulate_counts\": simulate_line_counts},\n",
|
|
" title='Studio 2: Human-Aware Alternative',\n",
|
|
" instructions='Refine a line-aware candidate and prepare to defend it with metrics and structural reasoning.',\n",
|
|
" shots=256,\n",
|
|
")\n"
|
|
],
|
|
"id": "0fe7c039"
|
|
},
|
|
{
|
|
"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 Prompt 3: Write The Recommendation\n",
|
|
"\n",
|
|
"\n",
|
|
" Compare the candidate family and make a choice like an engineer rather than a spectator.\n"
|
|
],
|
|
"id": "5ef0ab7b"
|
|
},
|
|
{
|
|
"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": [
|
|
"LOCAL_BASIS = [\"rz\", \"sx\", \"x\", \"cx\"]\n",
|
|
"\n",
|
|
"def simulate_line_counts(circuit, shots=256):\n",
|
|
" return simulate_counts(\n",
|
|
" circuit,\n",
|
|
" shots=shots,\n",
|
|
" basis_gates=LOCAL_BASIS,\n",
|
|
" coupling_map=line_coupling_map(circuit.num_qubits),\n",
|
|
" optimization_level=1,\n",
|
|
" )\n",
|
|
"\n",
|
|
"editable_code = '\\nfrom qiskit import QuantumCircuit\\n\\ndef candidate(style: str = \"middle_root\") -> QuantumCircuit:\\n circuit = QuantumCircuit(4, 4)\\n if style == \"naive\":\\n circuit.h(0)\\n circuit.cx(0, 1)\\n circuit.cx(0, 2)\\n circuit.cx(0, 3)\\n elif style == \"chain\":\\n circuit.h(0)\\n circuit.cx(0, 1)\\n circuit.cx(1, 2)\\n circuit.cx(2, 3)\\n elif style == \"middle_root\":\\n circuit.h(1)\\n circuit.cx(1, 0)\\n circuit.cx(1, 2)\\n circuit.cx(2, 3)\\n else:\\n raise ValueError(\"style must be naive, chain, or middle_root\")\\n circuit.measure([0, 1, 2, 3], [0, 1, 2, 3])\\n return circuit\\n\\ncircuit = candidate(style=\"middle_root\")\\n'\n",
|
|
"editable_circuit_lab(\n",
|
|
" initial_code=editable_code,\n",
|
|
" context={\"QuantumCircuit\": QuantumCircuit, \"simulate_counts\": simulate_line_counts},\n",
|
|
" title='Studio 3: Recommendation Candidate Family',\n",
|
|
" instructions='Use candidate comparison to support a recommendation that explicitly names the topology pressure and the chosen response.',\n",
|
|
" shots=256,\n",
|
|
")\n"
|
|
],
|
|
"id": "14761c8a"
|
|
},
|
|
{
|
|
"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": "81b9a6e6"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'What is the right studio target for this module?', 'options': ['A constraint-aware redesign memo comparing multiple candidate circuits under the same local topology assumptions', 'A single ideal circuit with no compile study', 'A notebook that treats the coupling map as background trivia'], 'correct_index': 0, 'explanation': 'The studio should feel like local hardware-aware engineering.'}, {'prompt': 'Why is human critique still necessary after compilation?', 'options': ['Because the compiler shows what happened, but the designer still decides whether the original layout was wise', 'Because compiled circuits are never useful', 'Because metrics disappear after transpilation'], 'correct_index': 0, 'explanation': 'Compilation evidence is necessary, not sufficient, for redesign judgement.'}], heading='Studio Design Check')\n"
|
|
],
|
|
"id": "a133f6d7"
|
|
},
|
|
{
|
|
"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": "3609926b"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"evidence_checklist(['The notebook states the objective or decision clearly.', 'The relevant constraints are explicit and stable.', 'Evidence is tied to a concrete circuit, output, or metric.', 'At least one uncertainty or risk is named explicitly.', 'The notebook ends with a next action or defended judgement.'], title='Hardware-Aware Redesign Studio Evidence Checklist')\n"
|
|
],
|
|
"id": "5590b6c3"
|
|
},
|
|
{
|
|
"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 Debrief\n",
|
|
"\n",
|
|
"\n",
|
|
" A successful studio notebook here reads like a redesign memo, not like a complaint about compilation. It should show what the abstract circuit was trying to do, how the local constraints punished it, and why the recommended alternative better fits the declared hardware story.\n"
|
|
],
|
|
"id": "22abd42b"
|
|
},
|
|
{
|
|
"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 Standard\n",
|
|
"\n",
|
|
"A strong studio notebook is compact, explicit, and reviewable. It does not hide behind volume. It makes the objective clear, the candidate or case structure visible, the evidence traceable, and the final judgement conditional in the right way. If those things are not yet present, the notebook is not finished no matter how many cells it contains.\n"
|
|
],
|
|
"id": "fba3a7ae"
|
|
},
|
|
{
|
|
"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",
|
|
"## What A Finished Studio Should Feel Like\n",
|
|
"\n",
|
|
"The finished notebook should feel like something another engineer could open and use. They should be able to understand what the notebook is trying to decide, how the circuits were compared, what evidence was gathered, and why the recommendation or diagnosis ended where it did. That is the practical definition of \"world-class\" in this project: not theatrical polish, but concentrated clarity under real engineering burdens.\n"
|
|
],
|
|
"id": "d39427de"
|
|
},
|
|
{
|
|
"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",
|
|
"## Final Check Before You Stop\n",
|
|
"\n",
|
|
"Before you leave a studio notebook, ask one last question: if another engineer disagreed with my conclusion, would the notebook give them enough material to locate the disagreement precisely? If the answer is yes, the studio is doing its job.\n"
|
|
],
|
|
"id": "9acd51fa"
|
|
},
|
|
{
|
|
"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": "4304ae2c"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Which structural feature turned out to matter most in your final redesign recommendation?')\n"
|
|
],
|
|
"id": "6d737d69"
|
|
},
|
|
{
|
|
"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": "c1288e5e"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('What evidence from the constrained comparison most influenced your choice?')\n"
|
|
],
|
|
"id": "c7955c8e"
|
|
},
|
|
{
|
|
"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": "d9d75308"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('How did you keep the reporting contract stable across the candidates?')\n"
|
|
],
|
|
"id": "fe6418c4"
|
|
},
|
|
{
|
|
"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": "e7290783"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Name one redesign habit from this module that should carry into the capstone.')\n"
|
|
],
|
|
"id": "766a4308"
|
|
},
|
|
{
|
|
"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": "7342642e"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"feedback_iteration_panel(title='Hardware-Aware Redesign Studio Studio Revision Loop', prompt='Write the decision or diagnosis the studio currently supports, the evidence carrying that weight, the main remaining uncertainty, and the next revision that would sharpen the notebook.')\n"
|
|
],
|
|
"id": "bac6732d"
|
|
},
|
|
{
|
|
"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": "bd91d432"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"jupyter": {
|
|
"source_hidden": true
|
|
},
|
|
"tags": [
|
|
"hide-input"
|
|
]
|
|
},
|
|
"outputs": [],
|
|
"source": [
|
|
"assessment_blueprint = load_assessment_blueprint()\n",
|
|
"rubric_scorecard(\n",
|
|
" assessment_blueprint.get_rubric('module_self_review'),\n",
|
|
" title='Hardware-Aware Redesign Studio Studio Self-Grading',\n",
|
|
")\n"
|
|
],
|
|
"id": "b9856003"
|
|
},
|
|
{
|
|
"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: [Noise-Aware Verification and Mitigation Lecture](../module_03_noise_aware_verification/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": "3a29345a"
|
|
},
|
|
{
|
|
"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 **Hardware-Aware Redesign Studio Studio**. Everything below is optional. Use it only if you want deeper consolidation or extra transfer work.\n"
|
|
],
|
|
"id": "dade2a04"
|
|
},
|
|
{
|
|
"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 **Hardware-Aware Redesign Studio 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": "47e3e6f0"
|
|
},
|
|
{
|
|
"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": "ae1ab27a"
|
|
},
|
|
{
|
|
"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": "bd3683ea"
|
|
},
|
|
{
|
|
"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": "73411607"
|
|
},
|
|
{
|
|
"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 Hardware-Aware Redesign Studio Studio: objective, criterion, and the single risk that would matter most in your design review.')\n"
|
|
],
|
|
"id": "a3b56539"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "QuantumLearning (.venv)",
|
|
"language": "python",
|
|
"name": "quantum-learning"
|
|
},
|
|
"language_info": {
|
|
"name": "python",
|
|
"version": "3.12"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|