Skip to content

Tests raise warnings #431

@kevinsung

Description

@kevinsung

On my setup:

src/openfermion/ops/_qubit_operator_test.py::test_get_operator_groups_zero
  /home/kjs/Projects/OpenFermion/src/openfermion/ops/_qubit_operator.py:223: RuntimeWarning: Invalid num_groups 0 < 1.
    RuntimeWarning)

src/openfermion/utils/_davidson_test.py::QubitDavidsonTest::test_get_lowest_y_complex
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:142: RuntimeWarning: Initial guess is not real only!
    warnings.warn('Initial guess is not real only!', RuntimeWarning)
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:213: RuntimeWarning: Unable to get real only eigenvectors, return complex vectors instead with success state True.
    .format(success), RuntimeWarning)

src/openfermion/utils/_davidson_test.py::QubitDavidsonTest::test_get_lowest_y_real
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:142: RuntimeWarning: Initial guess is not real only!
    warnings.warn('Initial guess is not real only!', RuntimeWarning)
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:213: RuntimeWarning: Unable to get real only eigenvectors, return complex vectors instead with success state True.
    .format(success), RuntimeWarning)

src/openfermion/utils/_davidson_test.py::QubitDavidsonTest::test_get_lowest_y_real_fail
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:142: RuntimeWarning: Initial guess is not real only!
    warnings.warn('Initial guess is not real only!', RuntimeWarning)
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:213: RuntimeWarning: Unable to get real only eigenvectors, return complex vectors instead with success state False.
    .format(success), RuntimeWarning)

src/openfermion/utils/_davidson_test.py::QubitDavidsonTest::test_get_lowest_z_real
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:142: RuntimeWarning: Initial guess is not real only!
    warnings.warn('Initial guess is not real only!', RuntimeWarning)

src/openfermion/utils/_davidson_test.py::DavidsonUtilityTest::test_append_vectors_big_col
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_davidson.py:413: RuntimeWarning: Unable to generate specified number of random vectors 1: returning 10 in total.
    col, vector_columns), RuntimeWarning)

src/openfermion/utils/_low_rank_test.py::LowRankTest::test_spatial_operator_consistency
  /home/kjs/Projects/OpenFermion/src/openfermion/utils/_low_rank.py:257: ComplexWarning: Casting complex values to real discards the imaginary part
    chemist_two_body_coefficients[p, q, r, s])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions