qwz/qwz_utils.py
def qwz_hamiltonian(kx, ky, mu, b):
    """ Returns the QWZ Hamiltonian at kx,ky.

    Args:
        kx, ky (float): point in momentum space.
        mu, b (float): parameters in Hamiltonian.

    Returns:
        np.array: the QWZ Hamiltonian.
    """
    j = complex(0, 1)
    hamiltonian = np.zeros((2, 2), dtype=np.cdouble)
    hamiltonian[0, 0] = mu - 2. * b * (2. - np.cos(kx) - np.cos(ky))
    hamiltonian[1, 1] = -mu + 2. * b * (2. - np.cos(kx) - np.cos(ky))
    hamiltonian[0, 1] = np.sin(kx) - j * np.sin(ky)
    hamiltonian[1, 0] = np.sin(kx) + j * np.sin(ky)
    return hamiltonian
 Returns the QWZ Hamiltonian at kx,ky.

    Args:
        kx, ky (float): point in momentum space.
        mu, b (float): parameters in Hamiltonian.

    Returns:
        np.array: the QWZ Hamiltonian.
    
Returns the QWZ Hamiltonian at kx,ky.
Returns the QWZ Hamiltonian at kx ky .
def qwz_hamiltonian(kx, ky, mu, b):
    j = complex(0, 1)
    hamiltonian = np.zeros((2, 2), dtype=np.cdouble)
    hamiltonian[0, 0] = mu - 2. * b * (2. - np.cos(kx) - np.cos(ky))
    hamiltonian[1, 1] = -mu + 2. * b * (2. - np.cos(kx) - np.cos(ky))
    hamiltonian[0, 1] = np.sin(kx) - j * np.sin(ky)
    hamiltonian[1, 0] = np.sin(kx) + j * np.sin(ky)
    return hamiltonian
def qwz_hamiltonian ( kx , ky , mu , b ) : j = complex ( 0 , 1 ) hamiltonian = np . zeros ( ( 2 , 2 ) , dtype = np . cdouble ) hamiltonian [ 0 , 0 ] = mu - 2. * b * ( 2. - np . cos ( kx ) - np . cos ( ky ) ) hamiltonian [ 1 , 1 ] = - mu + 2. * b * ( 2. - np . cos ( kx ) - np . cos ( ky ) ) hamiltonian [ 0 , 1 ] = np . sin ( kx ) - j * np . sin ( ky ) hamiltonian [ 1 , 0 ] = np . sin ( kx ) + j * np . sin ( ky ) return hamiltonian
Returns the QWZ Hamiltonian at kx,ky.
Returns the QWZ Hamiltonian at kx ky .
""" Returns the QWZ Hamiltonian at kx,ky.

    Args:
        kx, ky (float): point in momentum space.
        mu, b (float): parameters in Hamiltonian.

    Returns:
        np.array: the QWZ Hamiltonian.
    """
the QWZ Hamiltonian.
the QWZ Hamiltonian .
np.array
kx
ky
mu
b
kx, ky
point in momentum space.
point in momentum space .
mu, b
parameters in Hamiltonian.
parameters in Hamiltonian .