def matrix(self):
    x = np.matrix([[0, 1], [1, 0]], dtype=np.complex_)
    y = np.matrix([[0, (- 1j)], [1j, 0]], dtype=np.complex_)
    z = np.matrix([[1, 0], [0, (- 1)]], dtype=np.complex_)
    (nx, ny, nz) = (self.v[(0, 0)], self.v[(0, 1)], self.v[(0, 2)])
    i = np.identity(2)
    if self.iden:
        return np.identity(2)
    return ((np.cos(self.a) * i) + (((((x * nx) + (y * ny)) + (z * nz)) * 1j) * np.sin(self.a)))
def matrix(self):
    x = np.matrix([[0, 1], [1, 0]], dtype=np.complex_)
    y = np.matrix([[0, (- 1j)], [1j, 0]], dtype=np.complex_)
    z = np.matrix([[1, 0], [0, (- 1)]], dtype=np.complex_)
    (nx, ny, nz) = (self.v[(0, 0)], self.v[(0, 1)], self.v[(0, 2)])
    i = np.identity(2)
    if self.iden:
        return np.identity(2)
    return ((np.cos(self.a) * i) + (((((x * nx) + (y * ny)) + (z * nz)) * 1j) * np.sin(self.a)))