qiskit-documentation/docs/api/qiskit/0.31/qiskit.aqua.operators.legac...

101 lines
3.6 KiB
Plaintext

---
title: LegacyBaseOperator (v0.31)
description: API reference for qiskit.aqua.operators.legacy.LegacyBaseOperator in qiskit v0.31
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.aqua.operators.legacy.LegacyBaseOperator
---
# LegacyBaseOperator
<Class id="qiskit.aqua.operators.legacy.LegacyBaseOperator" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/operators/legacy/base_operator.py" signature="LegacyBaseOperator(basis=None, z2_symmetries=None, name=None)" modifiers="class">
Bases: `abc.ABC`
Operators relevant for quantum applications.
Constructor.
## Methods
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-chop" />
### chop
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.chop" signature="LegacyBaseOperator.chop(threshold, copy=False)" modifiers="abstract" />
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-construct-evaluation-circuit" />
### construct\_evaluation\_circuit
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.construct_evaluation_circuit" signature="LegacyBaseOperator.construct_evaluation_circuit(wave_function, statevector_mode, **kwargs)" modifiers="abstract">
Build circuits to compute the expectation w\.r.t the wavefunction.
</Function>
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-evaluate-with-result" />
### evaluate\_with\_result
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.evaluate_with_result" signature="LegacyBaseOperator.evaluate_with_result(result, statevector_mode, **kwargs)" modifiers="abstract">
Consume the result from the quantum computer to build the expectation, will be only used along with the [`construct_evaluation_circuit()`](qiskit.aqua.operators.legacy.LegacyBaseOperator#construct_evaluation_circuit "qiskit.aqua.operators.legacy.LegacyBaseOperator.construct_evaluation_circuit") method.
</Function>
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-evolve" />
### evolve
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.evolve" signature="LegacyBaseOperator.evolve(state_in, evo_time, num_time_slices, expansion_mode, expansion_order, **kwargs)" modifiers="abstract">
Time evolution, exp^(-jt H).
</Function>
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-is-empty" />
### is\_empty
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.is_empty" signature="LegacyBaseOperator.is_empty()" modifiers="abstract">
Check Operator is empty or not
</Function>
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-print-details" />
### print\_details
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.print_details" signature="LegacyBaseOperator.print_details()" modifiers="abstract">
print details
</Function>
<span id="qiskit-aqua-operators-legacy-legacybaseoperator-to-opflow" />
### to\_opflow
<Function id="qiskit.aqua.operators.legacy.LegacyBaseOperator.to_opflow" signature="LegacyBaseOperator.to_opflow()" modifiers="abstract">
Convert to new Operator format.
</Function>
## Attributes
### basis
<Attribute id="qiskit.aqua.operators.legacy.LegacyBaseOperator.basis">
returns basis
</Attribute>
### name
<Attribute id="qiskit.aqua.operators.legacy.LegacyBaseOperator.name">
returns name
</Attribute>
### num\_qubits
<Attribute id="qiskit.aqua.operators.legacy.LegacyBaseOperator.num_qubits">
Returns number of qubits for operator
</Attribute>
### z2\_symmetries
<Attribute id="qiskit.aqua.operators.legacy.LegacyBaseOperator.z2_symmetries">
returns z2 symmetries
</Attribute>
</Class>