The scheme and its circuits
The state is a four-component Dirac spinor \(\psi(\mathbf{x},t)\) on a lattice. Following Dellar (2011), the scheme uses the Majorana form of the Dirac equation, in which the three matrices multiplying the spatial derivatives are real, so each spatial gradient becomes a \(\pm 1\) lattice shift after a fixed spinor rotation.
One time step is split into per-axis substeps. Each substep
rotates into the characteristic frame, applies the \(\mathrm{SU}(2)\) collision \(\hat{Q}\) that carries the mass and the potential, streams by one site, and rotates back. Every factor is unitary, so the discrete \(\ell_2\) norm is conserved exactly – which is precisely what a quantum circuit on \(n\) qubits implements.
Amplitude encoding
The four spinor components live in 2 shared spinor qubits; each lattice axis of \(N\) sites is addressed by \(\log_2 N\) position qubits. Writing the spinor bits as \(q_0,q_1\) and the position bits as \(p_0,\dots,p_{n-1}\),
A \(32^3\) lattice (32,768 sites) is therefore represented in
\(2 + 5 + 5 + 5 = 17\) qubits. Implemented in qlb_port.operators.
The unit operations as gates
Rotations and collision. These are fixed \(4\times 4\) unitaries on the two
spinor qubits. They are compiled with the exact Cartan (KAK) decomposition: the
rotation costs one CX gate, the collision two. See qlb_port.port and
qlb_port.sweep.
Streaming is \(+1\) on the position register. Moving every amplitude one
site is the map \(|x\rangle \mapsto |x+1\rangle\), i.e. binary “add one” – a
ripple of multi-controlled-X gates on the address bits, applied to all sites at once.
The direction qubit \(q_1\) controls whether the register is incremented or
decremented. See qlb_port.streaming.
Bounce-back is \(+1\) on a folded ring. Folding the direction qubit into
the position register as its most significant bit turns a hard-wall reflection into a
single plain increment: interior movers advance one site, and a mover that reaches a
wall crosses the fold and returns with its direction reversed. One increment does
advection and reflection at once. See
qlb_port.streaming.reflecting_streaming_circuit().
Position-dependent potential. In the massless case the collision is a pure phase,
so the potential is a diagonal phase oracle
\(\mathcal{O}_V = \mathrm{diag}(\hat{a}(0),\dots,\hat{a}(N-1))\) on the position
register. In the massive case it is a position-multiplexed collision: a uniform
vacuum collision on the spinor followed by a position-controlled correction that acts
only where the potential is nonzero. See qlb_port.potential.
Assembling a time step
Single-axis sweeps (qlb_port.sweep) are tensored – one position register per
axis on a shared spinor register – into two- and three-dimensional time steps
(qlb_port.twod, qlb_port.threed). Because the position registers are
disjoint, the cost of a \(D\)-dimensional step is the sum of the \(D\)
single-axis sweep costs plus the constant spinor gates.
The porting harness
All of the above is produced and checked by a single primitive
(qlb_port.port): given a target unitary \(U\), compile it to a chosen gate
set and verify that the compiled circuit reproduces \(U\) on the emulator,
returning the phase-invariant fidelity
\(F = |\mathrm{tr}(U^\dagger U_\mathrm{circ})| / \dim\), the two-qubit gate count,
and the depth.