def dqd_hamiltonian(bias, T_c):
    return np.array([[0,0,0],[0,bias/2.,T_c],[0,T_c,-bias/2.]])

#solver = FCSSolver.from_hilbert_space(dqd_hamiltonian(bias, T_c), lindblad_ops, lindblad_rates, jump_idx, reduce_dim=True)

current = np.zeros((T_c_values.size, bias_values.size))
F2 = np.zeros((T_c_values.size, bias_values.size))
coherence = np.zeros((T_c_values.size, bias_values.size), dtype='complex128')

site_steady_states = np.zeros((T_c_values.size, bias_values.size, 3, 3))
site_exciton_transform = np.zeros((T_c_values.size, bias_values.size, 3, 3))
exciton_steady_states = np.zeros((T_c_values.size, bias_values.size, 3, 3))

for j,T_c in enumerate(T_c_values):
    for i,E in enumerate(bias_values):
        solver = FCSSolver.from_hilbert_space(dqd_hamiltonian(E, T_c), lindblad_ops, [Gamma_L, Gamma_R], jump_idx, reduce_dim=False)
        #solver.H = dqd_hamiltonian(bias, T_c)
        current[j,i] = solver.mean()
        F2[j,i] = solver.second_order_fano_factor(0)
        ss = solver.ss
        ss.shape = 3,3
        coherence[j,i] = solver.ss[1,2]
        
        site_steady_states[j,i] = solver.ss
        transform = np.linalg.eig(solver.H)[1] # utils.sorted_eig(solver.H)[1] #
        
        rearranged_basis_transform = np.zeros(transform.shape)
        
        for basis_vec in transform.T:
            if np.count_nonzero(basis_vec) == 1:
                rearranged_basis_transform[:,2] = basis_vec
def calculate_F2(model):
    solver = FCSSolver(model.heom_matrix(), model.jump_matrix(), model.dv_pops)
    return solver.second_order_fano_factor(0)
font = {'size':18}
matplotlib.rc('font', **font)

bias_values = np.linspace(-10, 10, 1000)
T_c_values = np.array([0.5, 1., 2.])
lindblad_ops = [np.array([[0,0,0],[1,0,0],[0,0,0]]), np.array([[0,0,1],[0,0,0],[0,0,0]])]
Gamma_L = 1.
Gamma_R = 0.025
lindblad_rates = [Gamma_L, Gamma_R]
jump_idx = np.array([0,1])

#T_c = 1.
def dqd_hamiltonian(bias, T_c):
    return np.array([[0,0,0],[0,bias/2.,T_c],[0,T_c,-bias/2.]])

solver = FCSSolver.from_hilbert_space(dqd_hamiltonian(0, 1.), lindblad_ops, lindblad_rates, jump_idx, reduce_dim=True)

current = np.zeros((T_c_values.size, bias_values.size))
F2 = np.zeros((T_c_values.size, bias_values.size))
coherence = np.zeros((T_c_values.size, bias_values.size), dtype='complex128')

for j,T_c in enumerate(T_c_values):
    for i,v in enumerate(bias_values):
        solver.H = dqd_hamiltonian(v, T_c)
        current[j,i] = solver.mean()
        F2[j,i] = solver.second_order_fano_factor(0)
        coherence[j,i] = solver.ss[2]

# plt.subplot(121)
# plt.plot(bias_values, current, linewidth=3)
# plt.xlabel(r'energy bias $\epsilon$')
Пример #4
0
def setup_dqd_solver_from_hilbert_space(Gamma_L, Gamma_R, Tc, bias):
    return FCSSolver.from_hilbert_space(np.array([[0,0,0],[0,bias/2.,Tc],[0,Tc,-bias/2.]]), \
                     [np.array([[0,0,1.],[0,0,0],[0,0,0]]), np.array([[0,0,0],[1.,0,0],[0,0,0]])], \
                     [Gamma_R, Gamma_L], np.array([1,0]), reduce_dim=True)
cutoff_freq = 1.

def drude_spectral_density(reorg_energy):
    
    def J(omega):
        return 2.*omega*reorg_energy*cutoff_freq / (omega**2 + cutoff_freq**2)
    
    return J

