#  Quapp Platform Project
#  qibo_provider_factory.py
#  Copyright © CITYNOW Co. Ltd. All rights reserved.

from quapp_common.config.logging_config import logger
from quapp_common.enum.provider_tag import ProviderTag
from quapp_common.enum.sdk import Sdk
from quapp_common.factory.provider_factory import ProviderFactory

from ..model.provider.quapp_qibo_provider import QuappQiboProvider


class QiboProviderFactory(ProviderFactory):

    @staticmethod
    def create_provider(provider_type: ProviderTag, sdk: Sdk,
            authentication: dict):
        logger.debug("Create Qibo Provider")
        if ProviderTag.QUAO_QUANTUM_SIMULATOR.__eq__(
                provider_type) and Sdk.QIBO.__eq__(sdk):
            logger.debug("Create Qibo Qapp Qibo Provider")
            return QuappQiboProvider()
        raise Exception("Unsupported provider!")