예제 #1
0
    def test_local_backends_exist(self):
        """Test if there are local backends.

        If all correct some should exists.
        """
        local_provider = DefaultQISKitProvider()
        local = local_provider.available_backends({'local': True})
        self.log.info(local)
        self.assertTrue(len(local) > 0)
예제 #2
0
    def test_local_backends_exist(self):
        """Test if there are local backends.

        If all correct some should exists.
        """
        local_provider = DefaultQISKitProvider()
        local = local_provider.available_backends({'local': True})
        self.log.info(local)
        self.assertTrue(len(local) > 0)
예제 #3
0
    def test_local_backend_parameters(self):
        """Test backend parameters.

        If all correct should pass the vaildation.
        """
        qiskit_provider = DefaultQISKitProvider()
        local_backends = qiskit_provider.available_backends({'local': True})
        for backend in local_backends:
            parameters = backend.parameters
            # FIXME test against schema and decide what parameters
            # is for a simulator
            self.assertEqual(len(parameters), 0)
예제 #4
0
    def test_local_backend_calibration(self):
        """Test backend calibration.

        If all correct should pass the vaildation.
        """
        qiskit_provider = DefaultQISKitProvider()
        local_backends = qiskit_provider.available_backends({'local': True})
        for backend in local_backends:
            calibration = backend.calibration
            # FIXME test against schema and decide what calibration
            # is for a simulator
            self.assertEqual(len(calibration), 0)
예제 #5
0
    def test_local_backend_parameters(self):
        """Test backend parameters.

        If all correct should pass the vaildation.
        """
        qiskit_provider = DefaultQISKitProvider()
        local_backends = qiskit_provider.available_backends({'local': True})
        for backend in local_backends:
            parameters = backend.parameters
            # FIXME test against schema and decide what parameters
            # is for a simulator
            self.assertEqual(len(parameters), 0)
예제 #6
0
    def test_local_backend_calibration(self):
        """Test backend calibration.

        If all correct should pass the vaildation.
        """
        qiskit_provider = DefaultQISKitProvider()
        local_backends = qiskit_provider.available_backends({'local': True})
        for backend in local_backends:
            calibration = backend.calibration
            # FIXME test against schema and decide what calibration
            # is for a simulator
            self.assertEqual(len(calibration), 0)
예제 #7
0
    def test_local_backend_configuration(self):
        """Test backend configuration.

        If all correct should pass the vaildation.
        """
        qiskit_provider = DefaultQISKitProvider()
        local_backends = qiskit_provider.available_backends({'local': True})
        for backend in local_backends:
            configuration = backend.configuration
            schema_path = self._get_resource_path(
                'backends/backend_configuration_schema_old_py.json',
                path=Path.SCHEMAS)
            with open(schema_path, 'r') as schema_file:
                schema = json.load(schema_file)
            jsonschema.validate(configuration, schema)
예제 #8
0
    def test_local_backend_configuration(self):
        """Test backend configuration.

        If all correct should pass the vaildation.
        """
        qiskit_provider = DefaultQISKitProvider()
        local_backends = qiskit_provider.available_backends({'local': True})
        for backend in local_backends:
            configuration = backend.configuration
            schema_path = self._get_resource_path(
                'deprecated/backends/backend_configuration_schema_old_py.json',
                path=Path.SCHEMAS)
            with open(schema_path, 'r') as schema_file:
                schema = json.load(schema_file)
            jsonschema.validate(configuration, schema)