seemps.hamiltonians.ConstantNNHamiltonian.add_interaction_term#
method
- ConstantNNHamiltonian.add_interaction_term(i, op1, op2=None)[source]#
Add an interaction term to this Hamiltonian, acting in ‘site’ and ‘site+1’. If ‘op2’ is None, then ‘op1’ is interpreted as an operator acting on both sites in matrix form. If ‘op1’ and ‘op2’ are both provided, the operator is np.kron(op1, op2).
- Parameters:
- site
int
First site of two (site and site+1) on which this interaction term acts.
- op1
Operator
- op2
Operator
,optional
(Default value = None) If op2 is not supplied, then op1 is the complete Hamiltonian \(h_{i,i+1}\). Otherwise, the Hamiltonian is the Kronecker product of op1 and op2
- site
- Returns:
ConstantNNHamiltonian
This same object.