第 3 章 量子算法基础 代码演示¶
六个入门主题:Deutsch-Jozsa、量子傅里叶变换、相位估计、Simon 算法、Grover 搜索与振幅放大。
3 个 demo(点击查看):
1. 01 Dj Constant Balanced¶

Deutsch-Jozsa 4-qubit,常数(f(x)=0)vs 平衡(f(x)=x_0)Oracle 一次查询测量柱图
python demos/ch03-algo-basics/01_dj_constant_balanced.py
2. 02 Grover 4Qubit¶

Grover 4-qubit 标记 |0011⟩,迭代 0/1/2/4 次测量概率演化(2×2 子图)
python demos/ch03-algo-basics/02_grover_4qubit.py
3. 03 Qft 4Qubit¶

QFT_4|0010⟩ 16 个分量的振幅-相位极坐标散点(用 get_matrix 拿精确 statevector)
python demos/ch03-algo-basics/03_qft_4qubit.py