Skip to content
Snippets Groups Projects
Commit d647c80f authored by Bernabeu Lou's avatar Bernabeu Lou
Browse files

udpated some stuff

parent 6f1c825a
No related branches found
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ print("Hi World!")
source = elements.Source(initial_vector = np.array([1.+0j, 0.]))
BS1 = elements.BeamSplitter(previous = {"left": (source, "left"), "right": None}, matrix=matrices.HALF_MIRROR_LEFT_ACTIVE)
BS1 = elements.BeamSplitter(previous = {"left": (source, "left"), "right": None}, matrix=matrices.HALF_MIRROR_LEFT_INACTIVE)
X_left_1 = elements.Plate(previous = (BS1, "left"), jones_matrix=matrices.X)
Z_left_2 = elements.Plate(previous = (X_left_1, "left"), jones_matrix = matrices.Z)
......@@ -20,7 +20,7 @@ Z_left_2 = elements.Plate(previous = (X_left_1, "left"), jones_matrix = matrices
Z_right_1 = elements.Plate(previous = (BS1, "right"), jones_matrix = matrices.Z)
X_right_2 = elements.Plate(previous = (Z_right_1, "left"), jones_matrix = matrices.X)
BS2 = elements.BeamSplitter(previous = {"left": (Z_left_2, "left"), "right": (X_right_2, "left")}, matrix = matrices.HALF_MIRROR_RIGHT_ACTIVE)
BS2 = elements.BeamSplitter(previous = {"left": (Z_left_2, "left"), "right": (X_right_2, "left")}, matrix = matrices.HALF_MIRROR_RIGHT_INACTIVE)
screen_right = elements.Screen(previous = (BS2, "right"))
screen_left = elements.Screen(previous = (BS2, "left"))
......
......@@ -8,8 +8,10 @@ Z = np.array([[1, 0], [0, -1]], dtype = "complex")
### Other One-qubit matrices
H = (1/np.sqrt(2))*np.array([[1, 1],[1, -1]], dtype='complex')
H_REV = (1/np.sqrt(2))*np.array([[-1, 1], [1, 1]], dtype='complex')
H = (1/np.sqrt(2))*np.array([[1, 1],
[1, -1]], dtype='complex')
H_REV = (1/np.sqrt(2))*np.array([[-1, 1],
[1, 1]], dtype='complex')
S = np.array([[1, 0], [0, 0+1j]], dtype='complex')
T = np.array([[1, 0], [0, np.exp(complex(0, np.pi/8))]], dtype="complex")
......@@ -57,10 +59,10 @@ SYM_BS_INACTIVE = np.kron(SYM_BS_AMPLITUDE_MATRIX, np.eye(2))
HALF_MIRROR_LEFT_INACTIVE = np.kron(HALF_MIRROR_LEFT_PLATE_AMPLITUDE_MATRIX, np.eye(2))
HALF_MIRROR_RIGHT_INACTIVE = np.kron(HALF_MIRROR_RIGHT_PLATE_AMPLITUDE_MATRIX, np.eye(2))
SYM_BS_INACTIVE = (1/np.sqrt(2))*np.array([[1j, 0, 1, 0],
[0, -1j, 0, 1],
[1, 0, 1j, 0],
[0, 1, 0, -1j]], dtype='complex')
SYM_BS_INACTIVE = (1/np.sqrt(2))*np.array([[1j, 0, 1, 0],
[0, -1j, 0, 1],
[1, 0, 1j, 0],
[0, 1, 0, -1j]], dtype='complex')
HALF_MIRROR_LEFT_ACTIVE = (1/np.sqrt(2))*np.array([[-1, 0, 1, 0],
[0, 1, 0, 1],
......@@ -68,6 +70,6 @@ HALF_MIRROR_LEFT_ACTIVE = (1/np.sqrt(2))*np.array([[-1, 0, 1, 0],
[0, 1, 0, -1]], dtype='complex')
HALF_MIRROR_RIGHT_ACTIVE = (1/np.sqrt(2))*np.array([[1, 0, 1, 0],
[0, -1, 0, 1],
[1, 0, -1, 0],
[0, 1, 0, 1]], dtype='complex')
[0, -1, 0, 1],
[1, 0, -1, 0],
[0, 1, 0, 1]], dtype='complex')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment