Skip to content

Commit

Permalink
replace by quantumoperatiom
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles MOUSSA committed Aug 12, 2024
1 parent 3464bc6 commit 7a0cec5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyqtorch/hamiltonians/evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -25,7 +26,7 @@
)

BATCH_DIM = 2
TGenerator = Union[Tensor, str, Primitive, Parametric, Sequence]
TGenerator = Union[Tensor, str, QuantumOperation, Sequence]

logger = getLogger(__name__)

Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 7a0cec5

Please sign in to comment.