qgym.envs.scheduling.scheduling_dataclasses module

This module contains dataclasses used in the Scheduling environment.

class qgym.envs.scheduling.scheduling_dataclasses.CircuitInfo(encoded, names, acts_on, legal, dependencies, schedule, blocking_matrix)[source]

Bases: object

Info of the circuit of the current episode of Scheduling environment.

acts_on: ndarray[Any, dtype[int32]]
blocking_matrix: ndarray[Any, dtype[int32]]
dependencies: ndarray[Any, dtype[int32]]
encoded: list[Gate]
legal: ndarray[Any, dtype[int8]]
names: ndarray[Any, dtype[int32]]
reset(circuit, utils)[source]

Reset the object.

To be used in the reset function of the Scheduling environment.

Return type:

CircuitInfo

Returns:

Self.

schedule: ndarray[Any, dtype[int32]]
class qgym.envs.scheduling.scheduling_dataclasses.GateInfo(cycle_length, not_in_same_cycle, exclude=0, exclude_next_cycle=False)[source]

Bases: object

Info of a specific gate used in the Scheduling environment.

cycle_length: int
exclude: int = 0
exclude_next_cycle: bool = False
not_in_same_cycle: set[int]
reset()[source]

Reset the object.

To be used in the reset function of the Scheduling environment.

Return type:

GateInfo

Returns:

Self.

class qgym.envs.scheduling.scheduling_dataclasses.SchedulingUtils(circuit_generator, rulebook, gate_encoder)[source]

Bases: object

Utils used in the Scheduling environment.

circuit_generator: CircuitGenerator
gate_encoder: GateEncoder
rulebook: CommutationRulebook