Changelog
Various improvements have been made in MyQLM-fermion. This includes new features, as well as many optimizations, bugfixes and
quality of life improvements. The list below can be used to update your qat.dqs
code.
Main updates
The module is now called
qat.fermion
(replacesqat.dqs
).The
qchem
submodule has been renamedchemistry
(qat.fermion.chemistry
).qat.fermion
is fully compatible with PySCF 2.0 version.The
SpinHamiltonian
andFermionHamiltonian
classes have been rewritten:FermionHamiltonian
now has ato_spin()
method to transform it into spin representation.Fermionic algebraic operations are now possible between the fermionic Hamiltonians
FermionHamiltonian
andElectronicStructureHamiltonian
.Wick ordering and subsequent simplifications are now automatic for fermionic Hamiltonians. Upon defining a
FermionHamiltonian
, its terms will be automatically normally ordered and simplified if possible.It is now possible to cast a
FermionHamiltonian
to anElectronicStructureHamiltonian
, using theto_electronic()
method.It is now possible to cast a
ElectronicStructureHamiltonian
to anFermionHamiltonian
, using theto_fermion()
method.
Note
Since the ElectronicStructureHamiltonian
inherits from
FermionHamiltonian
, any method available for
FermionHamiltonian
is available for
ElectronicStructureHamiltonian
.
Many improvements have been made to the chemistry module:
the class
MolecularHamiltonian
has been added. It allows for easier basis changes
and active space selection. It also allows an easier transformation into
ElectronicStructureHamiltonian
usingget_electronic_hamiltonian()
.the class
MoleculeInfo
has been added to help with atomic and molecular
computations. It allows for an easier restriction of the active space of the studied system using
restrict_active_space()
method, which changes dynamically the relevantMoleculeInfo
attributes.
A set of new plugins is now available:
AdaptVQEPlugin
: This plugin implements the ADAPT-VQE algorithm, to efficiently build an ansatz from a pool of operators,GradientDescentOptimizer
: Allows for natural gradient descent-based optimizations,SeqOptim
: An implementation of the quantum-classical hybrid sequential minimal optimization, method introduced by Nakanashi et. al. has been added,ZeroNoiseExtrapolator
: A plugin helping with multiqubit gate noise mitigation,MultipleLaunchesAnalyzer
: A plugin allowing multiple optimizations for various random initial parameters at once.
Miscellanous
qat.dqs.fermionic_util
functions have now been included inqat.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 inqat.fermion.hamiltonians
.qat.dqs.ansatz_circuits
has been renamedqat.fermion.circuits
.qat.dqs.qchem.ucc
has been renamedqat.fermion.chemistry.ucc
:build_ucc_ansatz
has been deprecated. It has been relocated toqat.fermion.chemistry.ucc_deprecated
, but the method
construct_ucc_ansatz()
inqat.fermion.chemistry.ucc
should be used instead. The underlying lower level methods have been clarified and can be used as well.compute_active_space_integrals
has been split into _compute_active_space_constant and compute_active_space_integrals.build_cluster_ops
is now a private method.select_active_orbitals
default threshold values have been updated.init_uccsd
is now a private method, and returns only the trial Mollet-Plesset 2nd order guess initial parameter.The
get_initial_params_and_cluster_ops
function has been split into 3 separate functions for better clarity and maintenability:guess_init_params
to get the initial parameter guess computed via 2nd order Mollet-Plesset perturbation theory,get_hf_ket
to get the Hartree-Fock state,get_cluster_ops
to get the cluster operator list.
select_excitation_operators
andget_cluster_ops
have been updated. The deprecated versions are located inqat.fermion.chemistry.ucc_deprecated
.get_active_space_hamiltonian
has been deprecated. It can still be found inqat.fermion.chemistry.ucc_deprecated
.