QuanGuru (pronounced Kangaroo) is a Python library for numerical modelling of quantum systems. It is still under-development, and it consists of tools for numerical simulations of Quantum systems.
BSD 3-Clause "New" or "Revised" License
5
stars
7
forks
source link
need to fix the setting of seedNum parameter to be able to set in the operator #238
self.dimension = 2
self.operator = Jz
self._named__setKwargs(**kwargs) # pylint: disable=no-member
class RandSys(QuantumSystem):
r"""
Hamiltonian system with elements randomly drawn from normal (Gaussian) distribution.
"""
#: (**class attribute**) class label used in default naming
label = 'RandSys'
#: (**class attribute**) number of instances created internally by the library
_internalInstances: int = 0
#: (**class attribute**) number of instances created explicitly by the user
_externalInstances: int = 0
#: (**class attribute**) number of total instances = _internalInstances + _externalInstances
_instances: int = 0
# TODO need to fix the setting of seedNum parameter to be able to set in the operator
__slots__ = ['__seedNum']
def __init__(self, **kwargs):
super().__init__(_internal=kwargs.pop('_internal', False), _inpCoef=kwargs.pop("_inpCoef", False))
self._QuantumSystem__compSys = False #pylint:disable=assigning-non-slot
self.operator = randomH
self.__seedNum = None
self._named__setKwargs(**kwargs) # pylint: disable=no-member
@property
def seedNum(self):
r"""
Gets and sets the seed number
"""
return self.__seedNum
@seedNum.setter
def seedNum(self, value):
self._RandSys__seedNum = value # pylint: disable=assigning-non-slot
slots = ['__seedNum']
def init(self, **kwargs):
super().init(_internal=kwargs.pop('_internal', False), _inpCoef=kwargs.pop("_inpCoef", False))
self._QuantumSystem__compSys = False #pylint:disable=assigning-non-slot
self.operator = randomH
self.__seedNum = None
self._named__setKwargs(**kwargs) # pylint: disable=no-member
@property
def seedNum(self):
r
https://github.com/CirQuS-UTS/QuanGuru/blob/15689f2f2bad4c95c6f9a4fd099d15a203e086db/src/quanguru/classes/QSystem.py#L851