def step_given_7(context):
    """

        Given I have a Hamiltonian H, Lidblad form L and initial density matrix R

    """
    # create test aggregatedimer
    agg = qr.TestAggregate("trimer-2")
    agg.build()
    
    # get the associated time axis and the relaxation tensor and Hamiltonian
    time = qr.TimeAxis(0, 320, 1.0)
    time2 = qr.TimeAxis(0, 32, 10.0)
    context.time = time
    context.time2 = time2
    
    HH = agg.get_Hamiltonian()
    context.H = HH
    
    SBI = qr.qm.TestSystemBathInteraction(name="trimer-2-lind")
    LL = qr.qm.LindbladForm(HH, SBI)
    
    context.L= LL
    
    # initial density matrix
    R = qr.ReducedDensityMatrix(dim=HH.dim)
    R.data[2,2] = 1.0 
    
    context.R = R
Esempio n. 2
0
def step_given_1(context):
    """

        Given that I have an aggregate of three molecules with no dephasing set

    """
    agg = qr.TestAggregate("trimer-2")

    with qr.energy_units("1/cm"):
        agg.set_resonance_coupling(0, 1, 100.0)
    agg.build()

    context.agg = agg
Esempio n. 3
0
def step_given_4(context):
    """

        Given that I have an aggregate of three molecules with dephasing rates set

    """
    agg = qr.TestAggregate("trimer-2")

    for mol in agg.monomers:
        mol.set_transition_width((0, 1), 1.0 / 100.0)

    with qr.energy_units("1/cm"):
        agg.set_resonance_coupling(0, 1, 100.0)

    agg.build()

    context.agg = agg
Esempio n. 4
0
def step_given_8(context):
    """

        Given that I have an aggregate of two molecules with nuclear mode each and with electronic dephasing rates set

    """
    agg = qr.TestAggregate("dimer-2-vib")

    for mol in agg.monomers:
        mol.set_transition_width((0, 1), 1.0 / 100.0)

    with qr.energy_units("1/cm"):
        agg.set_resonance_coupling(0, 1, 100.0)

    agg.build()

    context.agg = agg
def step_given_14(context, dtime):
    """

        Given I have a Hamiltonian H, Lidblad form L, PureDephasing object D with dephasing time {dtime} and initial density matrix R

    """
    td = float(dtime)
    print("Dephasing time", td)
    context.td = td

    # create test aggregatedimer
    agg = qr.TestAggregate("trimer-2")
    with qr.energy_units("1/cm"):
        agg.set_resonance_coupling(0, 1, 100.0)
        agg.set_resonance_coupling(1, 2, 50.0)
    agg.build()

    HH = agg.get_Hamiltonian()
    context.H = HH

    print("Hamiltonian:")
    print(HH)

    L = qr.qm.LindbladForm(HH, sbi=None)

    context.L = L

    # initial density matrix
    R = qr.ReducedDensityMatrix(dim=HH.dim)
    with qr.eigenbasis_of(HH):
        R.data[1:4, 1:4] = 0.5

    context.R = R

    dd = numpy.zeros((4, 4), dtype=qr.REAL)
    dd[1, 2] = 1.0 / td
    dd[2, 1] = 1.0 / td
    dd[1, 3] = 1.0 / td
    dd[3, 1] = 1.0 / td
    dd[2, 3] = 1.0 / td
    dd[3, 2] = 1.0 / td
    D = qr.qm.PureDephasing(drates=dd, dtype="Lorentzian")

    context.D = D
def step_given_1(context):
    
    # create test aggregate
    agg = qr.TestAggregate("dimer-2-env")
    agg.build()
    
    # get the associated time axis and the relaxation tensor and Hamiltonian
    time = agg.get_SystemBathInteraction().TimeAxis
    RR, HH = agg.get_RelaxationTensor(time, relaxation_theory="stR")
    
    context.H = HH
    
    # define and calculate evolution superoperator
    U = qr.qm.EvolutionSuperOperator(time, ham=HH, relt=RR)
    U.calculate()
    
    context.U = U
    
    # initial density matrix
    R = qr.ReducedDensityMatrix(dim=HH.dim)
    R.data[2,2] = 1.0 
    
    context.R = R