Dear Sir,
I am a new user of z2 pack and trying to calculate chern number following the journal https://journals.aps.org/prb/pdf/10.1103/PhysRevB.85.115439 . I have defined the Hamiltonian as given in equation 14. I should get non-zero chern number. But instead of that I am getting zero. I am attaching my code below. Kindly help me in this regard.
*********************************************************************
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch greschd@gmx.ch # Date: 16.08.2016 14:25:39 CEST # File: haldane.py
import json import logging
import z2pack import numpy as np import matplotlib.pyplot as plt from numpy import linalg as LA
logging.getLogger('z2pack').setLevel(logging.WARNING)
# defining pauli matrices identity = np.identity(2, dtype=complex) pauli_x = np.array([[0, 1], [1, 0]], dtype=complex) pauli_y = np.array([[0, -1j], [1j, 0]], dtype=complex) pauli_z = np.array([[1, 0], [0, -1]], dtype=complex) Sx= 1./2. * np.array([[0, 1], [1, 0]], dtype=complex) Sy= 1./2. * np.array([[0, -1j], [1j, 0]], dtype=complex) Sz= 1./2. * np.array([[1, 0], [0, -1]], dtype=complex)
def Hamilton(k, m, t1, VR): kx, ky,_= k H = (3. *t1 /2. * ( pauli_x * kx + pauli_y * ky)) * identity H += (3. *t1 /2. * (- pauli_x * kx + pauli_y * ky)) * identity H += 3. *VR /2. * ( pauli_x * Sy - pauli_y * Sx) H += 3. *VR /2. * (- pauli_x * Sy - pauli_y * Sx) #H3 = n * 3. *sqrt3 * t2 * pauli_z *Sz H += (m * Sz) * identity #H5 = u * pauli_z * identity return H
def get_chern( m, t1, VR, **settings): system = z2pack.hm.System(lambda k: Hamilton(k, m, t1, VR), bands=1)
result = z2pack.surface.run(system=system, surface=lambda t1, t2: [t1, t2, 1], **settings) return z2pack.invariant.chern(result)
if __name__ == "__main__": # Task a) print(get_chern(0.3, 1., 0.5 )) #print(get_chern(0.5, 1., 1. / 3., -0.5 * np.pi)) #print(Hamilton(0.1, 1, 0.3,0.5)) ********************************************************************
Thanking You, Priyanka Sinha IIT Guwahati Research Scholar
Dear Priyanka,
The reason for this problem could be the fact that the Hamiltonian is not periodic across the Brillouin zone. As such, the Chern number is not well-defined (because the wave functions do not form a smooth fiber bundle).
Not having studied the reference in detail, I believe the reason for this is that the Hamiltonian of eq. (14) is expanded only around a single point, whereas you would need a Hamiltonian which extends correctly across the BZ to compute the Chern number.
Best regards,
Dominik
On 31.05.19 16:41, MS. PRIYANKA SINHA wrote:
Dear Sir,
I am a new user of z2 pack and trying to calculate chern number following the journal https://journals.aps.org/prb/pdf/10.1103/PhysRevB.85.115439 https://journals.aps.org/prb/pdf/10.1103/PhysRevB.85.115439 . I have defined the Hamiltonian as given in equation 14. I should get non-zero chern number. But instead of that I am getting zero. I am attaching my code below. Kindly help me in this regard.
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch greschd@gmx.ch # Date: 16.08.2016 14:25:39 CEST # File: haldane.py
import json import logging
import z2pack import numpy as np import matplotlib.pyplot as plt from numpy import linalg as LA
logging.getLogger('z2pack').setLevel(logging.WARNING)
# defining pauli matrices identity = np.identity(2, dtype=complex) pauli_x = np.array([[0, 1], [1, 0]], dtype=complex) pauli_y = np.array([[0, -1j], [1j, 0]], dtype=complex) pauli_z = np.array([[1, 0], [0, -1]], dtype=complex) Sx= 1./2. * np.array([[0, 1], [1, 0]], dtype=complex) Sy= 1./2. * np.array([[0, -1j], [1j, 0]], dtype=complex) Sz= 1./2. * np.array([[1, 0], [0, -1]], dtype=complex)
def Hamilton(k, m, t1, VR): kx, ky,_= k H = (3. *t1 /2. * ( pauli_x * kx + pauli_y * ky)) * identity H += (3. *t1 /2. * (- pauli_x * kx + pauli_y * ky)) * identity H += 3. *VR /2. * ( pauli_x * Sy - pauli_y * Sx) H += 3. *VR /2. * (- pauli_x * Sy - pauli_y * Sx) #H3 = n * 3. *sqrt3 * t2 * pauli_z *Sz H += (m * Sz) * identity #H5 = u * pauli_z * identity return H
def get_chern( m, t1, VR, **settings): system = z2pack.hm.System(lambda k: Hamilton(k, m, t1, VR), bands=1)
result = z2pack.surface.run(system=system, surface=lambda t1, t2: [t1, t2, 1], **settings) return z2pack.invariant.chern(result)
if __name__ == "__main__": # Task a) print(get_chern(0.3, 1., 0.5 )) #print(get_chern(0.5, 1., 1. / 3., -0.5 * np.pi)) #print(Hamilton(0.1, 1, 0.3,0.5))
Thanking You, Priyanka Sinha IIT Guwahati Research Scholar