Phase Estimation in a Michelson Interferometer
A fringe pattern is read out through bins. The phase is to be estimated while the fringe frequency is a nuisance. Which detector positions should each bin collect?
1. The interferometer
A Michelson interferometer splits a coherent beam into two arms and recombines the reflected beams on a detector. A slight tilt between the returning wavefronts makes their relative phase vary across the detector, so the intensity forms bright and dark bands, the fringes. A change in the optical path difference shifts the phase and moves the pattern sideways; measuring that shift is the purpose of the instrument.
A real detector varies in illumination, efficiency and background across its surface. A readout through a few bins needs a few calibrated quantities instead of a model of every pixel. The choice of bins then decides how much information about the phase survives.
2. The model and its score
The detector coordinate is scaled so that one fringe has length ; the detector spans 4 fringes, . A detected photon lands at with density
with visibility 0.60. The phase is the parameter of interest. The small fractional frequency error stretches the pattern across the detector, so an unknown can partly imitate a phase shift.
ScoreQuant works with the score, the gradient of the log density with respect to the parameters. At the reference point ,
The phase score is largest on the slopes of a fringe, where a small shift changes the intensity most, and has opposite signs on the rising and the falling slope.
The score enters ScoreQuant as a function of the observation:
import numpy as np
import scorequant as sq
EXECUTION = sq.ExecutionConfig(backend="numpy", precision="float64", device="cpu")
VISIBILITY = 0.60
N_FRINGES = 4
U_MAX = 2.0 * np.pi * N_FRINGES
SCHEMA = sq.ScoreSchema(("phase", "fringe_frequency"))
INTEREST = SCHEMA.select("phase")
def fringe_density(observations):
u = np.asarray(observations)[:, 0]
return (1.0 + VISIBILITY * np.cos(u)) / U_MAX
def michelson_score(observations):
u = np.asarray(observations)[:, 0]
s_phase = -VISIBILITY * np.sin(u) / (1.0 + VISIBILITY * np.cos(u))
return np.column_stack([s_phase, u * s_phase - VISIBILITY])
provider = sq.ScoreFunction(
michelson_score,
provenance=sq.ScoreProvenance(kind="exact", reference_point=(0.0, 0.0)),
schema=SCHEMA,
)
3. Why equal segments fail
The obvious readout cuts the detector into equal segments. A bin responds to the phase through the mean phase score of the positions it collects, so a segment spanning both slopes of a fringe adds contributions of opposite sign, and they largely cancel. With one segment per fringe they cancel exactly: the integral of a cosine over a full period does not depend on its phase, so the counts carry no information about at all.
The reason is simple: the information is carried by the score, not by the position. Distant positions with the same score can share a bin; neighbours on opposite slopes must not.
4. Binning in score space
The score maps each detector position to a point . The image is a curve with one loop per fringe, each longer than the last because the frequency score grows with .
A partition into cells with probability masses and mean scores retains the Fisher information
A cell enters only through its mass and its mean score, so it should collect positions with similar scores: the cells belong in score space. When both parameters matter, the standard criterion is D-optimality, , which values retained information in every direction at once.
The optimization works on a fine grid of detector nodes, each carrying the probability of its interval:
N_NODES = 8_000
step = U_MAX / N_NODES
u = (np.arange(N_NODES) + 0.5) * step
observations = u[:, None]
weights = fringe_density(observations) * step
scores = provider.score(observations, execution=EXECUTION)
5. The D-optimal partition
optimize_partition assigns the nodes to cells by exact exchange: a node changes cell whenever that increases the determinant, until no single move does.
N_BINS = 6
d_partition = sq.optimize_partition(
scores,
weights=weights,
n_bins=N_BINS,
criterion=sq.DOptimality(),
config=sq.DExchangeConfig(seed=4),
execution=EXECUTION,
)
d_quantizer = d_partition.compile_quantizer(execution=EXECUTION)
new_scores = provider.score(np.array([[1.0], [7.0], [15.0]]), execution=EXECUTION)
new_bins_d = d_quantizer.predict_scores(new_scores, execution=EXECUTION)

