hiperwalk.ContinuousTime.set_hamiltonian#
- ContinuousTime.set_hamiltonian(gamma=0.1, type='adjacency', marked=[])[source]#
Set the Hamiltonian.
The Hamiltonian takes the form of
-gamma*CwheresCis either the adjacency matrix or the Laplacian matrix. If marked vertices are specified, the Hamiltonian is modified as described in the Notes section. Once the Hamiltonian has been established, the evolution operator is updated accordingly.- Parameters:
- gammafloat, default=0.1
The value of gamma.
- type: {‘adjacency’, ‘laplacian’}
Two types of Hamiltonian are used:
'A'is shorthand for'adjacency'(default).'L'is shorthand for'laplacian'.- markedlist of vertices, default=[]
List of vertices to be marked. If empty list, no vertex is marked.
- Raises:
- TypeError
If
gammaisNoneor complex.- ValueError
If
gamma < 0.
Notes
The Hamiltonian is given by [1] [2]
\[H = -\gamma C - \sum_{m \in M} \ket m \bra m,\]where \(C\) is either the adjacency matrix or the Laplacian matrix. The set \(M\) specifies the marked vertices via the argument
marked=M. For instance,marked={0}specifies that \(v_0\) is the marked vertex. The default is \(M=\emptyset\).References