mirror of
https://github.com/saymrwulf/QuantumLearning.git
synced 2026-07-24 19:43:45 +00:00
281 lines
12 KiB
Text
281 lines
12 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# Capstone Circuit Design Review Problems\n"
|
|
],
|
|
"id": "895347c7"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"These problems test whether your design-review language is strong enough to survive small shifts in the brief, the evidence, and the final recommendation wording.\n"
|
|
],
|
|
"id": "e8140da9"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## How To Use This Notebook\n",
|
|
"\n",
|
|
"\n",
|
|
" Prefer answers that keep the brief explicit and tie the winner to evidence. Reject answers that jump straight from a favorite circuit to a conclusion.\n"
|
|
],
|
|
"id": "487af35f"
|
|
},
|
|
{
|
|
"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": "3e7046de"
|
|
},
|
|
{
|
|
"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": "2e8f1586"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Design Brief\n",
|
|
"\n",
|
|
"Treat these questions as miniature review situations rather than as trivia. The correct answer should survive a serious engineering conversation.\n"
|
|
],
|
|
"id": "9fa7f068"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'Which statement best starts a capstone review?', 'options': ['The objective is to prepare a GHZ-style resource on a line topology with strong noisy support and reasonable compile cost', 'I like this circuit shape more than the others', 'Any entangled state will do'], 'correct_index': 0, 'explanation': 'The brief defines what the later comparison actually means.'}, {'prompt': 'Why must constraints be stated rather than implied?', 'options': ['Because they decide which tradeoffs are acceptable', 'Because constraints never affect rankings', 'Because metrics replace constraints'], 'correct_index': 0, 'explanation': 'A good recommendation is always recommendation-under-constraints.'}], heading='Design Brief')\n"
|
|
],
|
|
"id": "ca559966"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Candidate Benchmarks\n",
|
|
"\n",
|
|
"Treat these questions as miniature review situations rather than as trivia. The correct answer should survive a serious engineering conversation.\n"
|
|
],
|
|
"id": "fe924321"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'What is a strong reason to keep multiple candidates alive for a while?', 'options': ['Different candidates may dominate under different evidence layers', 'Because picking one early is more professional', 'Because capstones should avoid decisions'], 'correct_index': 0, 'explanation': 'Benchmarking exists because early intuition is often incomplete.'}, {'prompt': 'What does compiled depth tell you in this module?', 'options': ['Part of the implementation burden under the declared topology and basis set', 'The exact final fidelity', 'Whether the candidate is mathematically valid'], 'correct_index': 0, 'explanation': 'Compiled depth is one lens on cost, not the entire verdict.'}], heading='Candidate Benchmarks')\n"
|
|
],
|
|
"id": "bd252e49"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Recommendation Writing\n",
|
|
"\n",
|
|
"Treat these questions as miniature review situations rather than as trivia. The correct answer should survive a serious engineering conversation.\n"
|
|
],
|
|
"id": "cf5f8ce6"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'Which recommendation sentence is strongest?', 'options': ['I recommend the middle-root candidate because it preserves the target behavior while reducing compile burden and maintaining the best noisy support under the current model', 'I recommend the middle-root candidate because it feels elegant', 'I recommend the first candidate because it appeared first in the notebook'], 'correct_index': 0, 'explanation': 'The strongest sentence links candidate choice to explicit evidence and scope.'}, {'prompt': 'Why mention residual risk after naming a winner?', 'options': ['Because a professional review distinguishes current evidence from universal truth', 'Because it weakens the recommendation', 'Because risks only matter in cloud execution'], 'correct_index': 0, 'explanation': 'Honest recommendations are conditional on model and evidence.'}], heading='Recommendation Writing')\n"
|
|
],
|
|
"id": "e03a2800"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Review Judgement\n",
|
|
"\n",
|
|
"Treat these questions as miniature review situations rather than as trivia. The correct answer should survive a serious engineering conversation.\n"
|
|
],
|
|
"id": "e4a98ca4"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"quiz_block([{'prompt': 'Which review note is strongest?', 'options': ['The notebook names a winner but never explains the objective function used to rank the candidates', 'The notebook should have more animation', 'The notebook uses too many metrics by definition'], 'correct_index': 0, 'explanation': 'A ranking without a criterion is not yet a serious review.'}, {'prompt': 'What should a capstone notebook leave behind for another engineer?', 'options': ['A clear brief, comparable evidence, and a defensible recommendation', 'Only the final circuit', 'Only a celebratory conclusion'], 'correct_index': 0, 'explanation': 'The deliverable is a reviewable decision artifact, not just a result.'}], heading='Review Judgement')\n"
|
|
],
|
|
"id": "6864ecab"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Mini Case\n",
|
|
"\n",
|
|
"\n",
|
|
" Capstone notebooks often fail in one of two ways. Either they present only one candidate and call the result a review, or they compare several candidates but never define the criterion by which one should win. Both failures are forms of weak judgement. These problems are designed to make that weakness uncomfortable enough that you stop accepting it.\n"
|
|
],
|
|
"id": "906bc3bb"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## What These Questions Are Really Testing\n",
|
|
"\n",
|
|
"The multiple-choice format is only the surface. Underneath it, the notebook is testing whether you can preserve the right burdens while the wording shifts. If your understanding is strong, a changed phrase still points you back to the same structure, constraint, invariant, or recommendation logic. If your understanding is weak, the wording change will tempt you into vague or prestige-based answers. That is why these problem sets matter.\n"
|
|
],
|
|
"id": "992ecd47"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Common Failure Mode\n",
|
|
"\n",
|
|
"A common failure mode in advanced notebook work is broad correctness with local vagueness. A learner says something true at a high level, yet still fails to name what this particular workflow, redesign, diagnosis, or recommendation is actually doing. The problems notebook is meant to squeeze that vagueness out. It prefers circuit-specific or review-specific sentences over vague correctness.\n"
|
|
],
|
|
"id": "e62cbfe8"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Why Written Justification Matters\n",
|
|
"\n",
|
|
"The written prompts at the end of this notebook are not filler. They are where you prove that the right distinctions are surviving contact with your own prose. Multiple-choice blocks can tell you whether a distinction still feels recognizable. A written answer tells you whether you can actually deploy that distinction in a design note, verification memo, or review comment. Professional skill depends on that second ability.\n"
|
|
],
|
|
"id": "78179f06"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Written Checks\n",
|
|
"\n",
|
|
"Use the prompts below to practice full-sentence engineering judgement.\n"
|
|
],
|
|
"id": "1dfac3e9"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Explain why a candidate ranking with no explicit criterion is not yet a professional review.')\n"
|
|
],
|
|
"id": "2458e0e2"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"reflection_box('Describe the minimum evidence you would want before accepting a capstone recommendation written by someone else.')\n"
|
|
],
|
|
"id": "84273101"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"feedback_iteration_panel(title='Capstone Circuit Design Review Problem-Set Review Loop', prompt='After the quizzes, write the claim you now trust most, the evidence pattern behind it, the phrasing that still feels weak, and the next rewrite you owe yourself.')\n"
|
|
],
|
|
"id": "c78806e0"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"assessment_blueprint = load_assessment_blueprint()\n",
|
|
"rubric_scorecard(\n",
|
|
" assessment_blueprint.get_rubric('module_self_review'),\n",
|
|
" title='Capstone Circuit Design Review Problem Self-Grading',\n",
|
|
")\n"
|
|
],
|
|
"id": "e4ae45c2"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Exit Condition\n",
|
|
"\n",
|
|
"\n",
|
|
" Move on when you can explain the capstone as a brief-plus-candidates-plus-evidence-plus-recommendation workflow rather than as a final flashy notebook.\n"
|
|
],
|
|
"id": "dd3b7309"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "QuantumLearning (.venv)",
|
|
"language": "python",
|
|
"name": "quantum-learning"
|
|
},
|
|
"language_info": {
|
|
"name": "python",
|
|
"version": "3.12"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|