def test_qasm_extract_required_ops(self): operations = qta.extract_required_operations(self.AllXY_qasm_file.name) self.assertCountEqual(operations, self.basic_ops) operations = qta.extract_required_operations(self.Rabi_qasm_file.name) rabi_ops = ['init_all', 'RO q0'] for amp in self.amps: rabi_ops.append('Rx q0 {}'.format(amp)) self.assertCountEqual(operations, rabi_ops)
def test_qasm_extract_required_ops(self): operations = qta.extract_required_operations( self.AllXY_qasm_file.name) self.assertCountEqual(operations, self.basic_ops) operations = qta.extract_required_operations( self.Rabi_qasm_file.name) rabi_ops = ['init_all', 'RO q0'] for amp in self.amps: rabi_ops.append('Rx q0 {}'.format(amp)) self.assertCountEqual(operations, rabi_ops)
def test_complete_sequence_loading_simple(self): ''' Tests all the loading with an AllXY sequence that contains all the basic steps but does not require mapping the allowed operations. ''' qasm_file = self.AllXY_qasm_file ops = qta.extract_required_operations(qasm_file.name) # # config needs to contain enough info to generate mapping operation_dict = qta.create_operation_dict(ops, self.pulse_pars) # operation_mapping = qta.create_operation_mapping(required_ops) # # uploads all operations in op dict with Capturing() as output: qta.prepare_operations(operation_dict) qta.qasm_to_asm(qasm_file.name, operation_dict)
def test_complete_sequence_loading_simple(self): ''' Tests all the loading with an AllXY sequence that contains all the basic steps but does not require mapping the allowed operations. ''' qasm_file = self.AllXY_qasm_file ops = qta.extract_required_operations(qasm_file.name) # # config needs to contain enough info to generate mapping operation_dict = qta.create_operation_dict(ops, self.pulse_pars) # operation_mapping = qta.create_operation_mapping(required_ops) # # uploads all operations in op dict with Capturing() as output: qta.prepare_operations(operation_dict) qta.qasm_to_asm(qasm_file.name, operation_dict)