freealg.FreeForm.trace#

FreeForm.trace(size=None, p=1.0, seed=None, **kwargs)#

Estimate the trace of a power \(\mathbf{A}^p\).

This function estimates the trace of the matrix power of the freeform or that of a larger matrix containing it.

Parameters:
sizeint, default=None

The size of the matrix containing \(\mathbf{A}\) to estimate eigenvalues of. If None, returns estimates of the eigenvalues of \(\mathbf{A}\) itself.

pfloat, default=1.0

The exponent \(p\) in \(\mathbf{A}^p\).

seedint, default=None

The seed for the Quasi-Monte Carlo sampler.

Returns:
tracefloat

matrix trace

See also

eigh
cond
slogdet
norm

Notes

The trace is highly amenable to subsampling: under free decompression the average eigenvalue is assumed constant, so the trace increases linearly. Traces of powers fall back to eigvalsh(). All arguments to the .decompress() procedure can be provided.

Examples

>>> ...