These will be needed when explicitly constructing controlled gates.
Joseph Weston authored on 15/11/2019 19:00:28... | ... |
@@ -52,6 +52,11 @@ single_qubit_gates = unitary(1) |
52 | 52 |
two_qubit_gates = unitary(2) |
53 | 53 |
n_qubit_gates = n_qubits.flatmap(unitary) |
54 | 54 |
|
55 |
+# Projectors on the single qubit computational basis |
|
56 |
+project_zero = np.array([[1, 0], [0, 0]]) |
|
57 |
+project_one = np.array([[0, 0], [0, 1]]) |
|
58 |
+ |
|
59 |
+ |
|
55 | 60 |
# -- Tests -- |
56 | 61 |
|
57 | 62 |
|