Module: openfermion.testing.testing_utils

Functions useful for tests.

Classes

class EqualsTester: Tests equality against user-provided disjoint equivalence groups.

Functions

haar_random_vector(...): Generate an n dimensional Haar randomd vector.

module_importable(...): Without importing it, returns whether python module is importable.

random_antisymmetric_matrix(...): Generate a random n x n antisymmetric matrix.

random_diagonal_coulomb_hamiltonian(...): Generate a random instance of DiagonalCoulombHamiltonian.

random_hermitian_matrix(...): Generate a random n x n Hermitian matrix.

random_interaction_operator(...): Generate a random instance of InteractionOperator.

random_quadratic_hamiltonian(...): Generate a random instance of QuadraticHamiltonian.

random_qubit_operator(...)

random_unitary_matrix(...): Obtain a random n x n unitary matrix.