TransitionPathway¶
- class mrsimulator.transition.TransitionPathway(pathway: list = [], weight=1 + 0j)¶
Bases:
TransitionList
Base TransitionPathway class is a list of connected Transitions.
Example
>>> from mrsimulator.transition import TransitionPathway, Transition >>> t1 = Transition(initial = [0.5, 0.5], final = [0.5, -0.5]) >>> t2 = Transition(initial=[0.5, 0.5], final=[-0.5, 0.5]) >>> path = TransitionPathway([t1, t2]) >>> path |0.5, -0.5⟩⟨0.5, 0.5| ⟶ |-0.5, 0.5⟩⟨0.5, 0.5|, weight=(1+0j)
- append(item)¶
Append a list item
- clear() None -- remove all items from S ¶
- count(value) integer -- return number of occurrences of value ¶
- extend(values)¶
S.extend(iterable) – extend sequence by appending elements from the iterable
- filter(P=None, PP=None, D=None)¶
Filter a list of transitions to satisfy the filtering criterion.
- Parameters:
P (list) – A list of N (m_final - m_initial) values, where N is the total number of sites within the spin system.
D (list) – A list of N (m_final^2 - m_initial^2) values, where N is the total number of sites within the spin system.
- index(value[, start[, stop]]) integer -- return first index of value. ¶
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.
- insert(index, item)¶
Insert a list item
- json(**kwargs) dict ¶
Parse the class object to a JSON compliant Python dictionary object.
Example
>>> pprint(path.json()) {'pathway': [{'final': [0.5, -0.5], 'initial': [0.5, 0.5]}, {'final': [-0.5, 0.5], 'initial': [0.5, 0.5]}], 'weight': (1+0j)}
- pop([index]) item -- remove and return item at index (default last). ¶
Raise IndexError if list is empty or index is out of range.
- remove(value)¶
S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.
- reverse()¶
S.reverse() – reverse IN PLACE
- tolist()¶
Expand TransitionPathway to a Python list.
Example
>>> path.tolist() [0.5, 0.5, 0.5, -0.5, 0.5, 0.5, -0.5, 0.5]
SymmetryPathway¶
- class mrsimulator.transition.SymmetryPathway(*, channels: list = [], ch1: list = None, ch2: list = None, ch3: list = None)¶
Bases:
BaseModel
Base SymmetryPathway class.
- channels¶
The list of channels
- Type:
list
- ch1¶
The symmetry pathway for the channel at index 0.
- Type:
list
- ch2¶
The symmetry pathway for the channel at index 1.
- Type:
list
- ch3¶
The symmetry pathway for the channel at index 2.
- Type:
list
- total¶
The total symmetry pathway.