I'm interested in using Kwant for my own research. While trying the 
kernel_polynomial_method.py examples, it seems the identity matrix spectrum is 
not right. Has anyone really tried to run that example?
the relevant part of the python code is:
#####################
def operator_example(fsyst):
    # identity matrix
    matrix_op = scipy.sparse.eye(len(fsyst.sites))
    matrix_spectrum = kwant.kpm.SpectralDensity(fsyst, operator=matrix_op)

    # # 'sum=True' means we sum over all the sites
    # kwant_op = kwant.operator.Density(fsyst, sum=True)
    # operator_spectrum = kwant.kpm.SpectralDensity(fsyst, operator=kwant_op)

    plot_dos([
        ('identity matrix', matrix_spectrum()),
        # ('kwant.operator.Density', operator_spectrum()),
    ])
#####################
Thank you for your help and communication.

Reply via email to