paddle_quantum.qchem.properties

Calculate the properties of the molecule.

paddle_quantum.qchem.properties.energy(psi, mol, shots=0, use_shadow=False, **shadow_kwargs)

Calculate the energy of a molecule w.r.t a quantum state \(\psi\) .

Parameters:
  • psi (State) – a quantum state.

  • mol (Molecule) – the molecule instance.

  • shots (int) – number of shots used to estimate the expectation value, default is 0 and will calculate the ideal expectation value.

  • use_shadow (bool) – whether use classical shadow to estimate the energy, default is False and will evalute the energy by matrix multiplication.

  • shadow_kwargs

Returns:

The energy of the molecule.

Return type:

float

paddle_quantum.qchem.properties.dipole_moment(psi, mol, shots=0, use_shadow=False, **shadow_kwargs)

Calculate the dipole moment of a molecule w.r.t a given quantum state.

Parameters:
  • psi (State) – a quantum state.

  • mol (Molecule) – the molecule instance.

  • shots (int) – number of shots used to estimate the expectation value. default is 0, and will calculate the ideal expectation value.

  • use_shadow (bool) – whether use classical shadow to estimate the energy, default is False and will evalute the energy by matrix multiplication.

  • **shadow_kwargs – The other args.

Returns:

The dipole moment of the input molecule.

Return type:

ndarray