Chisle
The coding-agent plugin that bills 52% of a bare model across 20 live tasks. Terse persona + tool-output compressor + context diet.
翻訳待ち
No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Fourier-extension coefficients for LCU block encodings of matrix functions.
felcu computes coefficients for representing matrix functions via Linear
Combination of Unitaries (LCU), using the Fourier extensions of
P. Brearley, T. L. Howarth and B. Adcock, Fourier extensions for matrix-function block encodings with error-independent subnormalization bounds, arXiv:2601.18024.
It supports five problems:
| Problem | Function |
|---|---|
identity (or action) | $f(\mathcal H) = \mathcal H$ |
inversion | $f(\mathcal H) = \mathcal H^{-1}$ |
exponentiation | $f(\mathcal H) = e^{\mathcal H}$ |
square_root | $f(\mathcal H) = \sqrt{\mathcal H}$ ($\mathcal H$ positive definite) |
logarithm | $f(\mathcal H) = \log \mathcal H$ ($\mathcal H$ positive definite) |
A matrix or spectral bounds are required. Every fit is centred on the spectrum,
$$ f(\mathcal H) = g\bigl(\tau(\mathcal H - \mu I)\bigr), \qquad g(x) \approx g_m(x) = \sum_{k=-m}^{m} c_k e^{ikx}, $$
so the block encoding is a linear combination of Hamiltonian simulations $e^{ik\tau\mathcal H}$. Identity and inversion also work on singular values, for non-Hermitian matrices, through the Hermitian dilation ($\mu = 0$, odd series). Inversion handles definite and indefinite spectra.
The coefficients come from one of the paper's three strategies, chosen with
method=:
| Method | Convergence | Subnormalisation $\alpha_m = \sum_k \lvert c_k\rvert$ |
|---|---|---|
sobolev (default) | near-exponential, down to the target | $O(\lVert f(\mathcal H)\rVert)$ |
reflected | algebraic, $O(m^{-1})$ | $\lVert f(\mathcal H)\rVert$ (optimal) for convex $f$ |
arcsine_taylor | exponential, $O(\sin^m(\pi/\eta))$ | bounded, larger than optimal |
pip install .
Or, for development (editable install plus test dependencies):
pip install -e ".[dev]"
from felcu import solve_fe_coefficients, evaluate_fourier_series, fitted_domain_segments
import numpy as np
# Fit exp(H) for a Hermitian matrix with eigenvalues in [0.1, 2.0]
result = solve_fe_coefficients(
"exponentiation",
sigma_min=0.1,
sigma_max=2.0,
target_error=1e-10,
)
print(f"Converged: {result.converged}")
print(f"Truncation order m = {result.m}")
print(f"Achieved L∞ error: {result.achieved_linf_error:.2e}")
# Evaluate the fitted series
for xs in fitted_domain_segments(result):
y_fit = evaluate_fourier_series(xs, result.a0, result.ak, result.bk)
Full documentation is at https://qaaat.github.io/felcu/:
examples/To build it locally:
pip install -e ".[docs]"
mkdocs serve
If you use felcu in your work, please cite the paper:
P. Brearley, T. L. Howarth and B. Adcock, Fourier extensions for matrix-function block encodings with error-independent subnormalization bounds, arXiv:2601.18024 (2026).
GitHub's "Cite this repository" button gives the same reference in BibTeX and
APA formats, from CITATION.cff.
felcu is released under the MIT License.