Module: openfermion.linalg

Modules

davidson module: This module is to find lowest eigenvalues with Davidson algorithm.

erpa module: Code to generate the eigenvalue problem for the ERPA equations

givens_rotations module: Givens rotations routines.

linear_qubit_operator module: LinearQubitOperator is a linear operator from QubitOperator.

sparse_tools module: This module provides functions to interface with scipy.sparse.

wave_fitting module: Functions for fitting simple oscillating functions

wedge_product module: This module contains methods to lift tensors to higher spaces

Classes

class Davidson: Davidson algorithm to get the n states with smallest eigenvalues.

class DavidsonError: Exceptions.

class DavidsonOptions: Davidson algorithm iteration options.

class LinearQubitOperator: A LinearOperator implied from a QubitOperator.

class LinearQubitOperatorOptions: Options for LinearQubitOperator.

class ParallelLinearQubitOperator: A LinearOperator from a QubitOperator with multiple processors.

class QubitDavidson: Davidson algorithm applied to a QubitOperator.

class SparseDavidson: Davidson algorithm for a sparse matrix.

Functions

append_random_vectors(...): Appends exactly col orthonormal random vectors for vectors.

boson_ladder_sparse(...): Make a matrix representation of a singular bosonic ladder operator

boson_operator_sparse(...): Initialize a Scipy sparse matrix in the Fock space

double_givens_rotate(...): Apply a double Givens rotation.

eigenspectrum(...): Compute the eigenspectrum of an operator.

erpa_eom_hamiltonian(...): Evaluate sum{a,b,c,d}h{a, b, d, c}

expectation(...): Compute the expectation value of an operator with a state.

expectation_computational_basis_state(...): Compute expectation value of operator with a state.

expectation_db_operator_with_pw_basis_state(...): Compute expectation value of a dual basis operator with a plane

expectation_one_body_db_operator_computational_basis_state(...): Compute expectation value of a 1-body dual-basis operator with a

expectation_three_body_db_operator_computational_basis_state(...): Compute expectation value of a 3-body dual-basis operator with a

expectation_two_body_db_operator_computational_basis_state(...): Compute expectation value of a 2-body dual-basis operator with a

fermionic_gaussian_decomposition(...): Decompose a matrix into a sequence of Givens rotations and

fit_known_frequencies(...): Fits a set of known exponential components to a dataset

generate_linear_qubit_operator(...): Generates a LinearOperator from a QubitOperator.

generate_parity_permutations(...): Generates the permutations and sign of a sequence by constructing a tree

generate_random_vectors(...): Generates orthonormal random vectors with col columns.

get_density_matrix(...)

get_gap(...): Compute gap between lowest eigenvalue and first excited state.

get_ground_state(...): Compute lowest eigenvalue and eigenstate.

get_linear_qubit_operator_diagonal(...): Return a linear operator's diagonal elements.

get_number_preserving_sparse_operator(...): Initialize a Scipy sparse matrix in a specific symmetry sector.

get_sparse_operator(...): Map an operator to a sparse matrix.

givens_decomposition(...): Decompose a matrix into a sequence of Givens rotations.

givens_decomposition_square(...): Decompose a square matrix into a sequence of Givens rotations.

givens_matrix_elements(...): Compute the matrix elements of the Givens rotation that zeroes out one

givens_rotate(...): Apply a Givens rotation to coordinates i and j of an operator.

inner_product(...): Compute inner product of two states.

jordan_wigner_ladder_sparse(...): Make a matrix representation of a fermion ladder operator.

jordan_wigner_sparse(...): Initialize a Scipy sparse matrix from a FermionOperator.

jw_configuration_state(...): Function to produce a basis state in the occupation number basis.

jw_get_ground_state_at_particle_number(...): Compute ground energy and state at a specified particle number.

jw_hartree_fock_state(...): Function to produce Hartree-Fock state in JW representation.

jw_number_indices(...): Return the indices for n_electrons in n_qubits under JW encoding

jw_number_restrict_operator(...): Restrict a Jordan-Wigner encoded operator to a given particle number

jw_number_restrict_state(...): Restrict a Jordan-Wigner encoded state to a given particle number

jw_sparse_givens_rotation(...): Return the matrix (acting on a full wavefunction) that performs a

jw_sparse_particle_hole_transformation_last_mode(...): Return the matrix (acting on a full wavefunction) that performs a

jw_sz_indices(...): Return the indices of basis vectors with fixed Sz under JW encoding.

jw_sz_restrict_operator(...): Restrict a Jordan-Wigner encoded operator to a given Sz value

jw_sz_restrict_state(...): Restrict a Jordan-Wigner encoded state to a given Sz value

kronecker_operators(...): Return the Kronecker product of multiple sparse.csc_matrix operators.

orthonormalize(...): Orthonormalize vectors, so that they're all normalized and orthogoal.

prony(...): Estimates amplitudes and phases of a sparse signal using Prony's method.

qubit_operator_sparse(...): Initialize a Scipy sparse matrix from a QubitOperator.

single_quad_op_sparse(...): Make a matrix representation of a singular quadrature

singlet_erpa(...): Generate the singlet ERPA equations

sparse_eigenspectrum(...): Perform a dense diagonalization.

swap_columns(...): Swap columns i and j of matrix M.

swap_rows(...): Swap rows i and j of matrix M.

variance(...): Compute variance of operator with a state.

wedge(...): Implement the wedge product between left_tensor and right_tensor

wrapped_kronecker(...): Return the Kronecker product of two sparse.csc_matrix operators.