# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .configuration_output_format import ConfigurationOutputFormat
from .configuration_supported_input_formats_item import ConfigurationSupportedInputFormatsItem
from .connectivity import Connectivity
from .gate import Gate
from .photonic_properties import PhotonicProperties
from .qubit import Qubit
from .shots_range import ShotsRange


class Configuration(UniversalBaseModel):
    gates: typing.Optional[typing.List[Gate]] = None
    operations: typing.Optional[typing.List[str]] = None
    qubit_count: typing.Optional[int] = None
    connectivity: typing.Optional[Connectivity] = None
    shots_range: typing.Optional[ShotsRange] = None
    supported_input_formats: typing.Optional[typing.List[ConfigurationSupportedInputFormatsItem]] = None
    output_format: typing.Optional[ConfigurationOutputFormat] = None
    memory_result_supported: typing.Optional[bool] = None
    photonic_properties: typing.Optional[PhotonicProperties] = None
    qubits: typing.Optional[typing.List[Qubit]] = None
    instructions: typing.Optional[typing.List[str]] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
