Skip to content
Snippets Groups Projects
Select Git revision
  • 64c24f03d02e7b99c8cb217165ff18892bfbd48f
  • main default protected
  • release
3 results

double_gate_ADU.py

Blame
  • experiments.py 3.85 KiB
    #!/usr/bin/env python3
    """
    Kondo FRTRG
    
    Copyright 2022 Valentin Bruch
    License: MIT
    """
    
    from data_management import DataManager, KondoImport
    import scipy.constants as sc
    import matplotlib.pyplot as plt
    import matplotlib.colors as mplcolors
    import argparse
    import pandas as pd
    import numpy as np
    import settings
    import os
    
    # In this program all energies are given in units of the RTRG Kondo
    # temperature Tkrg, which is an integration constant of the E-flow RG
    # equations. The more conventional definition of the Kondo temperature is
    # G(V=Tk)=G(V=0)/2=e²/h. The ratio Tk/Tkrg is:
    TK_VOLTAGE = 3.30743526735
    
    def main():
        """
        Parse command line arguments and call other functions
        """
        parser = argparse.ArgumentParser(description=main.__doc__)
        valid_functions = {f.__name__:f for f in globals().values() if type(f) == type(main)  and getattr(f, '__module__', '') == '__main__' and f.__name__[0] != '_'}
        parser.add_argument("functions", type=str, nargs='+', choices=valid_functions.keys(), help="functions to be called")
        parser.add_argument("--omega", type=float, help="Frequency, units of Tk")
        parser.add_argument("--method", type=str, choices=('J', 'mu'), help="method: J or mu")
        parser.add_argument("--nmax", metavar='int', type=int, help="Floquet matrix size")
        parser.add_argument("--padding", metavar='int', type=int, help="Floquet matrix ppadding")
        parser.add_argument("--voltage_branches", metavar='int', type=int, help="Voltage branches")
        parser.add_argument("--resonant_dc_shift", metavar='int', type=int, help="resonant DC shift")
        parser.add_argument("--vdc", metavar='float', type=float, help="Vdc, units of Tk")
        fourier_coef_group = parser.add_mutually_exclusive_group()
        fourier_coef_group.add_argument("--vac", metavar='float', type=float, help="Vac, units of Tk")
        fourier_coef_group.add_argument("--fourier_coef", metavar='tuple', type=float, nargs='*', help="Voltage Fourier arguments, units of omega")
        parser.add_argument("--d", metavar='float', type=float, help="D (UV cutoff), units of Tk")
        parser.add_argument("--xL", metavar='float', type=float, nargs='+', default=0.5, help="Asymmetry, 0 < xL < 1")
        parser.add_argument("--compact", metavar='int', type=int, help="compact FRTRG implementation (0,1, or 2)")
        parser.add_argument("--solver_tol_rel", metavar="float", type=float, help="Solver relative tolerance")
        parser.add_argument("--solver_tol_abs", metavar="float", type=float, help="Solver relative tolerance")
        args = parser.parse_args()
    
        dm = DataManager()
        options = args.__dict__
        for name in options.pop("functions"):
            valid_functions[name](dm=dm, **options)
        plt.show()
    
    
    def bruhat18(**parameters):
        """
        PRB 98.075121
        Tk=28.2μeV
        f=19GHz or f=12GHz
        vac_mueV = [20, 40, 60, ..., 140, 180, 220, 300]
    
        some data accidentally lie in frtrg-omega10-vdc24-vac22-03.h5 instead
        of frtrg-bruhat18-f?-??.h5
        """
        tk_mueV = 28.2  # Kondo temperature in μeV, defined by G(V=Tk)=e²/h
        f1_ghz = 19 # Frequency, GHz
        f2_ghz = 12 # Frequency, GHz
    
        tkrg_mueV = tk_mueV / TK_VOLTAGE # Kondo temperature in μeV defined as integration constant in RTRG
    
        omega1 = ((f1_ghz * 1e9*sc.h) / (tkrg_mueV * 1e-6 * sc.eV)) # Frequency, in RTRG Tk units
        omega2 = ((f2_ghz * 1e9*sc.h) / (tkrg_mueV * 1e-6 * sc.eV)) # Frequency, in RTRG Tk units
        omega1 = round(omega1, 7)
        omega2 = round(omega2, 7)
        print(f"Omega1 = {omega1}\nOmega2 = {omega2}")
    
        omega1 = 9.2159791 # Frequency, in RTRG Tk units
        omega2 = 5.8206184 # Frequency, in RTRG Tk units
    
        voltage_branches = 4
        vac_mueV = np.array([20, 40, 60, 80, 100, 120, 140, 180, 220, 300])
        vac = vac_mueV / tkrg_mueV # Vac, in RTRG Tk units
        print("Vac =", vac)
        print("Vac max = ", 330 / tkrg_mueV)
    
        # TODO: generate data, implement plot, check convergence, ...
    
    
    
    if __name__ == '__main__':
        main()