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.

LegacyBaseOperator

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

GitHub

Operators relevant for quantum applications.

Constructor.


Attributes

basis

returns basis

name

returns name

num_qubits

abstract property

Returns number of qubits for operator

z2_symmetries

returns z2 symmetries


Methods

__mul__

abstract LegacyBaseOperator.__mul__(other)

Overload *

chop

abstract LegacyBaseOperator.chop(threshold, copy=False)

construct_evaluation_circuit

abstract LegacyBaseOperator.construct_evaluation_circuit(wave_function, statevector_mode, **kwargs)

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

evaluate_with_result

abstract LegacyBaseOperator.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 LegacyBaseOperator.evolve(state_in, evo_time, num_time_slices, expansion_mode, expansion_order, **kwargs)

Time evolution, exp^(-jt H).

is_empty

abstract LegacyBaseOperator.is_empty()

Check Operator is empty or not

abstract LegacyBaseOperator.print_details()

print details

to_opflow

abstract LegacyBaseOperator.to_opflow()

Convert to new Operator format.

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