# -----------------------------------------------------------------------------------------------------------------
    state['w0'].normalize()

    ro_0 = DensityMatrix(state['w0'])

    T_list = []
    sink_list = []

    run({
        "ro_0": ro_0,
        "H": state['H'],
        "dt": dt,
        "sink_list": sink_list,
        "T_list": T_list,
        "precision": 1e-3,
        'sink_limit': 1,
        "thres": 0.001,
        'lindblad': {
            'out': {
                'L': operator_a(state['H']),
                'l': l
            },
        },
    })

    # MkDir('sink')
    pickle_dump(T_list, 'sink/1ms_l001g/T_list_' + state['name'] + '.pkl')
    pickle_dump(sink_list, 'sink/1ms_l001g/sink_list_' +
                state['name'] + '.pkl')
    # -----------------------------------------------------------------------------------------------------------------

# ---------------------------------------------------------------------------------------------------------------------
# exit(0)

# -------------------------
sink_list = []
T_list = []

time_2 = run({
    "ro_0": ro_0,
    "H": H,
    "T": config.T,
    "dt": config.dt,
    "nt": config.nt,
    "thres": 0.1,
    # "x_csv": config.x_csv,
    # "y_csv": config.y_csv,
    # "z_csv": config.z_csv,
    "sink_list": sink_list,
    "T_list": T_list,
    "precision": 1e-3,
    'sink_limit': 1,
    'lindblad':
        {
            'L': operator_acrossa(H, H.capacity, H.cavity.n_atoms),
            'l': config.l
        },
})

# for i in sink_list:
#     print(i)

# print(T_list[-1])
Exemple #3
0
            #     'obj': s_2,
            # },
    ]:
        ro_0 = DensityMatrix(w_0['obj'])

        T_list = []
        sink_list = []

        run({
            "ro_0": ro_0,
            "H": H,
            "dt": config.dt,
            "sink_list": sink_list,
            "T_list": T_list,
            "precision": 1e-3,
            'sink_limit': 1,
            'lindblad': {
                'out': {
                    'L': operator_a(H, H.capacity, H.cavity.n_atoms),
                    'l': config.l
                },
            },
        })

        list_to_csv(T_list, 'MM/' + path + '/' + 'T_' + w_0['name'] + '.csv')
        # list_to_csv(np.array(T_list) * 1e9, 'MM/' + path + '/' + 'T_' + w_0['name'] + '.csv')
        list_to_csv(sink_list,
                    'MM/' + path + '/' + 'sink_' + w_0['name'] + '.csv')
# ---------------------------------------------------------------------------------------------------------------------

# =====================================================================================================================
w_0 = WaveFunction(states=H.states, init_state=config.init_state)
# ---------------------------------------------------------------------------------------------------------------------
ro_0 = DensityMatrix(w_0)

# ro_0.print()
# ---------------------------------------------------------------------------------------------------------------------
sink_list = []
T_list = []

run({
    "ro_0": ro_0,
    "H": H,
    "T": config.T,
    "dt": config.dt,
    "nt": config.nt,
    "l": config.l,
    "thres": 0.1,
    "x_csv": config.x_csv,
    "y_csv": config.y_csv,
    "z_csv": config.z_csv,
    "sink_list": sink_list,
    "T_list": T_list,
})

plt.plot(T_list, sink_list)

for i in sink_list:
    print(i)

plt.show()

# ---------------------------------------------------------------------------------------------------------------------