Skip to content

Commit

Permalink
Fix approximation=True usage in opflow migration guide (Qiskit#10966)
Browse files Browse the repository at this point in the history
  • Loading branch information
rht authored and rupeshknn committed Oct 9, 2023
1 parent 10f3b84 commit 6ada10f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/migration_guides/opflow_migration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ Algorithm-Agnostic Expectations
- No direct replacement. This class was used to create instances of one of the classes listed below.

* - :class:`~qiskit.opflow.expectations.AerPauliExpectation`
- Use :class:`qiskit_aer.primitives.Estimator` with ``approximation=True`` and ``shots=None`` as ``run_options``.
- Use :class:`qiskit_aer.primitives.Estimator` with ``approximation=True``, and then ``shots=None`` as ``run_options``.
See example below.

* - :class:`~qiskit.opflow.expectations.MatrixExpectation`
Expand Down Expand Up @@ -1262,7 +1262,7 @@ Algorithm-Agnostic Expectations
from qiskit import QuantumCircuit
from qiskit_aer.primitives import Estimator

estimator = Estimator(run_options={"approximation": True, "shots": None})
estimator = Estimator(approximation=True, run_options={"shots": None})

op = SparsePauliOp.from_list([("X", 1j)])
states_op = QuantumCircuit(1)
Expand Down

0 comments on commit 6ada10f

Please sign in to comment.