A single-photon rangefinder, such as a lidar built on a single-photon avalanche diode (a detector that records the arrival time of individual photons), measures distance by comparing photon timestamps against the pattern it transmitted. When the laser is driven by a coded modulation instead of a single short pulse, the choice of code matters. For forty years that choice has been made by one rule: pick the code whose autocorrelation is as close to a spike as possible, meaning low "sidelobes" at every nonzero time shift. The rule is correct for radio receivers that correlate the received waveform with the transmitted one under Gaussian noise. A photon counter works differently. It sees a sparse stream of discrete events. The statistically efficient way to use those events is an unbinned extended maximum-likelihood fit, which scores every timestamp against a continuous model of signal plus background and also fits the unknown photon counts. In that fit the code enters through a logarithm, not through a correlation. This note proposes designing constant-envelope phase codes to directly optimize the accuracy of that fit.
The proposal is to derive a "Poisson ambiguity function" for a phase-coded, intensity-modulated photon-counting ranger. It measures how easily the likelihood confuses the true delay with a wrong one. We then optimize unit-modulus codes (complex numbers of magnitude one, i.e. pure phases, as produced by a saturated constant-envelope radio-frequency driver) against it on the complex circle manifold. The analysis also yields a falsifiable prediction. When background light is strong, the Poisson criterion collapses to the classical sidelobe criterion, so existing sidelobe-optimized codes should already be near-optimal there. The gain from likelihood-driven design should appear only when background is low, when the signal is strong relative to background, or when detector dead time is significant. The research is about mapping exactly where that boundary lies and how large the gain is beyond it.
Core Claim
Consider a laser whose intensity is modulated by a radio-frequency subcarrier carrying a phase code $\mathbf{x}\in\mathbb{C}^N$, $|x_n|=1$. The received photon rate is then
$$\lambda_\tau(t) = S\,a_{\mathbf{x}}(t-\tau) + B,\qquad a_{\mathbf{x}}(t)=\tfrac{1}{T}\big(1+m\,\mathrm{Re}\{x(t)e^{j\omega_c t}\}\big).$$
Here $S$ is the expected signal photon count, $B$ the background rate, $\tau$ the round-trip delay, $x(t)$ the piecewise-constant code, $\omega_c$ the subcarrier frequency, $m<1$ the modulation depth, and $T$ the code period. The drive stays constant-envelope, and the optical intensity is nonnegative by construction. Two quantities govern the accuracy of the unbinned extended fit for $(S,B,\tau)$. Local accuracy is set by the Fisher information. Gross "wrong-surface" errors are set by the Kullback–Leibler divergence between the photon processes at the true delay and at a competing delay $\tau'$:
$$D_{\mathbf{x}}(\tau,\tau')=\int_0^T \lambda_\tau(t)\ln\frac{\lambda_\tau(t)}{\lambda_{\tau'}(t)}\,dt .$$
The extended term $\int\lambda$ is shift-invariant and cancels. When $B\gg S/T$, a second-order expansion of the logarithm gives $D_{\mathbf{x}}(\tau,\tau')\approx \frac{S^2 m^2}{4BT}\big(1-\mathrm{Re}\{\rho_{\mathbf{x}}(\tau'-\tau)\}\big)$, where $\rho_{\mathbf{x}}$ is the normalized periodic autocorrelation of the code. Minimizing sidelobes is therefore exactly the high-background limit of maximizing likelihood distinguishability.
Away from that limit the logarithm reweights the problem. Mismatch in time regions where the intensity is low counts more than mismatch where it is high. The optimal code then depends on the signal-to-background ratio. The claim is that a code optimized for a worst-case (soft-minimum) of $D_{\mathbf{x}}$ over non-local delays, jointly with a local Cramér–Rao term, lowers two things relative to the best sidelobe-optimized unimodular codes at equal average power and equal code length: the outlier rate and the depth error of the unbinned extended estimator. The effect should appear in the low-background and dead-time-limited regimes and vanish at high background.
Relation to Prior Work
The sidelobe tradition supplies the method and the strongest competitor. Two papers minimize weighted integrated and peak sidelobe levels of unimodular sequences by majorization-minimization with FFT-based updates: Sequence Design to Minimize the Weighted Integrated and Peak Sidelobe Levels for single sequences, and Sequence Set Design With Good Correlation Properties Via Majorization-Minimization for sets. They reach Welch-bound sets and zero-correlation zones down to −175 dB. Their objective is quartic in $\mathbf{x}$, so it admits clean quadratic majorizers. Ours contains a logarithm of an affine function of $\mathrm{Re}\{\mathbf{x}\}$ and does not. For that reason we reuse the Riemannian route of Waveform Design for Target Information Maximization over a Complex Circle Manifold. That paper optimizes a correlation-coefficient proxy for target information plus sidelobes by conjugate gradients on the complex circle. It openly notes that true information measures need densities it does not have. Here the density is exact: it is the Poisson photon model. Related unimodular designs control peak sidelobes with augmented Lagrangian methods, in Joint Design of Radar Receive Filter and Unimodular ISAC Waveform with Sidelobe Level Control, or shape ambiguity functions, in Cognitive radar ambiguity function optimization for unimodular sequence and MAL-Net. All of them evaluate performance through deterministic correlation or ambiguity volumes under Gaussian noise. None evaluates it through an event-level likelihood.
The single-photon literature motivates the proposal and constrains its estimator. Free-running vs Synchronous: Single-Photon Lidar for High-flux 3D Imaging derives joint maximum-likelihood estimators of signal flux, background flux and depth from raw timestamps. It shows that free-running detection beats synchronous detection at high flux, overturning the "5% rule", but its illumination is a fixed pulse train that nobody designs. Resolution Limit of Single-Photon LiDAR models arrivals as an inhomogeneous Poisson process and derives a bias–variance trade-off that assumes a Gaussian pulse. Asynchronous Single-Photon 3D Imaging shows that changing the acquisition timing, rather than the estimator alone, reduces error roughly tenfold under sunlight. That is evidence that transmit and acquisition design matters in this regime, though its modulation is limited to shifting gates. The extended-likelihood practice itself comes from event-starved physics analyses, such as Extended ML Rare Decay Search and Morphological Signal Extraction. These show that fitting continuous event coordinates together with Poisson yields extracts more than counting does. In those settings the signal shape is fixed by nature. Here, unusually, the experimenter chooses the signal shape.
Research Program
The first component is analytical. We will derive the Fisher information matrix for $(S,B,\tau)$ under the extended unbinned likelihood with phase-coded intensity, and the divergence $D_{\mathbf{x}}$ above, both with and without ideal non-paralyzable dead time. With dead time, we use the conditional-intensity form of the likelihood, in which the rate is zeroed for a known duration after each detection. For an idealized detector with known dead time this form is the exact likelihood. It removes the approximation that Free-running vs Synchronous needed for arbitrary modulation, at the cost of a sequential computation over events. The code then enters through the live-time fraction as well as through the rate. That lets us ask a question the sidelobe literature cannot pose: whether some codes spread photon arrivals so that dead-time losses are less correlated with delay. We will state the high-background reduction to autocorrelation as a proposition. We will also characterize, in terms of $S/(BT)$ and $m$, where the second-order expansion stops holding.
The second component is the optimizer. The design objective is a log-sum-exp soft minimum of $D_{\mathbf{x}}(\tau,\tau')$ over delays outside a mainlobe window, minus a weighted trace of the local Cramér–Rao bound for $\tau$ with $S$ and $B$ treated as nuisance parameters. It is maximized by Riemannian conjugate gradient on the complex circle manifold, using the retraction $x_n\leftarrow (x_n+\xi_n)/|x_n+\xi_n|$. Because $\lambda$ is affine in $\mathrm{Re}\{\mathbf{x}\}$, the gradients over all delays reduce to FFT correlations of $\mathbf{x}$ with weight profiles of the form $\lambda_\tau/\lambda_{\tau'}$. The cost is $O(N\log N)$ per delay batch, which keeps lengths in the thousands tractable. We will initialize from the sidelobe-optimized code of Song et al. The optimizer can then only improve on it under our criterion, and any gain it finds is attributable to the criterion rather than to a better search. Two extensions follow. The first is a 2-bit phase-alphabet version obtained by projected rounding with local refinement, because practical phase shifters are quantized. The second is a two-emitter version in which two rangers share a scene, where cross-divergence plays the role that cross-correlation plays in Sequence Set Design.
Baselines
The do-nothing reference is the unmodulated case practiced in the single-photon literature. We use a short Gaussian pulse at the same average power, fitted with the same unbinned extended estimator as in Free-running vs Synchronous. Alongside it we test a random unimodular code, which shows what coding buys before any design. Under a peak-power cap the pulse's peak is clipped to the same peak as the coded waveform. Without the cap it is allowed full peak power. We report both, because the pulse's advantage depends entirely on that cap.
The strongest existing competitor is the family of sidelobe-optimized unimodular codes of Sequence Design to Minimize the Weighted Integrated and Peak Sidelobe Levels, in both minimum-ISL and adaptive-PSL variants. That paper reports a peak sidelobe level of 3.48 at $N=10{,}000$, against 31.84 for Frank sequences. It is the strongest competitor because our own analysis says it is the correct answer at high background. Frank and, where the length allows, Golay-derived codes serve as algebraic references. For fairness, every code has the same length, subcarrier, modulation depth, average and peak power, and dead time. Every code is scored by the same unbinned extended estimator, with the same multistart delay search and the same compute budget. Each design method gets the same wall-clock optimization budget and the same number of random restarts. Beating the competitor means a statistically significant reduction, across Monte Carlo trials, in outlier rate or in depth RMSE conditional on no outlier, at matched $(S,B)$. A secondary requirement is that the empirical variance tracks our predicted Cramér–Rao bound.
Two ablations isolate the key ingredient. The first swaps the objective while keeping the optimizer, comparing local Fisher only, global divergence only, the combination, and the Gaussian-limit (ISL) form of the same Riemannian code. This separates the gain due to the logarithm from the gain due to the search. The second swaps the estimator while keeping the code, comparing unbinned extended ML against histogram cross-correlation and binned Poisson ML. It shows whether a code tuned to the likelihood still helps when the receiver does not use the likelihood.
Why not just…?
Why not just use the best sidelobe-optimized code? This is the real threat. Our own expansion says it is optimal when background dominates, and many daylight lidars operate in that regime. We do not argue around it. The experiments sweep $S/(BT)$ over several decades and report the crossover. If likelihood-designed codes do not beat Song et al. codes anywhere in a physically reachable regime, including the dead-time-limited high-flux regime, the conclusion is that sidelobe design is already sufficient for photon counting. That conclusion is useful and publishable as a negative result with a proof of why.
Why not just fire a short pulse? With no background and no peak-power limit, a sharp pulse maximizes the delay Fisher information per photon. Coding cannot beat it there, and we will show that explicitly. Coding earns its place in two situations. One is peak-power-limited sources, such as diode lasers, continuous-wave modulated systems and eye-safety caps. The other is high flux, where concentrating photons in a narrow pulse drives dead-time losses and pile-up of the kind documented by Free-running vs Synchronous and Asynchronous Single-Photon 3D Imaging. The pulse baseline, run with and without the peak cap, settles which regime we are in.
Why not just histogram the timestamps and cross-correlate? Binning discards timing within each bin and behaves badly when photons are sparse or dead time distorts the counts. The roughly tenfold error gap between asynchronous likelihood processing and conventional synchronous processing in Asynchronous Single-Photon 3D Imaging (0.65 cm vs 6.2 cm) points the same way. That comparison mixes acquisition changes with estimator changes, however, so we do not treat it as proof. The estimator-swap ablation measures the binning penalty directly for coded illumination.
Why not learn the code end to end with a network? An unrolled or learned designer, as in MAL-Net, could optimize simulated RMSE directly. Its authors note that it lacks convergence guarantees, and it would reveal nothing about why a code works. Our objective is analytic and differentiable, so a learned designer would be approximating a function we can already evaluate exactly. We will include a small end-to-end Monte Carlo gradient run as a check. If it finds codes noticeably better than ours, our divergence-plus-Fisher surrogate is missing something, and we would treat that as a finding.
Proposed Experiments
The primary testbed is a simulation that matches the detector model: Poisson signal and background, known non-paralyzable dead time, timing jitter, code lengths from 64 to 4096, and modulation depth fixed at a realistic value. Single-pixel sweeps cover signal counts per code period, background rate, and dead time relative to chip duration. Each configuration uses enough independent trials to estimate outlier rates of about 1% with tight intervals. Two-return scenes (partial occluders) test the extended fit with two signal components. The metrics are the outlier rate beyond the mainlobe window, conditional depth RMSE, the ratio of empirical variance to the predicted bound, bias in the fitted signal count, and the coverage of likelihood-ratio confidence intervals. The last metric tests for the overconfident intervals that model misspecification is known to cause.
For scene-level evaluation, we render depth scenes from the Greyc 3D Colored Meshes Database used by Free-running vs Synchronous and run pixel-wise unbinned fits under each code. That paper reports its regularizer reducing depth error by up to 3x over pixel-wise free-running ML. We compare at the pixel-wise level to keep the comparison about the code. No reported result was found on Lacuna for phase-coded, intensity-modulated single-photon ranging with unbinned extended likelihood, so our Frank and sidelobe-optimized runs establish that reference ourselves. If a phase-modulatable SPAD setup is available, a hardware check with a handful of codes at two background levels would test whether the simulated crossover survives real afterpulsing and jitter.
The decisive check is the crossover curve. We plot the relative outlier rate of likelihood-designed codes versus sidelobe-optimized codes against $S/(BT)$ and dead time. The theory predicts a ratio near one at high background, falling below one as background drops or dead time rises. A flat curve at one refutes the claim. A curve that departs from one only where the pulse baseline already wins makes the claim practically irrelevant. The claim survives only if a region exists where the designed code beats both the sidelobe-optimized code and the peak-capped pulse.
References
- Sequence Design to Minimize the Weighted Integrated and Peak Sidelobe Levels
- Sequence Set Design With Good Correlation Properties Via Majorization-Minimization
- Waveform Design for Target Information Maximization over a Complex Circle Manifold
- Joint Design of Radar Receive Filter and Unimodular ISAC Waveform With Sidelobe Level Control
- Cognitive radar ambiguity function optimization for unimodular sequence
- MAL-Net: Model-Adaptive Learned Network for Slow-Time Ambiguity Function Shaping
- Free-running vs Synchronous: Single-Photon Lidar for High-flux 3D Imaging
- Resolution Limit of Single-Photon LiDAR
- Asynchronous Single-Photon 3D Imaging
- Update of the search for the neutrinoless decay<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mrow><mml:mover><mml:mrow><mml:mi>τ</mml:mi></mml:mrow><mml:mrow><mml:mo>→</mml:mo></mml:mrow></mml:mover></mml:mrow></mml:mrow><mml:mi>μ</mml:mi><mml:mi>γ</mml:mi></mml:math>
- Signal estimation in on/off measurements including event-by-event variables