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 \(\hat{H}\) defined by its one-body \(T_{pq}\) and two-body components. It constructs a shifted Hamiltonian (\(\hat{H}^{\prime}\)), such that:

\[H^{\prime}(k_1, k_2, \vec{\xi}) = \hat{H} - k_1 (\hat{N}_e - N_e) - k_2 (\hat{N}_e^2 - \hat{N}_e^2) + \sum_{ij}\xi_{ij} T_{ij} (\hat{N}_e - N_e),\]

where \(\hat{N}_e\) is the electron number operator, \(N_e\) is the number of electrons of the molecule and \(k_u, \xi_{ij} \in \mathbb{R}\) are the parameters that are optimized with the constraint \(\xi_{ij} = \xi_{ji}\) to minimize the overall one-norm of the \(\hat{H}^{\prime}\).

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 with method=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]]]]