Skip to content

OpenFermion methods still call deprecated method orbital_energies() #1064

Closed
@mhucka

Description

@mhucka

Describe the issue

The method orbital_energies() on the option QuadraticHamiltonian in src/openfermion/ops/representations/quadratic_hamiltonians.py is deprecated (and produces warnings when called), but a few files still contain calls to it. These should be replaced with calls to diagonalizing_bogoliubov_transform().

What version of this software are you using?

1.7.1.dev0

How can the issue be reproduced?

Run check/pytest. It will produce a number of warnings like this:

src/openfermion/ops/representations/quadratic_hamiltonian_test.py::DiagonalizingCircuitTest.test_particle_conserving:317
-> src/openfermion/ops/representations/quadratic_hamiltonian.py:444 DeprecationWarning('The method `orbital_energies` is deprecated. Use the method `diagonalizing_bogoliubov_transform` instead.')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions