qdk_chemistry.plugins.qiskit.energy_estimator module
QDK/Chemistry energy estimator module.
This module defines a custom EnergyEstimator class for evaluating expectation values of quantum circuits with respect to Hamiltonian. The estimator leverages Qiskit [JATK+24] backends to execute quantum circuits and collect bitstring outcomes.
- Key Features:
Accepts a quantum circuit (as a Circuit) and observables (as a list of QubitHamiltonian).
Generates measurement circuits for each observable term.
Executes measurement circuits on a simulator backend with a specified number of shots.
Collects bitstring counts and computes expectation values and variances.
Supports noise simulations and classical error analysis.
- class qdk_chemistry.plugins.qiskit.energy_estimator.QiskitEnergyEstimator(seed=42, backend_options=None, backend=None)[source]
Bases:
EnergyEstimatorCustom Estimator to estimate expectation values of quantum circuits with respect to a given observable.
- Parameters:
seed (int)
backend (qiskit.providers.backend.BackendV2 | None)
- __init__(seed=42, backend_options=None, backend=None)[source]
Initialize the Estimator with a backend and optional transpilation settings.
- Parameters:
seed (int) – Seed for the simulator to ensure reproducibility. Default is 42. This argument takes priority over the seed specified in the Backend configuration/options.
backend_options (dict[str, Any] | None) – Backend-specific configuration dictionary for Qiskit AerSimulator. Frequently used options include
{"seed_simulator": int, "noise_model": NoiseModel, ...}. The backend option “seed_simulator” is overwritten by seed. The backend option “noise_model” is overwritten when a noise model is provided as argument in therunfunction. This keyword argument is not compatible with qdk_chemistry.algorithms.create.backend (BackendV2 | None) – Backend simulator to run circuits. Defaults to Qiskit AerSimulator.
backendandbackend_optionsare mutually exclusive; provide only one. This keyword argument is not compatible with qdk_chemistry.algorithms.create.
References: Qiskit Aer Simulator.