Exemple #1
0
 def array(self):
     half_theta = np.pi * self.phase
     cos, sin = np.cos(half_theta), np.sin(half_theta)
     return np.array([
         1, 0, 0, 0, 0, 1, 0, 0, 0, 0, cos, -1j * sin, 0, 0, -1j * sin, cos
     ])
Exemple #2
0
 def array(self):
     half_theta = np.pi * self.phase
     global_phase = np.exp(1j * half_theta)
     sin, cos = np.sin(half_theta), np.cos(half_theta)
     return global_phase * np.array([[cos, -1j * sin], [-1j * sin, cos]])
Exemple #3
0
 def array(self):
     half_theta = np.pi * self.phase
     sin, cos = np.sin(half_theta), np.cos(half_theta)
     return np.array([[cos, -1j * sin], [-1j * sin, cos]])