diss_model = DissipativeDQDModel(Gamma_L, Gamma_R, bias, T_c, drude_spectral_density(1.e-9), beta)
heom_model = DQDHEOMModel(bias, T_c, Gamma_L, Gamma_R, 1.e-9, cutoff_freq, beta)

diss_F2 = np.zeros(reorg_energy_values.size)
heom_F2 = np.zeros(reorg_energy_values.size)

for i,Er in enumerate(reorg_energy_values):
    diss_model.spectral_density = drude_spectral_density(reorg_energy_values[i])
    heom_model.drude_reorg_energy = reorg_energy_values[i]
    diss_solver = FCSSolver(diss_model.liouvillian(), diss_model.jump_matrix(), np.array([1.,1.,1.,0,0]))
    heom_solver = FCSSolver(heom_model.heom_matrix(), heom_model.jump_matrix(), heom_model.dv_pops)
    diss_F2[i] = diss_solver.second_order_fano_factor(0)
    heom_F2[i] = heom_solver.second_order_fano_factor(0)
    
np.savez('../../data/DQD_counting_stats_F2_coupling_strength.npz', reorg_energy_values=reorg_energy_values, diss_F2=diss_F2, heom_F2=heom_F2)

import matplotlib.pyplot as plt
plt.plot(reorg_energy_values, diss_F2, label='diss')
plt.plot(reorg_energy_values, heom_F2, label='heom')
plt.legend().draggable()
plt.show()
    
Gamma_L = 1.
Gamma_R = 0.025
bias = 2.
T_c = 1. 
beta = 0.4
cutoff = 50.

def drude_spectral_density(reorg_energy, cutoff):
    def J(delta):
        return (2. * reorg_energy * cutoff * delta) / (delta**2 + cutoff**2)
    return J

model_pert = DissipativeDQDModel(Gamma_L, Gamma_R, bias, T_c, drude_spectral_density(0,cutoff), beta)

reorg_energy_values = np.logspace(-3, 15, 320)
F2_pert = np.zeros(reorg_energy_values.size)
coh_pert = np.zeros(reorg_energy_values.size)
mean_pert = np.zeros(reorg_energy_values.size)

for i,E in enumerate(reorg_energy_values):
    model_pert.spectral_density = drude_spectral_density(E, cutoff)
    solver_pert = FCSSolver(model_pert.liouvillian(), model_pert.jump_matrix(), np.array([1,1,1,0,0]))
    mean_pert[i] = solver_pert.mean()
    F2_pert[i] = solver_pert.second_order_fano_factor(0)
    coh_pert[i] = np.abs(solver_pert.ss[3] + solver_pert.ss[4])
    
np.savez('../data/F2_reorg_energy_perturbative_data_large_reorg_energy.npz', reorg_energy_values=reorg_energy_values, F2=F2_pert, \
                    mean=mean_pert, coh=coh_pert)
    
Пример #7
0
def setup_srl_solver_from_hilbert_space(Gamma_L, Gamma_R):
    return FCSSolver.from_hilbert_space(np.array([[0,0],[0,0]]), [np.array([[0,1],[0,0]]), np.array([[0,0],[1,0]])], \
                                [Gamma_R, Gamma_L], np.array([1,0]), reduce_dim=True)
mode_freq = 10. #1. # meV
hr_factor = 0.5
damping = 0.5 #0.05 # meV
cutoff = 5. # meV

def underdamped_brownian_oscillator(freq, hr_factor, damping):
    reorg_energy = freq * hr_factor
    def J(delta):
        return 2. * reorg_energy * freq**2 * ((delta * damping) / ((delta**2 - freq**2)**2 + delta**2 * damping**2))
    return J

bias_values = np.linspace(-15., 15., 500)
F2_values = np.zeros((len(beta)+1, bias_values.size))

model = DissipativeDQDModel(Gamma_L, Gamma_R, 0, T_c, underdamped_brownian_oscillator(mode_freq, hr_factor, damping), 1.)
solver = FCSSolver(model.liouvillian(), model.jump_matrix(), np.array([1,1,1,0,0]))

for j,B in enumerate(beta):
    model.beta = B
    print B
    for i,E in enumerate(bias_values):
        model.bias = E
        solver.L = model.liouvillian()
        F2_values[j+1,i] = solver.second_order_fano_factor(0)
    
