diff --git a/pytket/extensions/cutensornet/structured_state/general.py b/pytket/extensions/cutensornet/structured_state/general.py index dc677e10..25d65876 100644 --- a/pytket/extensions/cutensornet/structured_state/general.py +++ b/pytket/extensions/cutensornet/structured_state/general.py @@ -15,7 +15,7 @@ from abc import ABC, abstractmethod import warnings import logging -from typing import Any, Optional, Union +from typing import Any, Optional, Type import numpy as np # type: ignore @@ -78,7 +78,7 @@ def __init__( self, chi: Optional[int] = None, truncation_fidelity: Optional[float] = None, - float_precision: Union[np.float32, np.float64] = np.float64, # type: ignore + float_precision: Type[Any] = np.float64, value_of_zero: float = 1e-16, leaf_size: int = 8, k: int = 4, diff --git a/pytket/extensions/cutensornet/structured_state/simulation.py b/pytket/extensions/cutensornet/structured_state/simulation.py index a760146b..228b1721 100644 --- a/pytket/extensions/cutensornet/structured_state/simulation.py +++ b/pytket/extensions/cutensornet/structured_state/simulation.py @@ -52,7 +52,7 @@ def simulate( algorithm: SimulationAlgorithm, config: Config, ) -> StructuredState: - """Simulates the circuit and returns the ``StructuredState`` representing the final state. + """Simulates the circuit and returns the ``StructuredState`` of the final state. Note: A ``libhandle`` should be created via a ``with CuTensorNet() as libhandle:`` @@ -70,7 +70,7 @@ def simulate( config: The configuration object for simulation. Returns: - An instance of ``StructuredState`` containing (an approximation of) the final state + An instance of ``StructuredState`` for (an approximation of) the final state of the circuit. The instance be of the class matching ``algorithm``. """ logger = set_logger("Simulation", level=config.loglevel)