def test_print_method_three_qubits_constant(self): gate = AbstractGate('XXY', 3, 10.0, 1, False) gate.assign_qubit_indexes([0, 1, 2]) gate.assign_parameter_indexes([1]) self.assertEqual(gate.__str__(), 'XXY\t0,1,2\tc1')
def test_print_method_one_qubit_constant(self): gate = AbstractGate('X', 1, 10.0, 1, False) gate.assign_qubit_indexes([0]) gate.assign_parameter_indexes([1]) self.assertEqual(gate.__str__(), 'X\t0\tc1')
def test_print_method_three_qubits_variational(self): gate = AbstractGate('XXY', 3, 10.0, 1, True) gate.assign_qubit_indexes([0, 1, 2]) gate.assign_parameter_indexes([1]) self.assertEqual(gate.__str__(), 'XXY\t0,1,2\tv1')
def test_print_method_one_qubit_variational(self): gate = AbstractGate('X', 1, 10.0, 1, True) gate.assign_qubit_indexes([0]) gate.assign_parameter_indexes([1]) self.assertEqual(gate.__str__(), 'X\t0\tv1')