mirror of
https://github.com/saymrwulf/NTT-learning.git
synced 2026-09-06 19:30:40 +00:00
151 lines
6.5 KiB
Text
151 lines
6.5 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "meta",
|
|
"difficulty": 1,
|
|
"kind": "orientation",
|
|
"title": "Lab Goals"
|
|
}
|
|
},
|
|
"source": "## META | difficulty 1 | Lab Goals\n\nYou should predict stage pairings and zetas before running the stage explorer.\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 3,
|
|
"kind": "exercise",
|
|
"title": "Exercise 1"
|
|
}
|
|
},
|
|
"source": "## MANDATORY | difficulty 3 | Exercise 1\n\nFor the `n = 4` example, predict:\n\n- which original coefficients pair in stage 1\n- which adjacent positions pair in stage 2\n- why the output is not yet in normal order\n"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 3,
|
|
"kind": "exercise",
|
|
"title": "Prediction Check For n=4"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": "# MANDATORY | difficulty 3 | Prediction Check For n=4\n\nfrom IPython.display import display\n\nfrom ntt_learning.toy_ntt import fast_ntt_psi_ct_trace\nfrom ntt_learning.visuals import interactive_trace\n\ntrace = fast_ntt_psi_ct_trace([1, 2, 3, 4], 7681, 1925)\ndisplay(interactive_trace(trace, title=\"Check your n=4 prediction\"))\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 3,
|
|
"kind": "exercise",
|
|
"title": "Exercise 2"
|
|
}
|
|
},
|
|
"source": "## MANDATORY | difficulty 3 | Exercise 2\n\nFor the `n = 8` example, name the stage count before you run the next cell.\nThen name which stage feels most confusing and why.\n"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 3,
|
|
"kind": "exercise",
|
|
"title": "Prediction Check For n=8"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": "# MANDATORY | difficulty 3 | Prediction Check For n=8\n\nfrom IPython.display import display\n\nfrom ntt_learning.toy_ntt import fast_ntt_psi_ct_trace, find_psi\nfrom ntt_learning.visuals import interactive_trace\n\ntrace = fast_ntt_psi_ct_trace([0, 1, 2, 3, 4, 5, 6, 7], 97, find_psi(8, 97))\ndisplay(interactive_trace(trace, title=\"Check your n=8 prediction\"))\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 2,
|
|
"kind": "reflection",
|
|
"title": "Reflection"
|
|
}
|
|
},
|
|
"source": "## MANDATORY | difficulty 2 | Reflection\n\nReflection prompt:\n\n- Which stage feels easiest to see by eye?\n- Which stage feels most like \u201cpure schedule\u201d rather than \u201cnew algebra\u201d?\n- Why is BO output not a bug?\n"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "facultative",
|
|
"difficulty": 4,
|
|
"kind": "exploration",
|
|
"title": "Optional: Change The n=8 Signal"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": "# FACULTATIVE | difficulty 4 | Optional: Change The n=8 Signal\n\nimport ipywidgets as widgets\nfrom IPython.display import display\n\nfrom ntt_learning.toy_ntt import fast_ntt_psi_ct_trace, find_psi\nfrom ntt_learning.visuals import interactive_trace\n\npsi = find_psi(8, 97)\n\ndef preview(a0=0, a1=1, a2=2, a3=3, a4=4, a5=5, a6=6, a7=7):\n trace = fast_ntt_psi_ct_trace([a0, a1, a2, a3, a4, a5, a6, a7], 97, psi)\n display(interactive_trace(trace, title=\"Interactive n=8 CT trace\"))\n\ndisplay(\n widgets.interact(\n preview,\n a0=(0, 12),\n a1=(0, 12),\n a2=(0, 12),\n a3=(0, 12),\n a4=(0, 12),\n a5=(0, 12),\n a6=(0, 12),\n a7=(0, 12),\n )\n)\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "meta",
|
|
"difficulty": 1,
|
|
"kind": "handoff",
|
|
"title": "Next Notebook"
|
|
}
|
|
},
|
|
"source": "## META | difficulty 1 | Next Notebook\n\nNext notebook: `problems.ipynb`\n"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"name": "python"
|
|
},
|
|
"ntt_learning": {
|
|
"title": "Lab: Fast Forward CT",
|
|
"contract_version": "0.2",
|
|
"sequence": [
|
|
"notebooks/START_HERE.ipynb",
|
|
"notebooks/COURSE_BLUEPRINT.ipynb",
|
|
"notebooks/foundations/01_convolution_to_toy_ntt/lecture.ipynb",
|
|
"notebooks/foundations/01_convolution_to_toy_ntt/lab.ipynb",
|
|
"notebooks/foundations/01_convolution_to_toy_ntt/problems.ipynb",
|
|
"notebooks/foundations/01_convolution_to_toy_ntt/studio.ipynb",
|
|
"notebooks/foundations/02_negative_wrapped_ntt/lecture.ipynb",
|
|
"notebooks/foundations/02_negative_wrapped_ntt/lab.ipynb",
|
|
"notebooks/foundations/02_negative_wrapped_ntt/problems.ipynb",
|
|
"notebooks/foundations/02_negative_wrapped_ntt/studio.ipynb",
|
|
"notebooks/butterfly_mechanics/03_fast_forward_ct/lecture.ipynb",
|
|
"notebooks/butterfly_mechanics/03_fast_forward_ct/lab.ipynb",
|
|
"notebooks/butterfly_mechanics/03_fast_forward_ct/problems.ipynb",
|
|
"notebooks/butterfly_mechanics/03_fast_forward_ct/studio.ipynb",
|
|
"notebooks/butterfly_mechanics/04_fast_inverse_gs/lecture.ipynb",
|
|
"notebooks/butterfly_mechanics/04_fast_inverse_gs/lab.ipynb",
|
|
"notebooks/butterfly_mechanics/04_fast_inverse_gs/problems.ipynb",
|
|
"notebooks/butterfly_mechanics/04_fast_inverse_gs/studio.ipynb",
|
|
"notebooks/kyber_mapping/05_kyber_ntt_and_base_multiplication/lecture.ipynb",
|
|
"notebooks/kyber_mapping/05_kyber_ntt_and_base_multiplication/lab.ipynb",
|
|
"notebooks/kyber_mapping/05_kyber_ntt_and_base_multiplication/problems.ipynb",
|
|
"notebooks/kyber_mapping/05_kyber_ntt_and_base_multiplication/studio.ipynb",
|
|
"notebooks/professional/06_debugging_ntt_failures/lecture.ipynb",
|
|
"notebooks/professional/06_debugging_ntt_failures/lab.ipynb",
|
|
"notebooks/professional/06_debugging_ntt_failures/problems.ipynb",
|
|
"notebooks/professional/06_debugging_ntt_failures/studio.ipynb",
|
|
"notebooks/COURSE_COMPLETE.ipynb"
|
|
]
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|