Writing guide on quantum computing (this article) covers conventions specific to quantum computing articles in this wiki. Read General writing guide first for structure, paragraph, and code block conventions that apply across all articles.
The audience reminder from the general guide is especially relevant here: quantum computing draws on linear algebra, complex analysis, and abstract algebra that a typical computer engineering student has not yet seen.
When a derivation uses a property that is not self-evident from the notation — that the Hamiltonian is Hermitian ($H^\dagger = H$), that the dagger of a product reverses order ($(AB)^\dagger = B^\dagger A^\dagger$), that trace is cyclic ($\mathrm{tr}(ABC) = \mathrm{tr}(CAB)$) — it is often worth adding a brief parenthetical at the point of use.
All quantum states are written using Dirac (bra-ket) notation. In DokuWiki + KaTeX, always use \lvert and \rvert instead of bare | so that delimiters scale correctly:
$\lvert\psi\rangle$ → $\lvert\psi\rangle$$\langle\psi\rvert$ → $\langle\psi\rvert$$\langle\phi\lvert\psi\rangle$ → $\langle\phi\lvert\psi\rangle$$\lvert\psi\rangle\langle\psi\rvert$ → $\lvert\psi\rangle\langle\psi\rvert$Operators ($H$, $X$, $Y$, $Z$, $\rho$) are plain italic. Use the commutator $[A, B] = AB - BA$ and anticommutator $\{A, B\} = AB + BA$ inline without a display equation when they are definitional asides. Always carry $\hbar$ in equations — do not silently set $\hbar = 1$.
The Bloch sphere maps every single-qubit pure state to a point on the unit sphere. The axis conventions used throughout this wiki are:
Mention the Bloch sphere position when describing any single-qubit state or gate. For gates, describe the axis and angle of rotation (e.g. “$X$ is a $\pi$ rotation about the $x$-axis”).
Articles about equations (Schrödinger, von Neumann, Lindblad) follow this structure:
$$...$$ block immediately after the intro paragraph — before any sections.## List of code implementations section at the bottom.Correctness pitfalls for equations: - Born rule: measurement probability equals the modulus squared — never “proportional to”. - Dissipator in the Lindblad equation: the jump term is $L_k\rho L_k^\dagger$, not $L_k^\dagger\rho L_k$. - von Neumann equation uses the commutator $[H,\rho] = H\rho - \rho H$, which is not zero because matrix multiplication is non-commutative.
Gate articles follow this structure:
$$...$$ block.## List of code implementations section at the bottom.Gate matrices are written in standard computational basis order: rows and columns indexed $\lvert 0\rangle, \lvert 1\rangle$ (single-qubit) or $\lvert 00\rangle, \lvert 01\rangle, \lvert 10\rangle, \lvert 11\rangle$ (two-qubit).
State articles follow this structure:
$$...$$ block.## List of code implementations section.Describe multi-qubit entangled states (Bell, GHZ, W) in terms of what happens to one qubit when another is measured — this is more informative than restating the ket.
Implementation articles are short: they contain one intro line, an explanation of how the code maps to the parent equation or concept, and one self-contained code block. The intro line follows the pattern:
[[parent-page|Parent concept]] implementation using Framework.
Name the file {concept}-{framework}.txt (e.g. x-gate-qiskit.txt, lindblad-equation-qutip.txt). Frameworks in use: Qiskit (circuits, state vectors), QuTiP (open systems, time evolution), cuStateVec (GPU low-level C), CUDA-Q (GPU kernel C++).
Before the code block, explain which solver or function maps to which LaTeX equation — this is the most useful thing an implementation article can do. Example: “mesolve(c_ops=[]) integrates $\dot\rho = -i[H,\rho]$; adding entries to c_ops adds the dissipator terms.”
The page graph is a DAG (directed acyclic graph). Category/overview pages (Quantum gate, Quantum state, Quantum circuit, Quantum error correction) appear in the top-level list at List of quantum computing concepts. Leaf articles (x-gate, plus-state, born-rule) do not appear in the top-level list — they are reachable via their parent category page.
When linking: - Link a concept on its first mention in the article body, not on every occurrence. - Never link the article's own title — a page does not link to itself. - Always link Dirac notation, Density matrix, Bloch sphere, hamiltonian, Probability amplitude on first use if they appear in an article that is not itself that page. - Implementation articles link back to their parent page in the first line; no other links are needed unless the code uses a concept worth explaining.
| for bras/kets — use \lvert/\rvert; bare pipes render ambiguously next to text and break in some KaTeX contexts.