felcu¶
Fourier-extension coefficients for LCU block encodings of matrix functions.
felcu computes the coefficients needed to block encode a matrix function
\(f(\mathcal H)\) as a Linear Combination of Unitaries (LCU). It rescales
the spectrum to \(\mathcal G = \tau(\mathcal H - \mu I)\) and approximates
the fitted function \(g(x) = f(\mu + x/\tau)\) on the fitted set by a
Fourier extension
so that \(f(\mathcal H) \approx g_m(\mathcal G) = \sum_k c_k e^{ik\mathcal G}\),
a linear combination of Hamiltonian simulations. Three strategies for
choosing the coefficients are available through method=, each trading
convergence against the subnormalisation \(\alpha_m = \sum_k \lvert c_k\rvert\):
"sobolev"(the default): a Sobolev-regularised fit, which converges near-exponentially down to the target tolerance while keeping \(\alpha_m\) at the optimal scale \(O(\|f(\mathcal H)\|)\);"reflected": reflected extensions, with optimal \(\alpha\) but algebraic convergence;"arcsine_taylor": arcsine-Taylor expansions, with exponential convergence at a larger \(\alpha\).
See Method for how they compare.
The methods are those of P. Brearley, T. L. Howarth and B. Adcock, Fourier extensions for matrix-function block encodings with error-independent subnormalization bounds, arXiv:2601.18024; these docs follow its notation.
Five problems are supported:
| Problem | Function | Spectral data |
|---|---|---|
identity (or action) |
\(f(\mathcal H) = \mathcal H\) | eigenvalues (Hermitian) or singular values |
inversion |
\(f(\mathcal H) = \mathcal H^{-1}\) | eigenvalues (definite or indefinite) or singular values |
exponentiation |
\(f(\mathcal H) = e^{\mathcal H}\) | eigenvalues |
square_root |
\(f(\mathcal H) = \sqrt{\mathcal H}\) | positive-definite eigenvalue interval |
logarithm |
\(f(\mathcal H) = \log\mathcal H\) | positive-definite eigenvalue interval |
A matrix or spectral bounds are required. Every fit is centred on the spectrum, \(f(\mathcal H) = g(\tau(\mathcal H - \mu I))\). Singular values, for non-Hermitian matrices, are fitted through the Hermitian dilation, whose spectrum is centred at \(\mu = 0\), by an odd series. See Problems and constructions.
At a glance¶
from felcu import solve_fe_coefficients
result = solve_fe_coefficients(
"exponentiation",
sigma_min=0.1,
sigma_max=2.0,
target_error=1e-10,
)
result.m # truncation order
result.a0, result.ak, result.bk
result.complex_coefficients # [c_{-m}, ..., c_m]
result.circuit_coefficients # [c_0, 0, c_1, c_-1, ..., c_m, c_-m] for the compressed circuit
result.alpha # subnormalisation alpha_m
Where next¶
- Getting started: install, a first fit, and how to apply the result to a matrix.
- Notation: the paper's symbols and their names in the code.
- Problems and constructions: spectra, scaling, bases and the two-interval fit of inversion.
- Method: what the solver actually computes.
- Tuning the solver: every parameter and when to change it.
- Examples: short scripts, one idea each, plus plots.
- API reference.
Citation¶
If you use felcu in your work, please cite the paper:
@misc{brearley2026fourier,
title = {Fourier extensions for matrix-function block encodings
with error-independent subnormalization bounds},
author = {Brearley, Peter and Howarth, Thomas L. and Adcock, Ben},
year = {2026},
eprint = {2601.18024},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2601.18024},
}
The repository's
CITATION.cff
holds the same reference, and GitHub's "Cite this repository" button
exports it in other formats.
License¶
felcu is released under the
MIT License.