A random access code (RAC) encodes an $L$-bit string into a $k$-bit $(L>k)$ message from which any designated source bit can be recovered with high probability. Its quantum counterpart, a quantum random access code (QRAC), replaces the $k$-bit message with $k$ qubits. While upper bounds on the decoding success probability have long been studied in both classical and quantum settings, explicit constructions of optimal codes are known only in special cases, even for classical RACs. In this paper, we develop a constructive framework for classical $(L,k)$-RACs under both average- and worst-case criteria. We show that optimal code design reduces to selecting $2^k$ points in $\{0,1\}^L$ and $[0,1]^L$ for the average- and worst-case criteria, respectively, so as to minimize a distance-like objective. This characterization yields explicit constructions for general $(L,k)$. For $k=L-1$, we further obtain closed-form optimal encoders and decoders for both criteria, and show that the resulting classical $(L,L-1)$-RACs attain the corresponding proved upper bounds. We also show that these optimal classical codes induce $(L,L-1)$-QRACs that attain a conjectured upper bound on the decoding success probability. Numerical optimization suggests little difference between RACs and QRACs in the average-case setting, but a potentially large classical-quantum gap in the worst-case nonasymptotic regime.
翻译:随机存取码(RAC)将长度为$L$比特的字符串编码为长度为$k$比特($L>k$)的消息,使得任意指定源比特能以高概率恢复。其量子版本——量子随机存取码(QRAC)——将$k$比特消息替换为$k$个量子比特。尽管在经典和量子背景下,解码成功概率的上界早已被研究,但最优码的显式构造仅在特殊情形下已知,即使对于经典RAC也是如此。本文中,我们针对平均准则和最差准则两种情形,发展了一套经典$(L,k)$-RAC的构造性框架。我们证明,最优码的设计归结为在平均准则下选取$\{0,1\}^L$中的$2^k$个点,在最差准则下选取$[0,1]^L$中的$2^k$个点,以最小化一个类距离目标函数。这一刻画为一般$(L,k)$提供了显式构造。对于$k=L-1$,我们进一步得到两种准则下的闭式最优编码器和解码器,并证明由此得到的经典$(L,L-1)$-RAC达到了对应的已证上界。我们还证明,这些最优经典码诱导出$(L,L-1)$-QRAC,其解码成功概率达到了一个猜想的上界。数值优化表明,在平均准则下RAC与QRAC差异甚微,但在最差准则的非渐近区域中可能存在显著的经典-量子差距。