Esempio n. 1
0
gamma_cap = np.zeros(len(phi_ext))
gamma_ind = np.zeros(len(phi_ext))
gamma_qp = np.zeros(len(phi_ext))
gamma_qp_array = np.zeros(len(phi_ext))
energies = np.zeros((len(phi_ext), level_num))

#######################################################################################
for idx, phi in enumerate(phi_ext):
    p_element[idx] = abs(
        pem(N, E_l, E_c, E_j, phi * 2.0 * np.pi, iState, fState))
    n_element[idx] = abs(
        nem(N, E_l, E_c, E_j, phi * 2.0 * np.pi, iState, fState))
    qp_element[idx] = abs(
        qpem(N, E_l, E_c, E_j, phi * 2.0 * np.pi, iState, fState))
    for idy in range(level_num):
        energies[idx, idy] = H(N, E_l, E_c, E_j,
                               phi * 2.0 * np.pi).eigenenergies()[idy]

np.savetxt(path + '_energies.txt', energies)
np.savetxt(path + '_chargeElement.txt', n_element)
np.savetxt(path + '_fluxElement.txt', p_element)
np.savetxt(path + '_qpElement.txt', qp_element)

#######################################################################################
energies = np.genfromtxt(path + '_energies.txt')
n_element = np.genfromtxt(path + '_chargeElement.txt')
p_element = np.genfromtxt(path + '_fluxElement.txt')
qp_element = np.genfromtxt(path + '_qpElement.txt')
w = energies[:, fState] - energies[:, iState]
# fig, ax1 = plt.subplots(figsize=[10,7])
# ax2 = ax1.twinx()
# ax2.plot(phi_ext, w, color = 'black', linewidth = 2.0)
Esempio n. 2
0
phi_o = h / (2 * e)  #Flux quantum
#Define parameters here
N = 50
E_l = 0.7
E_c = 0.8
E_j = 2.7
level_num = 15
phi_ext = np.linspace(0, 0.51, 2001)
w = np.zeros(len(phi_ext))
sensitivity = np.zeros(len(phi_ext))
iState = 0
fState = 1
dPhi = 0.51 / 2000

for idx, phi in enumerate(phi_ext):
    trans_energy1 = H(N, E_l, E_c, E_j, phi*2*np.pi).eigenenergies()[fState]- \
                    H(N, E_l, E_c, E_j, phi*2*np.pi).eigenenergies()[iState]
    # trans_energy2 =H(N, E_l, E_c, E_j , (phi+dPhi) * 2 * np.pi).eigenenergies()[fState] - \
    #                H(N, E_l, E_c, E_j , (phi+dPhi) * 2 * np.pi).eigenenergies()[iState]
    # sensitivity[idx] = (trans_energy2-trans_energy1)/dPhi
    w[idx] = trans_energy1
dw = np.diff(w)
dw2 = np.diff(dw)
#Sensitivity unit is GHz/ (flux/flux_q)
fig, ax1 = plt.subplots(figsize=(10, 7))
plt.tick_params(labelsize=20.0)
ax1.plot(phi_ext, w, linewidth=2.0, color='k')
ax1.set_yticks(np.linspace(0, 4, 5))
ax1.set_ylim([0, 4])
ax2 = ax1.twinx()
plt.tick_params(labelsize=20.0)