LXEB module

Utilities for computing LXEB reference values in photonic quantum advantage schemes.

This module provides numerically stable routines for evaluating Haar-averaged linear cross-entropy benchmarking (LXEB) reference values for photonic quantum advantage experiments.

For more details, see https://arxiv.org/abs/2604.15258.

lxe_ref_boson_sampling(n: int, m: int) float

Computes the Haar-averaged LXEB reference value for Boson Sampling.

Parameters:
  • n (int) – Number of photons. Must be non-negative.

  • m (int) – Number of optical modes. Must be positive.

Returns:

The Haar-averaged LXEB reference value.

Return type:

float

Raises:
  • TypeError – If n or m is not an integer.

  • ValueError – If n is negative or m is not positive.

lxe_ref_gaussian_boson_sampling(n: int, m: int, d: int) float

Computes the Haar-averaged LXEB reference value for Gaussian boson sampling.

Parameters:
  • n (int) – Total detected photon number. Must be non-negative.

  • m (int) – Number of optical modes. Must be positive.

  • d (int) – Input rank parameter. Must satisfy 1 <= d <= m.

Returns:

The Haar-averaged LXEB reference value. Returns 0.0 when n is odd.

Return type:

float

Raises:
  • TypeError – If n, m, or d is not an integer.

  • ValueError – If n is negative, m is not positive, or d does

  • not satisfy 1 <= d <= m.