Accuracy for Kubo conductivity
Dear all, I want to use the code in the example to calculate the conductivity,but I found that the results are not accurate. I want to increase the accuracy or zoom in a small energy scale to increase the accuracy. The code is: lat, fsyst = make_syst_topo() where = lambda s: np.linalg.norm(s.pos) < 1 s_factory = kwant.kpm.LocalVectors(fsyst, where) cond_xy = kwant.kpm.conductivity(fsyst, alpha='x', beta='y', mean=True, num_vectors=None, vector_factory=s_factory) energies = cond_xx.energies cond_array_xy = np.array([cond_xy(e, temperature=0.01) for e in energies])
Now, what I know is adding energy_resolution to cond_xy, for example cond_xy = kwant.kpm.conductivity(fsyst, alpha='x', beta='y', mean=True, num_vectors=None,energy_resolution=0.01 vector_factory=s_factory)
My question is: 1 Is there any other way to increase the accuracy? 2 Can we zoom in a smaller energy scale to increase the accuracy? 3 What is the units for temperature=0.01? Is it 0.01t (t is the nearest hopping)? Thanks in advance! Khani Hosein
Dear Khani Hosein,
The 'energy_resolution' is a proxy for the width of the delta peaks that the KPM expansion resolves. The value may need to be smaller (4 times usually) than the features you want to distinguish in energy.
To set the energy resolution you can choose the value at creation of the 'cond_xy' function in your example, or you can increase the energy resolution afterwards by calling `cond_xy.add_moments()`. The `add_moments` method takes either a value of `energy_resolution` or an integer number `num_moments` of orders to add to the KPM expansion.
You may feel tempted to just pass a very small value of `energy_resolution` but the number of moments in the expansion scales as `1/energy_resolution` and the memory and computational time will scale as `num_moments**2`. So adding moments in small amounts until you are satisfied with the resolution is a good strategy.
About question 3, the units of temperature are the units of your Hamiltonian, that is, your hoppings and onsites. You have to rescale `temperature` with `kB` the Boltzmann constant and your units of energy, to get a 'real' temperature in kelvins.
Stay tuned for the miniworkshop, where I will explain the details of the KPM module in Kwant.
https://virtualscienceforum.org/#/quantumtransportworkshop
Best, Pablo
participants (2)

Khani Hosein

pablo.perez.piskunow＠gmail.com