qat.middleend.passes.legacy.analysis module
- class ActiveChannelResults(target_map=<factory>, unassigned=<factory>)
Bases:
ResultInfoMixin
Stores the active pulse channels in a task, which is defined by pulse channels that are acted on by a pulse or acquisition.
Results are stored as a map between pulse channels and the qubit they belong to. Rogue pulse channels are stored in the unassigned attribute. Various helper properties and methods can be used to fetch the complete lists of active pulse channels and qubits.
- from_qubit(qubit)
Returns the list of pulse channels that belong to a qubit.
- Return type:
list
[PulseChannel
]
- property physical_qubit_indices: set[int]
Returns a list of all active physical qubit indices.
-
target_map:
dict
[PulseChannel
,Qubit
]
- property targets: list[PulseChannel]
Returns a dictionary of all pulse channels with their full id as a key.
-
unassigned:
list
[PulseChannel
]
- class ActivePulseChannelAnalysis(model)
Bases:
AnalysisPass
Determines the set of pulse channels which are targeted by quantum instructions.
A pulse channel that has a pulse played at any time, or an acquisition is defined to be active. This pass is used to determine which pulse channels are required in compilation, and is used in subsequent passes to easily extract pulse channel properties, and is useful for not performing extra analysis on rogue channels picked up by
Synchronize
instructions.- run(ir, res_mgr, met_mgr, *args, **kwargs)
- Parameters:
ir¶ (
InstructionBuilder
) – The list of instructions stored in anInstructionBuilder
.res_mgr¶ (
ResultManager
) – The result manager to store the analysis results.
- Return type: