qat.qlmaas.upload.MetaLocalQPU

The MetaLocalQPU() metaclass is used for defining a qat.qpus.UploadedQPU.

qat.qlmaas.upload.MetaLocalQPU(class_name, parents, attributes)

Local QPU meta class. QPUs defined using this class can be uploaded using using UploadedQPU.

from qat.qlmaas.upload import MetaLocalQPU
from qat.qpus import QPUHandler

class LocalQPU(metaclass=MetaLocalQPU):
    " Uploadable QPU "
    def submit_job(self, job):
        " Submit job "
        # Import result class
        from qat.core import Result

        # Execute job and return result
        ...
        return Result()

print("Is LocalQPU a QPU?", issubclass(LocalQPU, QPUHandler))
Is LocalQPU a QPU? True