Skip to content

Replace deprecated MP2 natural-orbital API in stretched N2 example #594

Description

@sobolevnrm

Description

examples/qpe_stretched_n2.ipynb calls the deprecated qdk_mp2_natural_orbitals orbital localizer. QDK/Chemistry 2.0.0 directs new workflows to use qdk_natural_orbitals with a wavefunction that already contains the active-space 1-RDM. This requires a workflow migration rather than a mechanical factory-name replacement.

The notebook is a user-facing end-to-end example, so it should not teach an API that emits a deprecation warning.

Occurrence audit

  • examples/qpe_stretched_n2.ipynb invokes the deprecated factory and should be migrated.
  • docs/source/_static/examples/python/localizer.py displays the deprecated factory in the generated availability list; review whether the example should identify deprecated implementations explicitly.
  • docs/source/user/comprehensive/algorithms/localizer.rst documents the deprecated implementation and replacement guidance; this compatibility documentation should remain while the implementation is supported.
  • Implementation, binding, and test references are expected compatibility coverage and should not be removed as part of the example migration.

Acceptance criteria

  • Replace the deprecated call in examples/qpe_stretched_n2.ipynb with a supported workflow that preserves the scientific intent of the example.
  • Ensure the wavefunction passed to qdk_natural_orbitals contains the required active-space 1-RDM.
  • Execute the migrated notebook and review or update numerical results and explanatory text affected by the workflow change.
  • Audit other user-facing examples for deprecated MP2 natural-orbital usage or unqualified display references.
  • Retain compatibility implementation, deprecation documentation, bindings, and tests while the deprecated API remains supported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationtriageAn issue yet to be triaged with respect to its priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions