Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit.aqua.operators.legacy.LegacyBaseOperator

class LegacyBaseOperator(basis=None, z2_symmetries=None, name=None)

GitHub

Operators relevant for quantum applications.

Constructor.

__init__

abstract __init__(basis=None, z2_symmetries=None, name=None)

Constructor.


Methods

__init__([basis, z2_symmetries, name])Constructor.
chop(threshold[, copy])
construct_evaluation_circuit(wave_function, …)Build circuits to compute the expectation w.r.t the wavefunction.
evaluate_with_result(result, …)Consume the result from the quantum computer to build the expectation, will be only used along with the construct_evaluation_circuit() method.
evolve(state_in, evo_time, num_time_slices, …)Time evolution, exp^(-jt H).
is_empty()Check Operator is empty or not
print_details()print details
to_opflow()Convert to new Operator format.

Attributes

basisreturns basis
namereturns name
num_qubitsReturns number of qubits for operator
z2_symmetriesreturns z2 symmetries

basis

returns basis

chop

abstract chop(threshold, copy=False)

construct_evaluation_circuit

abstract construct_evaluation_circuit(wave_function, statevector_mode, **kwargs)

Build circuits to compute the expectation w.r.t the wavefunction.

evaluate_with_result

abstract evaluate_with_result(result, statevector_mode, **kwargs)

Consume the result from the quantum computer to build the expectation, will be only used along with the construct_evaluation_circuit() method.

evolve

abstract evolve(state_in, evo_time, num_time_slices, expansion_mode, expansion_order, **kwargs)

Time evolution, exp^(-jt H).

is_empty

abstract is_empty()

Check Operator is empty or not

name

returns name

num_qubits

abstract property num_qubits

Returns number of qubits for operator

abstract print_details()

print details

to_opflow

abstract to_opflow()

Convert to new Operator format.

z2_symmetries

returns z2 symmetries

Was this page helpful?
Report a bug or request content on GitHub.