深色模式
Download exercise.py
cd docs/quantum/network/code python exercise.py
实现纯态保真度 F=|⟨a|b⟩|2。
def fidelity(a, b): return float(np.abs(np.vdot(a, b)) ** 2)
clone 后打开(相对仓库根目录):
docs/quantum/network/code/exercise.py