Module: openfermion.linalg.sparse_tools

This module provides functions to interface with scipy.sparse.

Functions

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

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

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

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.

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.

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

reduce(...): reduce(function, sequence[, initial]) -> value

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

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

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

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

identity_csc

pauli_matrix_map

pauli_x_csc

pauli_y_csc

pauli_z_csc

q_lower_csc

q_raise_csc