loom.eka.channel
Copyright (c) Entropica Labs Pte Ltd 2025.
Use, distribution and reproduction of this program in its source or compiled form is prohibited without the express written consent of Entropica Labs Pte Ltd.
- class loom.eka.channel.Channel(*args, **kwargs)[source]
Bases:
objectIdentifies information channels connecting the Circuit elements: examples are classical or quantum bit channels
Parameter
- type: ChannelType
The type of the channel: QUANTUM or CLASSICAL, default is QUANTUM
- label: str
The label of the channel, allowing it to be grouped in a user friendly way, E.g. can be “red”, “ancilla_qubit” or “my_favourite_qubit”
- id: str
The unique identifier of the channel
-
id:
str= FieldInfo(annotation=str, required=False, default_factory=<lambda>)
- is_classical()[source]
Check if the channel is a classical channel. :returns: True if the channel is a classical channel, False otherwise. :rtype: bool
- is_quantum()[source]
Check if the channel is a quantum channel.
- Returns:
True if the channel is a quantum channel, False otherwise.
- Return type:
bool
-
label:
Optional[str] = None
- classmethod set_default_label(v, info)[source]
Set the default label based on the type of the channel, according to the following scheme: ChannelType.QUANTUM: “data_qubit” ChannelType.CLASSICAL: “classical_bit”
- Return type:
str
-
type:
ChannelType= 'quantum'
- class loom.eka.channel.ChannelType(*values)[source]
Bases:
str,EnumThe type of the channel: QUANTUM or CLASSICAL More types should be added when we feel the need for it
- CLASSICAL = 'classical'
- QUANTUM = 'quantum'
- loom.eka.channel.create_default_label(channel_type)[source]
Creates a default label for the channel.
- Parameters:
channel_type (ChannelType) – The type of the channel: QUANTUM or CLASSICAL
- Returns:
The default label for the channel
- Return type:
str