QRAC State and Measurement Explorer
Choose a code state and then choose how to measure it. The state view connects the encoded classical bits to the quantum state, while the readout view compares a bit-specific QRAC measurement with a one-shot simultaneous POVM used in QRAO-style rounding.
This demonstration was built with generative AI.
Signal and recovery probability
Write the encoded bit as a sign, s_i=(-1)^{x_i}, and the decoded output as \hat{s}_i=(-1)^{\hat{x}_i}. The app reports the decoded correlation
c_i=\mathbb{E}[s_i\hat{s}_i].
For the symmetric code states shown here, the probability of recovering bit i is
p_i=\Pr(\hat{x}_i=x_i)=\frac{1+c_i}{2}.
Thus c_i=0 means a random bit and c_i=1 means perfect recovery. This code-state correlation is distinct from the POVM marginal coefficient that is often denoted by \kappa.
Code states
The one-qubit code states are
\rho_x^{(2,1)}=\frac{1}{2}\left[I+\frac{(-1)^{x_1}X+(-1)^{x_2}Z}{\sqrt{2}}\right],
\rho_x^{(3,1)}=\frac{1}{2}\left[I+\frac{(-1)^{x_1}X+(-1)^{x_2}Y+(-1)^{x_3}Z}{\sqrt{3}}\right].
They form a square and a cube on the Bloch sphere. The (3,2) code uses two-qubit pure states in a four-dimensional Hilbert space, so one Bloch sphere cannot represent the full state. For that code, the app shows both reduced Bloch vectors and the 3\times3 Pauli-correlation matrix. Its eight code states, in the computational-basis order |00\rangle,|01\rangle,|10\rangle,|11\rangle, are
| x | |\psi_x\rangle |
|---|---|
| 000 | |00\rangle |
| 001 | (|00\rangle+|01\rangle+|10\rangle)/\sqrt3 |
| 010 | (|00\rangle-|01\rangle+|11\rangle)/\sqrt3 |
| 011 | |01\rangle |
| 100 | (|00\rangle-|10\rangle-|11\rangle)/\sqrt3 |
| 101 | |10\rangle |
| 110 | |11\rangle |
| 111 | (|01\rangle-|10\rangle+|11\rangle)/\sqrt3 |
Two ways to read the code
A bit-specific QRAC measurement chooses the desired bit first and performs its binary POVM. A simultaneous POVM produces estimates of every encoded bit in one shot. For the one-qubit codes, let P_k be the Pauli observable assigned to bit k. The bit-specific binary effects are
M_{b\mid k}=\frac12\left[I+(-1)^b P_k\right].
For the (3,2) code, replace P_k by
\begin{aligned} O_1&=\sqrt{\frac23}ZI+\frac{XX+XZ}{\sqrt6},\\ O_2&=\sqrt{\frac23}IZ+\frac{IX+YY}{\sqrt6},\\ O_3&=\sqrt{\frac23}ZZ-\frac{XI+ZX}{\sqrt6}. \end{aligned}
Its binary effects are again M_{b\mid k}=\frac12[I+(-1)^bO_k]. For the code states in the app, the simultaneous effects are
M_y^{(2,1)}=\frac{1}{2}\rho_y^{(2,1)},\qquad M_y^{(3,1)}=\frac{1}{4}\rho_y^{(3,1)},\qquad M_y^{(3,2)}=\frac{1}{2}\rho_y^{(3,2)}.
The last POVM is equivalent to choosing the even- or odd-parity code basis with equal probability and measuring in that basis.
| Code | Selected-bit recovery | Simultaneous per-bit recovery |
|---|---|---|
| (2,1) | \frac12+\frac{1}{2\sqrt2}\approx85.4\% | \frac34=75.0\% |
| (3,1) | \frac12+\frac{1}{2\sqrt3}\approx78.9\% | \frac23\approx66.7\% |
| (3,2) | \frac12+\frac{1}{\sqrt6}\approx90.8\% | \frac56\approx83.3\% |
Sources and scope
The (2,1) and (3,1) encodings and QRAO rounding measurements follow Approximate Solutions of Combinatorial Problems via Quantum Relaxations. The explicit (3,2) construction and parity-basis simultaneous measurement follow Quantum-Relaxation Based Optimization Algorithms: Theoretical Extensions. The optimal (n,n-1) construction is given in Analytical construction of (n,n-1) quantum random access codes saturating the conjectured bound, Physical Review A 114, 012441 (2026), arXiv:2601.19190.
The app evaluates exact ideal-state probabilities. It does not simulate hardware noise or a variational optimization algorithm.