qiskit-documentation/docs/api/qiskit/0.31/qiskit.opflow.evolutions.Ma...

39 lines
1.4 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: MatrixEvolution (v0.31)
description: API reference for qiskit.opflow.evolutions.MatrixEvolution in qiskit v0.31
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.opflow.evolutions.MatrixEvolution
---
# MatrixEvolution
<Class id="qiskit.opflow.evolutions.MatrixEvolution" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/opflow/evolutions/matrix_evolution.py" signature="MatrixEvolution" modifiers="class">
Bases: `qiskit.opflow.evolutions.evolution_base.EvolutionBase`
Performs Evolution by classical matrix exponentiation, constructing a circuit with `UnitaryGates` or `HamiltonianGates` containing the exponentiation of the Operator.
## Methods Defined Here
<span id="qiskit-opflow-evolutions-matrixevolution-convert" />
### convert
<Function id="qiskit.opflow.evolutions.MatrixEvolution.convert" signature="MatrixEvolution.convert(operator)">
Traverse the operator, replacing `EvolvedOps` with `CircuitOps` containing `UnitaryGates` or `HamiltonianGates` (if self.coeff is a `ParameterExpression`) equalling the exponentiation of -i \* operator. This is done by converting the `EvolvedOp.primitive` to a `MatrixOp` and simply calling `.exp_i()` on that.
**Parameters**
**operator** (`OperatorBase`) The Operator to convert.
**Return type**
`OperatorBase`
**Returns**
The converted operator.
</Function>
</Class>