# 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 .azure_ionq_job_input_circuit_item import AzureIonqJobInputCircuitItem


class AzureIonqJobInput(UniversalBaseModel):
    """
    Azure IonQ input schema for job input (based on IonQ API Qis v0.4 qis-circuit reference)
    """

    circuit: typing.List[AzureIonqJobInputCircuitItem] = pydantic.Field()
    """
    List of gates to apply
    """

    gateset: typing.Literal["qis"] = pydantic.Field(default="qis")
    """
    Which gateset to apply
    """

    qubits: int = pydantic.Field()
    """
    Total number of qubits in the circuit
    """

    registers: typing.Optional[typing.Dict[str, typing.List[int]]] = pydantic.Field(default=None)
    """
    Registers to use in your circuit. Each register is a list of qubit indices (starting from zero).
    """

    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
