def test_single_qubit_gate_init(self): single_qubit_gate = AbstractGate('X', 1, 10.0, 1, False) self.assertEqual('X', single_qubit_gate.get_name()) self.assertEqual(1, single_qubit_gate.get_span()) self.assertEqual(10.0, single_qubit_gate.get_time()) self.assertEqual(1, single_qubit_gate.get_n_parameters()) self.assertEqual(False, single_qubit_gate.get_is_variational()) self.assertEqual('default', single_qubit_gate.get_type()) self.assertEqual([], single_qubit_gate.get_indexes()) self.assertEqual([], single_qubit_gate.get_targets())
def test_two_qubit_gate_init(self): two_qubit_gate = AbstractGate('XX', 2, 10.0, 1, True) self.assertEqual('XX', two_qubit_gate.get_name()) self.assertEqual(2, two_qubit_gate.get_span()) self.assertEqual(10.0, two_qubit_gate.get_time()) self.assertEqual(1, two_qubit_gate.get_n_parameters()) self.assertEqual(True, two_qubit_gate.get_is_variational()) self.assertEqual('default', two_qubit_gate.get_type()) self.assertEqual([], two_qubit_gate.get_indexes()) self.assertEqual([], two_qubit_gate.get_targets())