bqskit.utils.math

This module implements numerical functions.

Functions

canonical_unitary(unitary)

Computes a canonical form for the provided unitary.

compute_su_generators(n)

Computes the Lie algebra generators for SU(n).

dexpmv(M, dM)

Compute the Matrix exponential F = e^M and its derivative dF.

dot_product(alpha, sigma)

Computes the standard dot product of alpha with sigma.

pauli_expansion(H)

Computes a Pauli expansion of the hermitian matrix H.

softmax(x[, beta])

Computes the softmax of vector x.

unitary_log_no_i(U)

Solves for H in U = e^{iH}