EstimateEnergy operation

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Chemistry.JordanWigner.VQE

Package: Microsoft.Quantum.Chemistry

Estimates the energy of the molecule by summing the energy contributed by the individual Jordan-Wigner terms.

operation EstimateEnergy (jwHamiltonian : Microsoft.Quantum.Chemistry.JordanWigner.JordanWignerEncodingData, nSamples : Int) : Double

Description

This operation implicitly relies on the spin up-down indexing convention.

Input

jwHamiltonian : JordanWignerEncodingData

The Jordan-Wigner Hamiltonian.

nSamples : Int

The number of samples to use for the estimation of the term expectations.

Output : Double

The estimated energy of the molecule