Simulation classes (quanguru.classes.QSimComp
)#
Contains the parent class of quantum systems and protocols. Every system and protocol has a simulation, and this class creates this composition.
|
Inhereted by the |
Function Name |
Docstrings |
Unit Tests |
Tutorials |
---|---|---|---|
QSimComp |
✅ |
✅ |
✅ |
- class QSimComp(**kwargs)[source]#
Bases:
quanguru.classes.baseClasses.computeBase
Inhereted by the
quantum systems
andprotocols
and has a simulation attribute which is an instance ofSimulation
. The goal for such an attribute is to increase possible ways of running aSimulation
.NOTE : This class branches the inheritance started by
paramBoundBase
, and this branch extends toquantum systems
andprotocols
.- label: str = 'QSimComp'#
(class attribute) class label used in default naming
- _internalInstances: int = 0#
(class attribute) number of instances created internally by the library
- _externalInstances: int = 0#
(class attribute) number of instances created explicitly by the user
- _instances: int = 0#
(class attribute) number of total instances = _internalInstances + _externalInstances
- __simulation#
- __getattribute__(_QSimComp__name: str)[source]#
Custom
__getattribute__
method to get the parameters of the internal simulation object through self
- __setattr__(_QSimComp__name: str, _QSimComp__value) None [source]#
Custom
__setattr__
method to set the parameters of the internal simulation object through self
- property simulation#
returns _QSimComp__simulation
attribute (an instance ofSimulation
).
- runSimulation(p=None, coreCount=None)[source]#
an alternative to run the simulation, equivalent to
self.simulation.run()
- property _initialStateInput#
- property simParameters#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property simTotalTime#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property simStepSize#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property simStepCount#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property simSamples#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property simCompute#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property simDelStates#
returns a tuple contaning simulation parameters for the self.simulation, which might be bound to some other simulation object and getting values from there.
There are various setters of this property with different names to set the relevant attribute of the simulation. # TODO should we include calculate methods into the tuple ? and have a setter for calculates as well ?
- property initialState#
Getter for the simulation initial state, equivalent to
self.simulation.initialState
. This works by assuming that its setter/s makes sure that _stateBase__initialState.value is not None for single systems (if its state is set).