科研速览 · Science Skim继续刷下去 · Keep skimming →
◆ SciPost Physics Lecture Notes2026-08-03· Computer science

How to write a simulator for quantum circuits from scratch: A tutorial

Michael J. McGuffin, Jean‐Marc Robert, Kazuki Ikeda

原始摘要(英文原文)· Original abstract
We guide a competent programmer through the programming of a quantum circuit simulator, supporting quantum logic gates with arbitrary control qubits on 20+ qubits, assuming no previous knowledge of quantum computing. We explain qubit-wise multiplication for updating the state vector; how to compute partial traces on arbitrary subsets of qubits to find reduced density matrices; and computing qubit phase and purity. A sample implementation in JavaScript is provided, which also demonstrates how to compute von Neumann entropy, concurrence (to quantify entanglement), and magic, with source code much smaller and easier to study than other popular software packages.
读原文 · Read the paper ↗

AI 追问PRO

登录后使用 AI 追问

讨论区

登录后参与讨论

相关论文 · Related

How to write a simulator for quantum circuits from scratch: A tutorial — 科研速览 Science Skim