def el_vib_interaction_hamiltonian(self):
     return self.mode_coupling * np.kron(
         np.array([[0, 0, 0], [0, 1.0, 0], [0, 0, 0]]),
         (utils.raising_operator(self.vib_basis_size) + utils.lowering_operator(self.vib_basis_size)),
     ) - self.mode_coupling * np.kron(
         np.array([[0, 0, 0], [0, 0, 0], [0, 0, 1.0]]),
         (utils.raising_operator(self.vib_basis_size) + utils.lowering_operator(self.vib_basis_size)),
     )
 def vib_damping_operators(self):
     return [
         (np.kron(np.eye(3), utils.raising_operator(self.vib_basis_size)), self.N * self.vib_damping_rate),
         (np.kron(np.eye(3), utils.lowering_operator(self.vib_basis_size)), (self.N + 1) * self.vib_damping_rate),
     ]
bias_values = np.linspace(-15, 15, 100)
mean = np.zeros((len(beta_values), bias_values.size))
F2 = np.zeros((len(beta_values), bias_values.size))

jump_rates = np.array([Gamma_L, Gamma_R])

def electronic_hamiltonian(bias):
    return np.array([[0, 0, 0],
                 [0, bias/2., T_c],
                 [0, T_c, -bias/2.]])
I_el = np.eye(3)

mode_basis_size = 4
H_mode = utils.vibrational_hamiltonian(mode_freq, mode_basis_size)
I_mode = np.eye(mode_basis_size)
up_mode = utils.raising_operator(mode_basis_size)
down_mode = utils.lowering_operator(mode_basis_size)

def N(omega, beta):
    return 1. / (np.exp(beta*omega) - 1.)

''' B is beta, the inverse temperature'''
def mode_damping_rates(B):
    return np.array([damping*N(mode_freq, B), 
                                   damping*(N(mode_freq, B)+1.)])
    
mode_damping_operators = np.array([np.kron(I_el, up_mode), 
                                   np.kron(I_el, down_mode)])

#H = np.kron(H_el, I_mode) + np.kron(I_el, H_mode) + mode_coupling*np.kron(np.array([[0,0,0],[0,1.,0],[0,0,1.]]), up_mode + down_mode)
lead_operators = np.array([np.kron(np.array([[0, 0, 0],