In an exchange-stable D-optimal partition with a nonsingular Fisher matrix, every node is strictly nearest the mean score of its own cell in the metric of the inverse binned Fisher matrix: the partition is a Mahalanobis–Voronoi partition of score space (user guide (opens in a new tab)). The 6 cells are therefore connected regions with straight boundaries. Along the detector, however, they form a comb, because the score curve passes through each cell several times.
The theorem also supplies a rule. The optimization labels only the grid nodes, but the Voronoi geometry assigns a bin to any score vector, so compile_quantizer turns the partition into a reusable readout .
6. Reporting the phase alone
Usually only is reported, and is estimated beside it because it can imitate a phase shift: the two scores are strongly correlated, 0.8720 at the reference point. The information about that survives estimating from the same data is the profiled phase information
D-optimality spends cells on resolving as carefully as ; the profiled criterion maximizes instead. A partition is judged by the fraction of the unbinned profiled information it retains. For one parameter of interest ScoreQuant also computes a certified upper bound on that fraction for any -bin partition (API guide (opens in a new tab)), and its partition is the starting point of the exchange:
bound = sq.efficient_score_bound(
scores, interest=INTEREST, weights=weights, n_bins=N_BINS, execution=EXECUTION
)
ds_partition = sq.optimize_partition(
scores,
weights=weights,
n_bins=N_BINS,
criterion=sq.ProfiledDOptimality(interest=INTEREST),
config=sq.DExchangeConfig(seed=4),
initial_labels=bound.labels,
execution=EXECUTION,
)
| Band | Start (u) | End (u) | Counter |
|---|---|---|---|
| Profiled Ds | 0.0000 | 0.1319 | 3 |
| Profiled Ds | 0.1319 | 0.5309 | 2 |
| Profiled Ds | 0.5309 | 1.1844 | 1 |
| Profiled Ds | 1.1844 | 2.7583 | 0 |
| Profiled Ds | 2.7583 | 2.9814 | 1 |
| Profiled Ds | 2.9814 | 3.1008 | 2 |
| Profiled Ds | 3.1008 | 3.2201 | 3 |
| Profiled Ds | 3.2201 | 3.4369 | 4 |
| Profiled Ds | 3.4369 | 5.0611 | 5 |
| Profiled Ds | 5.0611 | 5.8873 | 4 |
| Profiled Ds | 5.8873 | 6.4968 | 3 |
| Profiled Ds | 6.4968 | 7.1817 | 2 |
| Profiled Ds | 7.1817 | 9.1106 | 1 |
| Profiled Ds | 9.1106 | 9.3494 | 2 |
| Profiled Ds | 9.3494 | 9.5787 | 3 |
| Profiled Ds | 9.5787 | 11.7056 | 4 |
| Profiled Ds | 11.7056 | 13.1978 | 3 |
| Profiled Ds | 13.1978 | 15.2242 | 2 |
| Profiled Ds | 15.2242 | 20.0528 | 3 |
| Profiled Ds | 20.0528 | 21.7775 | 4 |
| Profiled Ds | 21.7775 | 22.0885 | 3 |
| Profiled Ds | 22.0885 | 22.4215 | 2 |
| Profiled Ds | 22.4215 | 23.9955 | 1 |
| Profiled Ds | 23.9955 | 24.8720 | 2 |
| Profiled Ds | 24.8720 | 25.1327 | 3 |
| Plain D | 0.0000 | 0.0031 | 5 |
| Plain D | 0.0031 | 0.6440 | 1 |
| Plain D | 0.6440 | 2.9437 | 0 |
| Plain D | 2.9437 | 3.1416 | 1 |
| Plain D | 3.1416 | 3.3018 | 5 |
| Plain D | 3.3018 | 5.5418 | 2 |
| Plain D | 5.5418 | 6.2863 | 5 |
| Plain D | 6.2863 | 7.4110 | 1 |
| Plain D | 7.4110 | 9.0195 | 0 |
| Plain D | 9.0195 | 9.4248 | 1 |
| Plain D | 9.4248 | 9.7484 | 5 |
| Plain D | 9.7484 | 11.1464 | 2 |
| Plain D | 11.1464 | 12.5695 | 5 |
| Plain D | 12.5695 | 13.9895 | 1 |
| Plain D | 13.9895 | 15.3844 | 4 |
| Plain D | 15.3844 | 15.7080 | 1 |
| Plain D | 15.7080 | 16.1132 | 5 |
| Plain D | 16.1132 | 17.7249 | 3 |
| Plain D | 17.7249 | 18.8527 | 5 |
| Plain D | 18.8527 | 19.5910 | 1 |
| Plain D | 19.5910 | 21.8309 | 4 |
| Plain D | 21.8309 | 21.9911 | 1 |
| Plain D | 21.9911 | 22.1891 | 5 |
| Plain D | 22.1891 | 24.4887 | 3 |
| Plain D | 24.4887 | 25.1327 | 5 |
| Equal segments | 0.0000 | 4.1877 | 0 |
| Equal segments | 4.1877 | 8.3786 | 1 |
| Equal segments | 8.3786 | 12.5664 | 2 |
| Equal segments | 12.5664 | 16.7541 | 3 |
| Equal segments | 16.7541 | 20.9450 | 4 |
| Equal segments | 20.9450 | 25.1327 | 5 |
| Method | Phase information retained, after profiling |
|---|---|
| Equal segments | 0.2054 |
| Plain D | 0.7995 |
| Profiled Ds (ScoreQuant) | 0.9483 |
| Certified ceiling (reference ceiling) | 0.9483 |
Fetches the same node table the study used and runs optimize_partition with the profiled criterion for phase, the exact exchange solver, seed 4, and the efficient-score-bound start -- exactly how the committed sweep row was produced. The value should agree to the digits shown; summation order can differ in the last places.
With 6 bins, equal segments retain 0.2054 of the profiled phase information. The D-optimal partition retains 0.7995: much better, but it was built to resolve both parameters. The profiled partition retains 0.9483, equal to the certified ceiling of 0.9483 to the digits shown, so no partition of that size can do noticeably better. At the smallest budget, one segment per fringe, equal segments lose the phase entirely. The button reruns the profiled fit in your browser.
7. A reusable rule for the phase

