# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: qm/grpc/quantum_simulator/v1/physical_system.proto
# plugin: python-betterproto
from dataclasses import dataclass
from typing import Dict, List

import betterproto


@dataclass
class PhysicalConfig(betterproto.Message):
    qubits: Dict[str, "Qubit"] = betterproto.map_field(
        1, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
    )
    resonators: Dict[str, "Resonator"] = betterproto.map_field(
        2, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
    )
    capacitive_couplers: Dict[str, "CapacitiveCoupler"] = betterproto.map_field(
        3, betterproto.TYPE_STRING, betterproto.TYPE_MESSAGE
    )
    qubit_qubit_coupling: List["QubitQubitCoupling"] = betterproto.message_field(4)
    qubit_resonator_coupling: List[
        "QubitResonatorCoupling"
    ] = betterproto.message_field(5)


@dataclass
class QubitResonatorCoupling(betterproto.Message):
    qubit: str = betterproto.string_field(1)
    resonator: str = betterproto.string_field(2)
    g: float = betterproto.double_field(3)


@dataclass
class QubitQubitCoupling(betterproto.Message):
    capacitive_coupler: str = betterproto.string_field(1)
    qb1: str = betterproto.string_field(2)
    qb2: str = betterproto.string_field(3)


@dataclass
class Offset(betterproto.Message):
    port: "InputPort" = betterproto.message_field(1)
    value: float = betterproto.double_field(2)


@dataclass
class Waveform(betterproto.Message):
    constant_waveform: "ConstantWaveform" = betterproto.message_field(1, group="type")
    arbitrary_waveform: "ArbitraryWaveform" = betterproto.message_field(2, group="type")


@dataclass
class ConstantWaveform(betterproto.Message):
    sample: float = betterproto.double_field(1)


@dataclass
class ArbitraryWaveform(betterproto.Message):
    samples: List[float] = betterproto.double_field(1)


@dataclass
class FluxLine(betterproto.Message):
    port: "InputPort" = betterproto.message_field(1)
    amp_factor: float = betterproto.double_field(2)
    offset: float = betterproto.double_field(3)


@dataclass
class IQMixerIn(betterproto.Message):
    i: "InputPort" = betterproto.message_field(1)
    q: "InputPort" = betterproto.message_field(2)
    lo_frequency: float = betterproto.double_field(3)


@dataclass
class IQMixerOut(betterproto.Message):
    i: "OutputPort" = betterproto.message_field(1)
    q: "OutputPort" = betterproto.message_field(2)
    lo_frequency: float = betterproto.double_field(3)


@dataclass
class QubitProperties(betterproto.Message):
    frequency: float = betterproto.double_field(1)
    anharmonicity: float = betterproto.double_field(2)
    t1: float = betterproto.double_field(3)
    t2: float = betterproto.double_field(4)


@dataclass
class AnalogFrontend(betterproto.Message):
    amp_factor: float = betterproto.double_field(1)


@dataclass
class FixedFrequencyQubit(betterproto.Message):
    pass


@dataclass
class TunableFrequencyQubit(betterproto.Message):
    flux_line: "FluxLine" = betterproto.message_field(1)


@dataclass
class Qubit(betterproto.Message):
    properties: "QubitProperties" = betterproto.message_field(1)
    i_q_mixer: "IQMixerIn" = betterproto.message_field(2)
    analog_frontend: "AnalogFrontend" = betterproto.message_field(3)
    fixed_frequency_qubit: "FixedFrequencyQubit" = betterproto.message_field(
        4, group="type"
    )
    tunable_frequency_qubit: "TunableFrequencyQubit" = betterproto.message_field(
        5, group="type"
    )


@dataclass
class InputPort(betterproto.Message):
    controller: str = betterproto.string_field(1)
    id: int = betterproto.uint32_field(2)


@dataclass
class OutputPort(betterproto.Message):
    controller: str = betterproto.string_field(1)
    id: int = betterproto.uint32_field(2)


@dataclass
class Error(betterproto.Message):
    type: str = betterproto.string_field(1)
    stack: str = betterproto.string_field(2)


@dataclass
class DriveResonator(betterproto.Message):
    pass


@dataclass
class ReadoutResonator(betterproto.Message):
    i_q_mixer: "IQMixerOut" = betterproto.message_field(1)


@dataclass
class Resonator(betterproto.Message):
    frequency: float = betterproto.double_field(1)
    i_q_mixer: "IQMixerIn" = betterproto.message_field(2)
    analog_frontend: "AnalogFrontend" = betterproto.message_field(3)
    lossrate: float = betterproto.double_field(4)
    drive_resonator: "DriveResonator" = betterproto.message_field(5, group="type")
    readout_resonator: "ReadoutResonator" = betterproto.message_field(6, group="type")


@dataclass
class CapacitiveCoupler(betterproto.Message):
    g: "InputPort" = betterproto.message_field(1)
    amp_factor: float = betterproto.double_field(2)
