color='orange',
                 label='x_qp = 1e-6')
    # plt.semilogy(phi_ext, 1.0/(gamma_qp+gamma_cap)*1e6, linewidth = 2.0, linestyle='-.', color='k')
#
# for T_qp in [0.25, 0.27]:
#     thermal_factor_qp = (1 + np.exp(-h * w * 1e9 / (kB * T_qp)))
#     for idx in range(len(phi_ext)):
#         gamma_qp[idx] = r_qp_finiteT(E_l, E_c, E_j, w[idx], qp_element[idx], T_qp)*thermal_factor_qp[idx]
#     # plt.semilogy(w, 1.0/(gamma_qp)*1e6, linewidth = 2.0, linestyle='--')
#     plt.semilogy(w, 1.0/(gamma_qp+gamma_cap)*1e6, linewidth = 2.0, linestyle='-.', color='r')

for x_qp in [2e-8]:
    Q_qp = 1.0 / x_qp
    for idx in range(len(phi_ext)):
        gamma_qp_array[idx] = r_qp_array(
            E_l, E_c, E_j, Q_qp, w[idx],
            p_element[idx]) * thermal_factor_diel[idx]
    plt.semilogy(w * 1000,
                 1.0 / (gamma_qp_array) * 1e6,
                 linewidth=2.0,
                 linestyle='--',
                 color='magenta',
                 label='x_qp_array = 2e-8')
#     plt.semilogy(w, 1.0/(gamma_qp+gamma_cap+gamma_qp_array)*1e6, linewidth = 2.5, linestyle='-', color ='black')
################################################################################################
plt.xlabel('Frequency (MHz)', fontsize=18.0)
plt.ylabel('T1(us)', fontsize=18.0)

plt.tick_params(labelsize=16.0)
plt.legend()
plt.show()
Beispiel #2
0
    chain_num = chain_num_array[idx]
    T1 = T1_array[idx]
    thermal_factor_diel = (1 + np.exp(-h * w * 1e9 / (kB * T_diel)))
    thermal_factor_qp = (1 + np.exp(-h * w * 1e9 / (kB * T_qp)))

    gamma_cap = r_cap(E_l, E_c, E_j, 1, w, p_element,
                      T_diel) * thermal_factor_diel
    Q_diel = gamma_cap * T1 * 1e-6
    tan_diel[idx] = 1.0 / Q_diel

    gamma_cap1 = r_cap_chain1(C_chain, chain_num, 1, w, p_element,
                              T_diel) * thermal_factor_diel
    Q_diel1 = gamma_cap1 * T1 * 1e-6
    tan_diel_chain[idx] = 1.0 / Q_diel1

    gamma_qp_array = r_qp_array(E_l, E_c, E_j, 1, w,
                                p_element) * thermal_factor_qp
    Q_qp = gamma_qp_array * T1 * 1e-6
    x_qp_chain[idx] = 1.0 / Q_qp

    tan_ind[idx] = w**2 / (8 * E_c * E_l) * tan_diel[idx]

    # gamma_ind = r_ind(E_l, E_c, E_j, 1, w, p_element, T_diel) * thermal_factor_diel
    # Q_ind = gamma_ind * T1 * 1e-6
    # tan_ind[idx] = 1.0 / Q_ind

print("tan_diel x 1e6 = " + str(tan_diel * 1e6))
print("tan_diel_chain x 1e4 = " + str(tan_diel_chain * 1e4))
print("x_qp_chain x 1e8 = " + str(x_qp_chain * 1e8))
print("tan_ind x 1e8 = " + str(tan_ind * 1e8))
gamma_qp = np.zeros(len(E_l_array))
gamma_qp_array = np.zeros(len(E_l_array))
energies = np.zeros((len(E_l_array), level_num))

for idx, E_l in enumerate(E_l_array):
    p_element[idx] = abs(
        pem(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]
w = energies[:, fState] - energies[:, iState]

for x_qp in [1e-8, 5e-8, 10e-8]:
    Q_qp = 1.0 / x_qp
    for idx in range(len(E_l_array)):
        gamma_qp_array[idx] = r_qp_array(E_l, E_c, E_j, Q_qp, w[idx],
                                         p_element[idx])
    plt.plot(E_l_array,
             1.0 / (gamma_qp_array) * 1e6,
             linewidth=2.0,
             linestyle='--')  #, color = 'orange')
    # plt.semilogy(w, 1.0/(gamma_qp+gamma_cap+gamma_qp_array)*1e6, linewidth = 2.5, linestyle='-', color ='black')

plt.yscale('log')
plt.xlabel('E_L (GHz)')
plt.ylabel('T1 (us)')
#######################################################################

# N = 40
# E_l = 1
# E_c = 1.0
# E_j_array = np.linspace(2.0, 5.0, 201)