Profiling changes the shape of the solution. The D cells separate the loops from one another, which is what resolving requires. The profiled cells cut across the loops: they separate values of the efficient score , the part of the phase sensitivity that the nuisance cannot reproduce. Intervals of this scalar, mapped back through the oscillating detector coordinate, give the fragmented comb at the bottom.
Unlike the D case, a finite profiled partition does not in general define a Voronoi rule; even a global optimum can violate the nearest-cell geometry of its own metric, so compile_quantizer refuses it (user guide (opens in a new tab)). A reusable profiled readout is fitted directly with fit_quantizer, from the continuous detector density and the same score; SoftVoronoiConfig fits a smooth score-space rule and hardens it into bins.
source = sq.IntegrationSource(
[[0.0, U_MAX]],
density=fringe_density,
quadrature=sq.GaussLegendreConfig(order=256),
)
ds_quantizer = sq.fit_quantizer(
source,
provider=provider,
n_bins=N_BINS,
criterion=sq.ProfiledDOptimality(interest=INTEREST),
config=sq.SoftVoronoiConfig(seed=4, initializer_restarts=8, max_iter=1000),
execution=EXECUTION,
)
new_bins_ds = ds_quantizer.predict_scores(new_scores, execution=EXECUTION)
The fitted rule retains 0.8794 of the profiled phase information, against 0.9483 for the finite partition, and its detector comb is simpler. The loss against the finite partition is the price of a rule that classifies new observations.
8. What the result means
Equal detector segments lose phase information because the score changes sign within every fringe. Bins drawn in score space keep positions with similar scores together, wherever they lie on the detector. When both parameters matter, the D-optimal bins form a Voronoi diagram in score space and compile into a reusable rule. When only the phase is reported, the profiled criterion keeps as much phase information as any partition of the same size can.
The example also separates two tasks: optimize_partition labels a fixed weighted table, and fit_quantizer returns a rule for new observations. For D-optimality the first compiles into the second; for the profiled criterion the rule must be fitted, and it keeps somewhat less. Both tasks are described in the user guide (opens in a new tab).