model.spectral_density = underdamped_brownian_oscillator(0, hr_factor, damping)
for i,E in enumerate(bias_values):
    model.bias = E
    solver.L = model.liouvillian()
    F2_values[0,i] = solver.second_order_fano_factor(0)
    
import matplotlib.pyplot as plt
import matplotlib
from counting_statistics.fcs_solver import FCSSolver

font = {'size':20}
matplotlib.rc('font', **font)

#model = DQDModel(remove_elements=True)

def dqd_hamiltonian(bias, T):
    return np.array([[0,0,0],[0,bias/2,T],[0,T,-bias/2]])

dqd_lindblad_ops = [np.array([[0,0,0],[1,0,0],[0,0,0]]), np.array([[0,0,1],[0,0,0],[0,0,0]])]
dqd_lindblad_rates = [1., 1.]

solver = FCSSolver(dqd_hamiltonian(0, 3.), dqd_lindblad_ops, dqd_lindblad_rates, np.array([0,1]), reduce_dim=True)
freq_range = np.linspace(0, 10., 100)
bias_values = np.array([0]) #, 1.5, 3., 4.5, 6.])

F2 = np.zeros((bias_values.size, freq_range.size))

plt.axhline(1., ls='--', color='grey')

for i,v in enumerate(bias_values):
    #model.bias = v
    solver.H = dqd_hamiltonian(v, 3.)
    print solver.liouvillian()
    #ss = utils.stationary_state_svd(model.liouvillian(), model.density_vector_populations())
    #F2[i] = model.second_order_fano_factor(ss, freq_range=freq_range)
    F2[i] = solver.second_order_fano_factor(freq_range)
    plt.plot(freq_range, F2[i], label=r'$\epsilon$ = ' + str(v), linewidth=3)
Пример #10
0
def setup_dqd_solver_from_hilbert_space(Gamma_L, Gamma_R, Tc, bias):
    return FCSSolver.from_hilbert_space(np.array([[0,0,0],[0,bias/2.,Tc],[0,Tc,-bias/2.]]), \
                     [np.array([[0,0,1.],[0,0,0],[0,0,0]]), np.array([[0,0,0],[1.,0,0],[0,0,0]])], \
                     [Gamma_R, Gamma_L], np.array([1,0]), reduce_dim=True)
Пример #11
0
def setup_dqd_solver(Gamma_L, Gamma_R, Tc, bias):
    L = reduced_dqd_liouvillian(bias, Tc, Gamma_L, Gamma_R)
    jump_op = np.zeros((5, 5))
    jump_op[0, 4] = 1
    return FCSSolver(L, jump_op, np.array([1, 1, 1, 0, 0]))
Пример #12
0
def setup_srl_solver_from_hilbert_space(Gamma_L, Gamma_R):
    return FCSSolver.from_hilbert_space(np.array([[0,0],[0,0]]), [np.array([[0,1],[0,0]]), np.array([[0,0],[1,0]])], \
                                [Gamma_R, Gamma_L], np.array([1,0]), reduce_dim=True)
Пример #13
0
def setup_srl_solver(Gamma_L, Gamma_R):
    return FCSSolver(reduced_srl_liouvillian(Gamma_L, Gamma_R),
                     np.array([[0, 1], [0, 0]]), np.array([1, 1]))
@author: richard
'''
import numpy as np
from HEOM_counting_statistics.DQD_HEOM_model import DQDHEOMModel
from counting_statistics.fcs_solver import FCSSolver

model = DQDHEOMModel(0, 3., 1., 1.e-4)
 
bias_values = np.linspace(-10, 10, 100)
current = np.zeros(bias_values.size)
F2 = np.zeros(bias_values.size)
 
for i,E in enumerate(bias_values):
    model.bias = E
    solver = FCSSolver(model.heom_matrix(), model.jump_matrix(), model.dv_pops)
    current[i] = solver.mean()
    F2[i] = solver.second_order_fano_factor(0)
     
import matplotlib.pyplot as plt
plt.subplot(121)
plt.plot(bias_values, current, linewidth=3)
plt.xlim(-10,10)
plt.ylim(0,0.04)
plt.xlabel(r'energy bias $\epsilon$')
plt.ylabel(r'current')
 
plt.subplot(122)
plt.plot(bias_values, F2, linewidth=3)
plt.xlim(-10,10)
plt.xlabel(r'energy bias $\epsilon$')