Ejemplo n.º 1
0
    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)
Ejemplo n.º 3
0
 def test_prepare_operations(self):
     assert (valid_operation_dictionary(self.operation_dict))
     with Capturing() as output:
         qta.prepare_operations(self.operation_dict)
     self.assertTrue("mock called with {'test': 0}" in output)
 def test_prepare_operations(self):
     assert(valid_operation_dictionary(self.operation_dict))
     with Capturing() as output:
         qta.prepare_operations(self.operation_dict)
     self.assertTrue("mock called with {'test': 0}" in output)