diff --git a/pyqtorch/hamiltonians/evolution.py b/pyqtorch/hamiltonians/evolution.py index ead01cce..5fe1a70a 100644 --- a/pyqtorch/hamiltonians/evolution.py +++ b/pyqtorch/hamiltonians/evolution.py @@ -13,7 +13,8 @@ from pyqtorch.apply import apply_operator from pyqtorch.circuit import Sequence from pyqtorch.embed import Embedding -from pyqtorch.primitives import Parametric, Primitive +from pyqtorch.primitives import Primitive +from pyqtorch.quantum_operation import QuantumOperation from pyqtorch.utils import ( ATOL, Operator, @@ -25,7 +26,7 @@ ) BATCH_DIM = 2 -TGenerator = Union[Tensor, str, Primitive, Parametric, Sequence] +TGenerator = Union[Tensor, str, QuantumOperation, Sequence] logger = getLogger(__name__) @@ -170,7 +171,7 @@ def __init__( self.generator_type = GeneratorType.SYMBOL self.generator_symbol = generator generator = [] - elif isinstance(generator, (Primitive, Parametric, Sequence)): + elif isinstance(generator, (QuantumOperation, Sequence)): if qubit_support is not None: logger.warning( "Taking support from generator and ignoring qubit_support input."