ffsim.linalgΒΆ

Linear algebra utilities

GivensRotation(c, s, i, j)

A Givens rotation.

apply_matrix_to_slices(target, mat, slices, *)

Apply a matrix to slices of a target tensor.

double_factorized(two_body_tensor, *[, tol, ...])

Double-factorized decomposition of a two-body tensor.

double_factorized_t2(t2_amplitudes, *[, ...])

Double-factorized decomposition of \(t_2\) amplitudes.

double_factorized_t2_alpha_beta(t2_amplitudes, *)

Double-factorized decomposition of alpha-beta \(t_2\) amplitudes.

expm_multiply_taylor(mat, vec[, tol])

Compute expm(mat) @ vec using a Taylor series expansion.

givens_decomposition(mat)

Givens rotation decomposition of a unitary matrix.

is_antihermitian(mat, *[, rtol, atol])

Determine if a matrix is approximately anti-Hermitian.

is_hermitian(mat, *[, rtol, atol])

Determine if a matrix is approximately Hermitian.

is_orthogonal(mat, *[, rtol, atol])

Determine if a matrix is approximately orthogonal.

is_real_symmetric(mat, *[, rtol, atol])

Determine if a matrix is real and approximately symmetric.

is_special_orthogonal(mat, *[, rtol, atol])

Determine if a matrix is approximately special orthogonal.

is_unitary(mat, *[, rtol, atol])

Determine if a matrix is approximately unitary.

lup(mat)

Column-pivoted LU decomposition of a matrix.

match_global_phase(a, b)

Phase the given arrays so that their phases match at one entry.

modified_cholesky(mat, *[, tol, max_vecs])

Modified Cholesky decomposition.

one_hot(shape, index, *[, dtype])

Return an array of all zeros except for a one at a specified index.

reduced_matrix(mat, vecs)

Compute reduced matrix within a subspace spanned by some vectors.