qml.qchem.symmetry_shift¶
- symmetry_shift(core, one_electron, two_electron, n_elec, method='L-BFGS-B', **method_kwargs)[source]¶
Performs a block-invariant symmetry shift on the electronic integrals.
The block-invariant symmetry shift (BLISS) method [arXiv:2304.13772] decreases the one-norm and the spectral range of a molecular Hamiltonian ˆH defined by its one-body Tpq and two-body components. It constructs a shifted Hamiltonian (ˆH′), such that:
H′(k1,k2,→ξ)=ˆH−k1(ˆNe−Ne)−k2(ˆN2e−ˆN2e)+∑ijξijTij(ˆNe−Ne),where ˆNe is the electron number operator, Ne is the number of electrons of the molecule and ku,ξij∈R are the parameters that are optimized with the constraint ξij=ξji to minimize the overall one-norm of the ˆH′.
- Parameters
core (array[float]) – the contribution of the core orbitals and nuclei
one_electron (array[float]) – a one-electron integral tensor
two_electron (array[float]) – a two-electron integral tensor in the chemist notation
n_elec (bool) – number of electrons in the molecule
method (str | callable) – solver method used by
scipy.optimize.minimize
to optimize the parameters. Please refer to its documentation for the list of all available solvers. Default solver is"L-BFGS-B"
.**method_kwargs – keyword arguments to pass when calling
scipy.optimize.minimize
withmethod=method
- Returns
symmetry shifted core, one-body tensor and two-body tensor for the provided terms
- Return type
tuple(array[float], array[float], array[float])
Example
>>> symbols = ['H', 'H'] >>> geometry = qml.numpy.array([[0.0, 0.0, 0.0], ... [1.398397361, 0.0, 0.0]], requires_grad=False) >>> mol = qml.qchem.Molecule(symbols, geometry, basis_name="STO-3G") >>> core, one, two = qml.qchem.electron_integrals(mol)() >>> ctwo = np.swapaxes(two, 1, 3) >>> s_core, s_one, s_two = symmetry_shift(core, one, ctwo, n_elec=mol.n_electrons) >>> print(s_two) [[[[ 1.12461110e-02 -1.70030746e-09] [-1.70030746e-09 -1.12461660e-02]] [[-1.70030746e-09 1.81210462e-01] [ 1.81210462e-01 -1.70032620e-09]]] [[[-1.70030763e-09 1.81210462e-01] [ 1.81210462e-01 -1.70032598e-09]] [[-1.12461660e-02 -1.70032620e-09] [-1.70032620e-09 1.12461854e-02]]]]