Migrating code based on deprecated library qat.dqs

Module qat.fermion replaces qat.dqs module. This new module provides a set of improvement and optimization, nevertheless, existing code based on qat.dqs must be updated. This section explains how to adapt an existing code based on qat.dqs to use qat.fermion

  • The module is now called qat.fermion (replaces qat.dqs)

  • The qchem submodule has been renamed chemistry (qat.fermion.chemistry)

  • qat.dqs.fermionic_util functions have now been included in qat.fermion.util:

    • the function exact_eigen_energies has been deleted. Use any eigenvalue solver on the Hamiltonian matrix directly. You can generate the matrix using get_matrix() method

    • the function fermionic_hamiltonian_exponential has been deleted. Compute the exponential of the matrix obtained via get_matrix() directly

  • qat.dqs.impurity models have been relocated in qat.fermion.hamiltonians

  • qat.dqs.ansatz_circuits has been renamed qat.fermion.circuits

  • qat.dqs.qchem.ucc has been renamed qat.fermion.chemistry.ucc:

    • build_ucc_ansatz has been deprecated. It has been relocated to qat.fermion.chemistry.ucc_deprecated, but the method construct_ucc_ansatz() in qat.fermion.chemistry.ucc should be used instead. The underlying lower level methods have been clarified and can be used as well

    • The get_initial_params_and_cluster_ops function has been split into 3 separate functions for better clarity and maintenability:

  • select_excitation_operators and get_cluster_ops have been updated. The deprecated versions are located in qat.fermion.chemistry.ucc_deprecated

  • get_active_space_hamiltonian has been deprecated. It can still be found in qat.fermion.chemistry.ucc_deprecated