14
14
15
15
from __future__ import annotations
16
16
17
- import inspect
18
17
import typing
19
18
from collections .abc import Callable
20
19
from itertools import chain
23
22
from qiskit .circuit .parameterexpression import ParameterExpression
24
23
from qiskit .circuit .quantumcircuit import QuantumCircuit
25
24
from qiskit .quantum_info .operators import SparsePauliOp , Pauli
26
- from qiskit .utils .deprecation import deprecate_arg
27
25
28
26
from .product_formula import ProductFormula , reorder_paulis
29
27
@@ -60,31 +58,14 @@ class SuzukiTrotter(ProductFormula):
60
58
`arXiv:math-ph/0506007 <https://arxiv.org/pdf/math-ph/0506007.pdf>`_
61
59
"""
62
60
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
- )
78
61
def __init__ (
79
62
self ,
80
63
order : int = 2 ,
81
64
reps : int = 1 ,
82
65
insert_barriers : bool = False ,
83
66
cx_structure : str = "chain" ,
84
67
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
88
69
) = None ,
89
70
wrap : bool = False ,
90
71
preserve_order : bool = True ,
@@ -102,9 +83,6 @@ def __init__(
102
83
three arguments: the circuit to append the evolution to, the Pauli operator to
103
84
evolve, and the evolution time. By default, a single Pauli evolution is decomposed
104
85
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.
108
86
wrap: Whether to wrap the atomic evolutions into custom gate objects. This only takes
109
87
effect when ``atomic_evolution is None``.
110
88
preserve_order: If ``False``, allows reordering the terms of the operator to
0 commit comments