ElectronicDipoleMoment#

class ElectronicDipoleMoment(x_dipole, y_dipole, z_dipole, *, constants=None, reverse_dipole_sign=False)[fuente]#

Bases: object

The ElectronicDipoleMoment property.

This Property implements the operator which evaluates the electronic dipole moment, based on the electronic integrals:

\[\vec{d}_{pq} = \int \phi_{p} \vec{r} \phi_{q} ,\]

where the integral is over the all space. The operator can then be expressed as:

\[\hat{d} = \sum_{p, q} d^x_{pq} a^\dagger_p a_q ,\]

where \(x\) can be any of the three Cartesian axes (\(\{x, y, z\}\)).

Just like in the qiskit_nature.second_q.hamiltonians.ElectronicEnergy, the nuclear contribution is stored separately in the nuclear_dipole_moment attribute and will not be included into the generated operator. It is however possible, to manually add this constant shift to the electronic dipole components as a constant term in the internal qiskit_nature.second_q.operators.ElectronicIntegrals instances. Assuming you have obtained an ElectronicDipoleMoment instance (for example from one of the classical code drivers), you can add the nuclear component to be included in the qubit operator like so:

from qiskit_nature.second_q.operators import PolynomialTensor

# you have obtained your dipole moment property and store it in this variable
dipole: ElectronicDipoleMoment
nuclear_dip = dipole.nuclear_dipole_moment
dipole.x_dipole.alpha += PolynomialTensor({"": nuclear_dip[0]})
dipole.y_dipole.alpha += PolynomialTensor({"": nuclear_dip[1]})
dipole.z_dipole.alpha += PolynomialTensor({"": nuclear_dip[2]})

The following attributes can be set via the initializer but can also be read and updated once the ElectronicDipoleMoment object has been constructed.

x_dipole#

the ElectronicIntegrals for the \(x\)-axis component.

Type:

ElectronicIntegrals

y_dipole#

the ElectronicIntegrals for the \(y\)-axis component.

Type:

ElectronicIntegrals

z_dipole#

the ElectronicIntegrals for the \(z\)-axis component.

Type:

ElectronicIntegrals

constants#

a mapping of constant dipole offsets, not mapped to the qubit operator. Each entry must be a tuple of length three (for the three Cartesian axes).

Type:

MutableMapping[str, DipoleTuple]

reverse_dipole_sign#

whether or not to reverse the sign of the computed electronic dipole moment when adding it to the nuclear_dipole_moment to obtain the total.

Parámetros:

Attributes

nuclear_dipole_moment#

The nuclear dipole moment.

See qiskit_nature.second_q.hamiltonians.ElectronicEnergy.nuclear_repulsion_energy for an example on how to add the constant terms as offsets to the internal qiskit_nature.second_q.operators.ElectronicIntegrals.

Methods

interpret(result)[fuente]#

Interprets an qiskit_nature.second_q.problems.EigenstateResult.

In particular, this extracts the evaluated electronic dipole moment values from the auxiliary operator eigenvalues and this adds the constant dipole shifts stored in this property to the result object.

Parámetros:

result (EigenstateResult) – the result to add meaning to.

second_q_ops()[fuente]#

Returns the second quantized dipole moment operators.

Devuelve:

A mapping of strings to FermionicOp objects.

Tipo del valor devuelto:

Mapping[str, FermionicOp]