mirror of
https://github.com/saymrwulf/NTT-learning.git
synced 2026-09-07 19:40:49 +00:00
163 lines
9.7 KiB
Text
163 lines
9.7 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "meta",
|
|
"difficulty": 1,
|
|
"kind": "orientation",
|
|
"title": "Problem Set Goals"
|
|
}
|
|
},
|
|
"source": "## META | difficulty 1 | Problem Set Goals\n\nThis notebook checks whether the CT schedule is now a visible object rather than a name.\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "meta",
|
|
"difficulty": 1,
|
|
"kind": "route_nav",
|
|
"title": "Route Guardrails"
|
|
}
|
|
},
|
|
"source": "## META | difficulty 1 | Route Guardrails\n\nYou are at **step 13 of 27** in the only supported route.\n\nNever choose the next notebook manually from the file tree. Use only the links in this cell and the final handoff cell.\n\n**Immediate navigation**\n- Next notebook: [Butterfly Mechanics / 03 Fast Forward CT / Studio](studio.ipynb)\n- Previous notebook: [Butterfly Mechanics / 03 Fast Forward CT / Lab](lab.ipynb)\n- Restart route: [Start Here](../../START_HERE.ipynb)\n\n**Official route chain**\n1. [Start Here](../../START_HERE.ipynb)\n2. [Course Blueprint](../../COURSE_BLUEPRINT.ipynb)\n3. [Foundations / 01 Convolution To Toy NTT / Lecture](../../foundations/01_convolution_to_toy_ntt/lecture.ipynb)\n4. [Foundations / 01 Convolution To Toy NTT / Lab](../../foundations/01_convolution_to_toy_ntt/lab.ipynb)\n5. [Foundations / 01 Convolution To Toy NTT / Problems](../../foundations/01_convolution_to_toy_ntt/problems.ipynb)\n6. [Foundations / 01 Convolution To Toy NTT / Studio](../../foundations/01_convolution_to_toy_ntt/studio.ipynb)\n7. [Foundations / 02 Negative Wrapped NTT / Lecture](../../foundations/02_negative_wrapped_ntt/lecture.ipynb)\n8. [Foundations / 02 Negative Wrapped NTT / Lab](../../foundations/02_negative_wrapped_ntt/lab.ipynb)\n9. [Foundations / 02 Negative Wrapped NTT / Problems](../../foundations/02_negative_wrapped_ntt/problems.ipynb)\n10. [Foundations / 02 Negative Wrapped NTT / Studio](../../foundations/02_negative_wrapped_ntt/studio.ipynb)\n11. [Butterfly Mechanics / 03 Fast Forward CT / Lecture](lecture.ipynb)\n12. [Butterfly Mechanics / 03 Fast Forward CT / Lab](lab.ipynb)\n13. **Butterfly Mechanics / 03 Fast Forward CT / Problems** <- you are here\n14. [Butterfly Mechanics / 03 Fast Forward CT / Studio](studio.ipynb)\n15. [Butterfly Mechanics / 04 Fast Inverse GS / Lecture](../04_fast_inverse_gs/lecture.ipynb)\n16. [Butterfly Mechanics / 04 Fast Inverse GS / Lab](../04_fast_inverse_gs/lab.ipynb)\n17. [Butterfly Mechanics / 04 Fast Inverse GS / Problems](../04_fast_inverse_gs/problems.ipynb)\n18. [Butterfly Mechanics / 04 Fast Inverse GS / Studio](../04_fast_inverse_gs/studio.ipynb)\n19. [Kyber Mapping / 05 Kyber NTT And Base Multiplication / Lecture](../../kyber_mapping/05_kyber_ntt_and_base_multiplication/lecture.ipynb)\n20. [Kyber Mapping / 05 Kyber NTT And Base Multiplication / Lab](../../kyber_mapping/05_kyber_ntt_and_base_multiplication/lab.ipynb)\n21. [Kyber Mapping / 05 Kyber NTT And Base Multiplication / Problems](../../kyber_mapping/05_kyber_ntt_and_base_multiplication/problems.ipynb)\n22. [Kyber Mapping / 05 Kyber NTT And Base Multiplication / Studio](../../kyber_mapping/05_kyber_ntt_and_base_multiplication/studio.ipynb)\n23. [Professional / 06 Debugging NTT Failures / Lecture](../../professional/06_debugging_ntt_failures/lecture.ipynb)\n24. [Professional / 06 Debugging NTT Failures / Lab](../../professional/06_debugging_ntt_failures/lab.ipynb)\n25. [Professional / 06 Debugging NTT Failures / Problems](../../professional/06_debugging_ntt_failures/problems.ipynb)\n26. [Professional / 06 Debugging NTT Failures / Studio](../../professional/06_debugging_ntt_failures/studio.ipynb)\n27. [Course Complete](../../COURSE_COMPLETE.ipynb)\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 2,
|
|
"kind": "quiz",
|
|
"title": "Multiple-Choice Retrieval"
|
|
}
|
|
},
|
|
"source": "## MANDATORY | difficulty 2 | Multiple-Choice Retrieval\n\nChoose one answer for each:\n\n1. CT makes the transform faster by:\n A. changing the ring\n B. reusing bracket structure through staged butterflies\n C. deleting the inverse\n\n2. The natural output order of the direct CT schedule discussed here is:\n A. normal order\n B. bit-reversed order\n C. random order\n\n3. A stage explorer is useful mainly because it:\n A. hides the pairings\n B. makes data movement and zeta usage inspectable\n C. removes the need for examples\n"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 2,
|
|
"kind": "quiz",
|
|
"title": "Answer Key"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": "# MANDATORY | difficulty 2 | Answer Key\n\nanswers = {1: \"B\", 2: \"B\", 3: \"B\"}\nprint(answers)\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 2,
|
|
"kind": "exercise",
|
|
"title": "Paper Example Check"
|
|
}
|
|
},
|
|
"source": "## MANDATORY | difficulty 2 | Paper Example Check\n\nVerify that the CT trace on `[1,2,3,4]` in `Z_7681` with `\u03c8 = 1925` lands on the paper\u2019s BO output.\n"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 2,
|
|
"kind": "exercise",
|
|
"title": "Check The BO Output"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": "# MANDATORY | difficulty 2 | Check The BO Output\n\nfrom ntt_learning.toy_ntt import fast_ntt_psi_ct_trace\n\ntrace = fast_ntt_psi_ct_trace([1, 2, 3, 4], 7681, 1925)\nprint(trace.raw_output)\nassert list(trace.raw_output) == [1467, 3471, 2807, 7621]\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "mandatory",
|
|
"difficulty": 2,
|
|
"kind": "reflection",
|
|
"title": "Written Reflection"
|
|
}
|
|
},
|
|
"source": "## MANDATORY | difficulty 2 | Written Reflection\n\nExplain why the phrase \u201csame transform, better schedule\u201d is the right headline for CT.\n"
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "facultative",
|
|
"difficulty": 4,
|
|
"kind": "exploration",
|
|
"title": "Optional Challenge"
|
|
}
|
|
},
|
|
"outputs": [],
|
|
"source": "# FACULTATIVE | difficulty 4 | Optional Challenge\n\nfrom ntt_learning.toy_ntt import fast_ntt_psi_ct_trace, find_psi\n\ntrace = fast_ntt_psi_ct_trace([3, 1, 4, 1, 5, 9, 2, 6], 97, find_psi(8, 97))\nfor stage in trace.stages:\n print(stage.stage_index, stage.output_values)\n"
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {
|
|
"pedagogy": {
|
|
"role": "meta",
|
|
"difficulty": 1,
|
|
"kind": "handoff",
|
|
"title": "Next Notebook"
|
|
}
|
|
},
|
|
"source": "## META | difficulty 1 | Next Notebook\n\nYou finished **Butterfly Mechanics / 03 Fast Forward CT / Problems**.\n\n**Primary next action**\n- Next notebook: [Step 14 of 27 - Butterfly Mechanics / 03 Fast Forward CT / Studio](studio.ipynb)\n\n**Recovery links if you get lost**\n- Previous notebook: [Butterfly Mechanics / 03 Fast Forward CT / Lab](lab.ipynb)\n- Restart route: [Start Here](../../START_HERE.ipynb)\n"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"name": "python"
|
|
},
|
|
"ntt_learning": {
|
|
"title": "Problems: 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
|
|
}
|