A design study with one question: what does a diffusion language model look like when its native alphabet is {0, 1, 2} and its memory is written in the fusion space of non-Abelian anyons. The three-valued logic the study rests on already runs in the SOPHIA XT routing stack, with the measured results below. The qutrit algebra, the ternary arithmetic and the anyon braiding are computed on this page.
Ternary decision logic is load-bearing in how the SOPHIA XT stack routes work to specialists and verifies their output. These are the measured results from that work; the qutrit architecture further down is the research direction they point at.
In the Constellation orchestrator, a verifier lane scores another model's output on a three-valued scale, true · false · abstain, with a confidence attached, rather than a binary pass/fail. Abstain is a first-class outcome, and it is the practical face of three-valued logic in the system today.
Training-free cosine routing over sealed NCN capsule embeddings is clean at N=2: 18/20 combined (10/10 Mnema, 9/10 a published capsule build, 8/10 wrapping Llama-3.2-1B). On similar-domain capsules it collapses above N=2 (100% → 46.7% by N=6), and a learned N≥3 router collapsed to zero mutual information. That is the open frontier.
Offline, the same cosine signal separates ~82% of up to 48 labeled targets, validated across four frozen base models (Llama-3.2-1B / -3B, Qwen2.5-1.5B, SmolLM2-1.7B). The gap between this ceiling and deployment routing is the representation problem: the routing space is separable; the query-to-capsule projection is not solved yet.
The verifier's three answers are the three values of Kleene's strong logic, where AND and OR are min and max and the middle value absorbs whatever it meets. Balanced ternary is the arithmetic side of the same alphabet: digits \{-1, 0, +1\}, negation by digit flip, and a carry chain that is a trit rather than a bit. Both are evaluated live below.
| a \ b | F | U | T |
|---|---|---|---|
| F | F | F | F |
| U | F | U | U |
| T | F | U | T |
| a \ b | F | U | T |
|---|---|---|---|
| F | F | U | T |
| U | U | U | T |
| T | T | T | T |
| a \ b | F | U | T |
|---|---|---|---|
| F | T | T | T |
| U | U | T | T |
| T | F | U | T |
| a \ b | F | U | T |
|---|---|---|---|
| F | F | U | U |
| U | U | U | U |
| T | U | U | T |
| a \ b | F | U | T |
|---|---|---|---|
| F | T | F | U |
| U | F | U | T |
| T | U | T | F |
| F = − | ¬ = T | false |
| U = 0 | ¬ = U | abstain |
| T = + | ¬ = F | true |
| carry | 0 | − | 0 | 0 | 0 | |
| x = 17 | 0 | + | − | 0 | − | = 17 |
| y = -8 | 0 | 0 | − | 0 | + | = -8 |
| x + y = 9 | 0 | 0 | + | 0 | 0 | = 9 |
A qutrit is a unit vector in \mathbb{C}^3; n of them span 3^n dimensions against 2^n for qubits. Its unitaries are SU(3), generated by the eight Gell-Mann matrices, and its Clifford group is generated by the Fourier gate H_3 and the phase gate S_3.
|\psi\rangle = \alpha|0\rangle + \beta|1\rangle + \gamma|2\rangle, \qquad |\alpha|^2 + |\beta|^2 + |\gamma|^2 = 1H_3 = \frac{1}{\sqrt 3}\begin{pmatrix} 1 & 1 & 1 \\ 1 & \omega & \omega^2 \\ 1 & \omega^2 & \omega \end{pmatrix}, \quad \omega = e^{2\pi i/3}, \qquad X_3 = \begin{pmatrix} 0&0&1\\1&0&0\\0&1&0 \end{pmatrix}, \quad Z_3 = \mathrm{diag}(1, \omega, \omega^2)S_3 = \mathrm{diag}(1, 1, \omega), \qquad T_3 = \mathrm{diag}(1, \zeta, \zeta^8), \quad \zeta = e^{2\pi i/9}Two-qutrit entanglers: the controlled increment \mathrm{CX}_3|a,b\rangle = |a, b+a \bmod 3\rangle and the controlled phase \mathrm{CZ}_3|a,b\rangle = \omega^{ab}|a,b\rangle, related by H_3 on the target exactly as CNOT and CZ are for qubits.
The Gell-Mann matrices \lambda_1 \ldots \lambda_8 are traceless and Hermitian with \mathrm{Tr}(\lambda_a \lambda_b) = 2\delta_{ab}, so any density matrix expands as
\rho = \tfrac13 I + \tfrac12 \sum_{a=1}^{8} n_a \lambda_a, \qquad n_a = \mathrm{Tr}(\rho\lambda_a), \qquad \mathrm{Tr}\,\rho^2 = \tfrac13 + \tfrac12 |n|^2The 8-vector n is the qutrit's Bloch vector. Pure states have |n|^2 = 4/3 but do not fill the sphere of that radius: the set of pure states is a four-dimensional surface inside an eight-dimensional ball, which is why the figure shows the eight components as bars and the diagonal pair (n_3, n_8) as a point in the triangle whose corners are the basis states.
Rotations \exp(-i\theta\lambda_a/2) are computed by scaling and squaring of the 3×3 series; the figure reports every gate's unitarity to rounding.
A non-Abelian anyon theory assigns each pair of particles a set of fusion outcomes; the space of ways several particles can fuse to a given total charge is the qudit, and moving particles around each other acts on it by unitaries that depend only on the topology of the paths. Two pieces of data fix the theory: the F-symbols, which change the order of fusion, and the R-symbols, the phases of exchanging two particles in a definite channel. They must satisfy the pentagon and hexagon equations, and the figure checks both.
Fibonacci
\tau \times \tau = 1 + \tau, \qquad d_\tau = \varphi = \tfrac{1+\sqrt5}{2}F^{\tau\tau\tau}_\tau = \begin{pmatrix} \varphi^{-1} & \varphi^{-1/2} \\ \varphi^{-1/2} & -\varphi^{-1} \end{pmatrix}, \qquad R^{\tau\tau}_1 = e^{-4\pi i/5}, \quad R^{\tau\tau}_\tau = e^{3\pi i/5}Three τ's with total charge τ span two states, a qubit; the braid group on three strands acts on it through \sigma_1 = R and \sigma_2 = F R F^{-1}, and the image is dense in SU(2) (Freedman, Larsen and Wang 2002), so braiding alone is universal.
Metaplectic, SU(2)₄ ≅ SO(3)₂
X \times X = 1 + Y, \quad Y \times Y = 1 + Y + Z, \quad Y \times Z = Y, \quad Z \times Z = 1d_X = \sqrt 3, \quad d_Y = 2, \quad d_Z = 1, \qquad [n]_q = \frac{\sin(n\pi/6)}{\sin(\pi/6)}Four Y's with trivial total charge span three states: a qutrit (Hastings, Nayak and Wang 2013). Braiding acts on it by a finite group, 54 elements up to phase in the figure's count, so the metaplectic scheme completes its gate set by measuring the total charge of pairs rather than by braiding alone. That measured step is where a three-valued readout enters the hardware story.
| 0.5000 | -0.7071 | 0.5000 |
| -0.7071 | 0.0000 | 0.7071 |
| 0.5000 | 0.7071 | 0.5000 |
| c = 1 | exp(i·-0.6667π) |
| c = Y | exp(i·0.6667π) |
| c = Z | exp(i·0.3333π) |
| X × X | 1 + Y |
| X × Y | X + X′ |
| X × X′ | Y + Z |
| X × Z | X′ |
| Y × Y | 1 + Y + Z |
| Y × X′ | X + X′ |
| Y × Z | Y |
| X′ × X′ | 1 + Y |
| X′ × Z | X |
| Z × Z | 1 |
| -0.500−0.866i | 0 | 0 |
| 0 | -0.500+0.866i | 0 |
| 0 | 0 | 0.500+0.866i |
| -0.250+0.433i | 0.354+0.612i | 0.250−0.433i |
| 0.354+0.612i | 0 | 0.354+0.612i |
| 0.250−0.433i | 0.354+0.612i | -0.250+0.433i |
| -0.500−0.866i | 0 | 0 |
| 0 | -0.500+0.866i | 0 |
| 0 | 0 | 0.500+0.866i |
| -0.250−0.433i | 0.354+0.612i | -0.250−0.433i |
| 0.354+0.612i | 0 | -0.354−0.612i |
| -0.250−0.433i | -0.354−0.612i | -0.250−0.433i |
| (1,Y,1) | -0.250−0.433i | 0.2500 |
| (Y,Y,1) | 0.354+0.612i | 0.5000 |
| (Z,Y,1) | -0.250−0.433i | 0.2500 |
| Σ|amp|² | 1.000000 | |
A diffusion language model denoises a whole sequence at once rather than emitting one token after another. SophiaXTQ-T asks what changes when the sequence lives on a three-letter alphabet and the denoiser's state is a register of qutrits: the noise process becomes a random walk on \mathbb{Z}_3 per position, driven by X_3, and the denoising step is a unitary on the register followed by a three-outcome measurement, which is the verifier's true, false, abstain read directly off the hardware.
The pieces on this page are the scaffolding for that question: the qutrit gate set and its 8-vector, the three-valued logic the verifier already uses, and the anyon fusion space that would hold the register with topological protection.
Open problems
Routing above N=2 on similar-domain capsules collapses, and the learned router reached zero mutual information; the representation problem, projecting a query into the capsule space, is unsolved.
A first reproducible training run of the ternary denoiser has not been done; the benchmarks will come from that run.
Metaplectic braiding is not universal on its own, so the architecture depends on charge measurement of anyon pairs, an operation that no current device performs.
The same operations the figure above runs, written out for a notebook: the gate matrices, a two-qutrit register, the entanglers and the Gell-Mann 8-vector.
1import numpy as np23w = np.exp(2j* np.pi /3)4zeta = np.exp(2j* np.pi /9)56X3 = np.array([[0,0,1],[1,0,0],[0,1,0]], dtype=complex)# |j> -> |j+1 mod 3>7Z3 = np.diag([1, w, w**2])8H3 = np.array([[1,1,1],[1, w, w**2],[1, w**2, w]])/ np.sqrt(3)# Fourier on Z_39S3 = np.diag([1,1, w])# with H3 generates the Clifford group10T3 = np.diag([1, zeta, zeta**8])# non-Clifford (Howard & Vala 2012)1112GELL_MANN =[13 np.array([[0,1,0],[1,0,0],[0,0,0]]),14 np.array([[0,-1j,0],[1j,0,0],[0,0,0]]),15 np.array([[1,0,0],[0,-1,0],[0,0,0]]),16 np.array([[0,0,1],[0,0,0],[1,0,0]]),17 np.array([[0,0,-1j],[0,0,0],[1j,0,0]]),18 np.array([[0,0,0],[0,0,1],[0,1,0]]),19 np.array([[0,0,0],[0,0,-1j],[0,1j,0]]),20 np.array([[1,0,0],[0,1,0],[0,0,-2]])/ np.sqrt(3),21]2223defrotation(a:int, theta:float)-> np.ndarray:24"""exp(-i theta lambda_a / 2) by eigendecomposition."""25 vals, vecs = np.linalg.eigh(GELL_MANN[a -1])26return vecs @ np.diag(np.exp(-0.5j* theta * vals)) @ vecs.conj().T2728classRegister:29"""n qutrits; qutrit k owns base-3 digit n-1-k of the basis index."""3031def__init__(self, n:int):32 self.n = n33 self.psi = np.zeros(3**n, dtype=complex)34 self.psi[0]=1.03536defapply(self, U: np.ndarray, k:int):37 psi = self.psi.reshape([3]* self.n)38 psi = np.moveaxis(np.tensordot(U, psi, axes=([1],[k])),0, k)39 self.psi = psi.reshape(-1)4041defcx3(self, c:int, t:int):42 psi = self.psi.reshape([3]* self.n)43 out = np.zeros_like(psi)44for a inrange(3):45 idx =[slice(None)]* self.n46 idx[c]= a47 out[tuple(idx)]= np.roll(psi[tuple(idx)], a, axis=t if t < c else t -1)48 self.psi = out.reshape(-1)4950defcz3(self, c:int, t:int):51 psi = self.psi.reshape([3]* self.n)52 a = np.arange(3).reshape([3if i == c else1for i inrange(self.n)])53 b = np.arange(3).reshape([3if i == t else1for i inrange(self.n)])54 self.psi =(psi * w **((a * b)%3)).reshape(-1)5556defreduced(self, k:int)-> np.ndarray:57 psi = np.moveaxis(self.psi.reshape([3]* self.n), k,0).reshape(3,-1)58return psi @ psi.conj().T5960defbloch8(self, k:int)-> np.ndarray:61 rho = self.reduced(k)62return np.array([np.trace(rho @ L).real for L in GELL_MANN])6364defprobabilities(self)-> np.ndarray:65return np.abs(self.psi)**26667if __name__ =="__main__":68 r = Register(2)69 r.apply(H3,0)70 r.cx3(0,1)# qutrit Bell state (|00> + |11> + |22>) / sqrt 371print(np.round(r.probabilities(),4))72print("purity of q0:", np.trace(r.reduced(0) @ r.reduced(0)).real)# 1/373print("8-vector of q0:", np.round(r.bloch8(0),6))# all zero
The SophiaXTQ-T design study: the qutrit register, the ternary diffusion process and the anyon encoding, as a PDF.
Download PDF