def test_two_qubit_gate(self): q = Qubits(2) Gates().H(q, 0) self.two_qubit_gate(q) self.assert_signs(q, [(0, 1), (3, 1)]) q = Qubits(2) self.two_qubit_gate(q) self.assert_signs(q, [(0, 1)])
def two_qubit_gate(self, q): Gates().CX(q, 0, 1)
def bell_state_change_2(self, q): Gates().X(q, 1)
def bell_state_change_3(self, q): Gates().X(q, 1) Gates().Z(q, 0)
def bell_state_change(self, q): Gates().Z(q, 0)