72 lines
2.0 KiB
Plaintext
72 lines
2.0 KiB
Plaintext
---
|
||
title: BaseEstimator
|
||
description: API reference for qiskit.primitives.BaseEstimator
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: class
|
||
python_api_name: qiskit.primitives.BaseEstimator
|
||
---
|
||
|
||
# BaseEstimator
|
||
|
||
<Class id="qiskit.primitives.BaseEstimator" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.20/qiskit/primitives/base_estimator.py" signature="BaseEstimator(circuits, observables, parameters=None)" modifiers="class">
|
||
Bases: `abc.ABC`
|
||
|
||
Estimator base class.
|
||
|
||
Base class for Estimator that estimates expectation values of quantum circuits and observables.
|
||
|
||
Creating an instance of an Estimator, or using one in a `with` context opens a session that holds resources until the instance is `close()` ed or the context is exited.
|
||
|
||
**Parameters**
|
||
|
||
* **circuits** – quantum circuits that represent quantum states
|
||
* **observables** – observables
|
||
* **parameters** – parameters of quantum circuits, specifying the order in which values
|
||
* **be bound.** (*will*) – Defaults to `[circ.parameters for circ in circuits]` The indexing is such that `parameters[i, j]` is the j-th formal parameter of `circuits[i]`.
|
||
|
||
**Raises**
|
||
|
||
**QiskitError** – for mismatch of circuits and parameters list.
|
||
|
||
## Methods
|
||
|
||
### close
|
||
|
||
<Function id="qiskit.primitives.BaseEstimator.close" signature="BaseEstimator.close()" modifiers="abstract">
|
||
Close the session and free resources
|
||
</Function>
|
||
|
||
## Attributes
|
||
|
||
### circuits
|
||
|
||
<Attribute id="qiskit.primitives.BaseEstimator.circuits">
|
||
Quantum circuits that represents quantum states.
|
||
|
||
**Returns**
|
||
|
||
quantum circuits
|
||
</Attribute>
|
||
|
||
### observables
|
||
|
||
<Attribute id="qiskit.primitives.BaseEstimator.observables">
|
||
Observables to be estimated
|
||
|
||
**Returns**
|
||
|
||
observables
|
||
</Attribute>
|
||
|
||
### parameters
|
||
|
||
<Attribute id="qiskit.primitives.BaseEstimator.parameters">
|
||
Parameters of quantum circuits
|
||
|
||
**Returns**
|
||
|
||
parameters, where `parameters[i][j]` is the j-th parameter of the i-th circuit.
|
||
</Attribute>
|
||
</Class>
|
||
|