1414
1515from __future__ import annotations
1616
17- import inspect
1817import typing
1918from collections .abc import Callable
2019from itertools import chain
2322from qiskit .circuit .parameterexpression import ParameterExpression
2423from qiskit .circuit .quantumcircuit import QuantumCircuit
2524from qiskit .quantum_info .operators import SparsePauliOp , Pauli
26- from qiskit .utils .deprecation import deprecate_arg
2725
2826from .product_formula import ProductFormula , reorder_paulis
2927
@@ -60,31 +58,14 @@ class SuzukiTrotter(ProductFormula):
6058 `arXiv:math-ph/0506007 <https://arxiv.org/pdf/math-ph/0506007.pdf>`_
6159 """
6260
63- @deprecate_arg (
64- name = "atomic_evolution" ,
65- since = "1.2" ,
66- predicate = lambda callable : callable is not None
67- and len (inspect .signature (callable ).parameters ) == 2 ,
68- deprecation_description = (
69- "The 'Callable[[Pauli | SparsePauliOp, float], QuantumCircuit]' signature of the "
70- "'atomic_evolution' argument"
71- ),
72- additional_msg = (
73- "Instead you should update your 'atomic_evolution' function to be of the following "
74- "type: 'Callable[[QuantumCircuit, Pauli | SparsePauliOp, float], None]'."
75- ),
76- pending = True ,
77- )
7861 def __init__ (
7962 self ,
8063 order : int = 2 ,
8164 reps : int = 1 ,
8265 insert_barriers : bool = False ,
8366 cx_structure : str = "chain" ,
8467 atomic_evolution : (
85- Callable [[Pauli | SparsePauliOp , float ], QuantumCircuit ]
86- | Callable [[QuantumCircuit , Pauli | SparsePauliOp , float ], None ]
87- | None
68+ Callable [[QuantumCircuit , Pauli | SparsePauliOp , float ], None ] | None
8869 ) = None ,
8970 wrap : bool = False ,
9071 preserve_order : bool = True ,
@@ -102,9 +83,6 @@ def __init__(
10283 three arguments: the circuit to append the evolution to, the Pauli operator to
10384 evolve, and the evolution time. By default, a single Pauli evolution is decomposed
10485 into a chain of ``CX`` gates and a single ``RZ`` gate.
105- Alternatively, the function can also take Pauli operator and evolution time as
106- inputs and returns the circuit that will be appended to the overall circuit being
107- built.
10886 wrap: Whether to wrap the atomic evolutions into custom gate objects. This only takes
10987 effect when ``atomic_evolution is None``.
11088 preserve_order: If ``False``, allows reordering the terms of the operator to
0 commit comments