engine::course reads the course from wai-quantum/course/: 21 lessons from a first circuit through superposition, entanglement, interference, the standard algorithms, noise and mitigation, error correction and fault tolerance to resource estimates, each a Markdown text in English and Simplified Chinese and an exercise.json with a schema. A check runs each case of an exercise (a generator's inputs) with its intent and the verdict, measures its constraints (the gates allowed, counts, the T count, the critique's smells, the resource estimate's counts), and says what went wrong from the diagnostics, the verdict and the critique, never from the solution. The tests hold every solution to pass by proof, every known wrong answer to fail for its stated reason, and every locale to every text and message. wai-quantum learn shows, starts, checks, hints and explains a lesson, keeps progress only on this machine, and speaks the language --lang or LANG names; the command summaries and docs topics have Chinese translations held to the English they came from. The verdict gains of_diagnostic for a generator's refusal. llms.txt names the course. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 lines
1.2 KiB
Markdown
7 lines
1.2 KiB
Markdown
<!-- 机器辅助翻译(machine-assisted translation):在对外推广之前,须由熟练的读者审校。 -->
|
||
|
||
为了看一个数据量子比特是否被翻转而去测量它,会破坏纠错码所保护的叠加。纠错转而测量*奇偶性*:两个量子比特是否一致。这对 |000⟩ 和 |111⟩ 是一样的,因此不会透露被编码的值。
|
||
|
||
奇偶校验被计算到一个*辅助量子比特*(ancilla)中,即一个处于 |0⟩ 的新量子比特:从校验所比较的每个量子比特出发作用一个受控非门,把它的值(模 2)加到辅助量子比特上,然后测量辅助量子比特。这一对结果,即*校验子*(syndrome),指出了被翻转的量子比特:对于比特翻转码,00 表示没有错误,每一种单次翻转都给出它自己的非零模式。
|
||
|
||
更大的码也是这样工作的。表面码(surface code)把数据量子比特放在网格上,一遍又一遍地测量相邻量子比特之间的奇偶校验,由*解码器*(decoder)读取校验子的历史,找出最可能的错误。引擎的研究工具中就有这样的解码器:`wai-quantum lab help` 会列出纠错工具。
|