QuantumLearning/notebooks/algorithms/module_03_qft/problems.ipynb

621 lines
27 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",
"# QFT and Periodic Structure Problems\n"
],
"id": "aa9e9adc"
},
{
"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 37 of 59. Follow the official walkthrough in order.\n",
"\n",
"Previous notebook: [QFT and Periodic Structure Lab](lab.ipynb)\n",
"\n",
"Next notebook: [QFT and Periodic Structure Studio](studio.ipynb)\n",
"\n",
"Rule: complete the mandatory cells in this notebook before you open the next one.\n"
],
"id": "5ae4cdcb"
},
{
"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",
"These problems check whether you can keep the QFT grounded in explicit roles instead of slipping back into name-based mystique.\n"
],
"id": "47de7f12"
},
{
"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",
"## How To Use This Notebook\n",
"\n",
"\n",
" Whenever an answer sounds appealing because it is vague, reject it. This module improves only if you become more precise about basis change, phase structure, ordering, and verification.\n"
],
"id": "b75163e2"
},
{
"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 math import pi\n",
"\n",
"from quantum_learning import (\n",
" counts_to_probabilities,\n",
" draw_circuit,\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": "3cc4775a"
},
{
"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",
"## Basis Change\n",
"\n",
"Treat this block as a miniature review situation. Choose the answer that would best survive an engineering conversation.\n"
],
"id": "5a339059"
},
{
"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": "12ac9357"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"quiz_block([{'prompt': 'Which phrase best captures the QFT at beginner-professional level?', 'options': ['A basis change that reorganizes periodic structure into readable phase relationships', 'A black-box acceleration primitive with no circuit meaning', 'A measurement shortcut'], 'correct_index': 0, 'explanation': 'Mechanistic language matters if you want to design with the QFT later.'}, {'prompt': \"Why is 'basis change' better language than 'magic transform'?\", 'options': ['Because it points you toward verification and interface questions', 'Because it removes the need for phase reasoning', 'Because it implies all amplitudes stay real'], 'correct_index': 0, 'explanation': 'Good language anchors good engineering questions.'}], heading='Basis Change')\n"
],
"id": "3310c387"
},
{
"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",
"## Controlled-Phase Reading\n",
"\n",
"Treat this block as a miniature review situation. Choose the answer that would best survive an engineering conversation.\n"
],
"id": "4fb0d179"
},
{
"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": "95f72465"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"quiz_block([{'prompt': 'What does the smallest-angle controlled phase represent in a 3-qubit QFT?', 'options': ['A weaker but still real contribution to the final phase pattern', 'A gate that can be ignored without consequence in every setting', 'A measurement of the least significant bit'], 'correct_index': 0, 'explanation': 'Its contribution is smaller, not conceptually meaningless.'}, {'prompt': 'Why do QFT circuits deserve line-by-line explanation?', 'options': ['Because many later algorithms embed them, so shallow memorization becomes expensive later', 'Because QFT never appears in serious work', 'Because all controlled phases are interchangeable'], 'correct_index': 0, 'explanation': 'This module installs vocabulary for later reuse.'}], heading='Controlled-Phase Reading')\n"
],
"id": "e67d922d"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## Ordering And Verification\n",
"\n",
"Treat this block as a miniature review situation. Choose the answer that would best survive an engineering conversation.\n"
],
"id": "e48d1cee"
},
{
"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": "606a3458"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"quiz_block([{'prompt': 'What is the strongest reason to discuss swaps explicitly?', 'options': ['They encode a bit-order convention that affects how results are interpreted', 'They are visually attractive', 'They remove the need for inverse verification'], 'correct_index': 0, 'explanation': \"Ordering is part of the transform's external contract.\"}, {'prompt': 'Which evidence is most persuasive when validating a small QFT implementation?', 'options': ['Statevector plots or inverse-composition checks tied to a written explanation', 'Only a final count histogram', 'Only gate count totals'], 'correct_index': 0, 'explanation': 'Basis-change circuits need representational evidence, not only sampled readout.'}], heading='Ordering And Verification')\n"
],
"id": "1d20e9e3"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## Approximation Tradeoffs\n",
"\n",
"Treat this block as a miniature review situation. Choose the answer that would best survive an engineering conversation.\n"
],
"id": "57045270"
},
{
"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": "1377c200"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"quiz_block([{'prompt': 'Why might an engineer drop the smallest controlled-phase term?', 'options': ['To trade some transform fidelity for structural simplification under a cost budget', 'To make the circuit classical', 'To eliminate all ordering issues'], 'correct_index': 0, 'explanation': 'Approximation belongs to explicit tradeoff reasoning.'}, {'prompt': 'Which review comment is strongest?', 'options': ['This approximation is acceptable because the omitted phase term is least significant and the verification notebook shows the recovery gap clearly', 'I removed some gates because the circuit looked busy', 'Approximate QFT means exact output with fewer gates'], 'correct_index': 0, 'explanation': 'A professional defense ties structural changes to evidence and scope.'}], heading='Approximation Tradeoffs')\n"
],
"id": "6d103666"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## Mini Case\n",
"\n",
"\n",
" The most common QFT failure mode in beginner material is reverent opacity. The transform is introduced with respect, but not with enough operational clarity. The learner comes away knowing that the QFT is important without knowing how to inspect, verify, or modify a small implementation. This problems notebook pushes directly against that failure. Importance without inspectability is not yet useful knowledge.\n"
],
"id": "dc8b7a77"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## What These Questions Are Really Testing\n",
"\n",
"The multiple-choice format is only the surface. Underneath it, the notebook is testing whether your explanation can survive small shifts in phrasing, emphasis, and review context. If your understanding is robust, the wording can change and the same mechanism will still come into focus. If your understanding is fragile, the wording change will tempt you back into vague or prestige-based answers. That is why these problems matter.\n"
],
"id": "c305a8c3"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## Common Failure Mode\n",
"\n",
"A common failure mode at this stage is to answer with something broadly true but locally weak. For example, saying that a circuit uses superposition or interference may be accurate, yet still fail to identify what role a specific block is playing in the present design. The goal of the problems notebook is to eliminate that kind of vague correctness and replace it with circuit-specific explanation.\n"
],
"id": "063ac021"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## Written Checks\n",
"\n",
"Use the prompts below to rehearse full-sentence engineering explanations.\n"
],
"id": "227a7610"
},
{
"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('Explain why a beautiful circuit diagram is not enough evidence for a correct QFT implementation.')\n"
],
"id": "f52dac94"
},
{
"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": "6e989ff6"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"reflection_box('Describe one concrete reason an engineer might choose a small approximate-QFT variant.')\n"
],
"id": "51186f30"
},
{
"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 2/10 · Official walkthrough reading cell.\n",
"</div>\n",
"\n",
"## Exit Condition\n",
"\n",
"\n",
" Move on when you can read a 3-qubit QFT as a deliberate basis-change circuit and defend how you would verify it.\n"
],
"id": "9134bc44"
},
{
"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: [QFT and Periodic Structure Studio](studio.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": "b6bb8e70"
},
{
"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 **QFT and Periodic Structure Problems**. Everything below is optional. Use it only if you want deeper consolidation or extra transfer work.\n"
],
"id": "50cf8416"
},
{
"cell_type": "markdown",
"metadata": {
"ql_injected": "facultative",
"ql_track": "facultative",
"ql_role": "reading",
"ql_difficulty": 4,
"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 4/10 · Optional extension reading.\n",
"</div>\n",
"\n",
"## Facultative Extension Reading\n",
"\n",
"Use this optional problems extension only if you want stronger diagnostic habits. In **QFT and Periodic Structure Problems**, the useful move is not just to know the right answer; it is to record which wrong answer tempted you and what that says about your current mental model.\n"
],
"id": "dadff7f2"
},
{
"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 5/10 · Optional multiple-choice extension.\n",
"</div>\n"
],
"id": "4896b5d5"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"ql_injected": "facultative",
"ql_track": "facultative",
"ql_role": "test",
"ql_difficulty": 5,
"ql_note": "Optional multiple-choice extension.",
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"quiz_block([{'prompt': 'Why revisit a missed question in a facultative problems block?', 'options': ['To name the specific misconception that produced the miss', 'To memorize the right option letter only', 'To skip written explanation entirely'], 'correct_index': 0, 'explanation': 'The value is diagnostic precision, not rote recovery.'}, {'prompt': 'What should an optional error log contain?', 'options': ['The tempting wrong model and the corrected model', 'Only the final score', 'Only the notebook path'], 'correct_index': 0, 'explanation': 'The error log is useful when it captures the broken idea, not just the result.'}], heading='Facultative Extension Test')\n"
],
"id": "51883979"
},
{
"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 6/10 · Optional written exercise.\n",
"</div>\n"
],
"id": "5a355a57"
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"ql_injected": "facultative",
"ql_track": "facultative",
"ql_role": "exercise",
"ql_difficulty": 6,
"ql_note": "Optional written exercise.",
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"reflection_box('Name one tempting wrong answer pattern from QFT and Periodic Structure Problems and write the shortest correction that would stop you from repeating it.')\n"
],
"id": "9eff5874"
}
],
"metadata": {
"kernelspec": {
"display_name": "QuantumLearning (.venv)",
"language": "python",
"name": "quantum-learning"
},
"language_info": {
"name": "python",
"version": "3.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}