qat.backend.passes.analysis module
- class IntermediateFrequencyAnalysis(model)
Bases:
AnalysisPassAdapted from
qat.purr.backends.live.LiveDeviceEngine.build_baseband_frequencies().Retrieves intermediate frequencies for all physical channels if they exist, and validates that pulse channels that share the same physical channel cannot have differing fixed frequencies. This pass should always follow a
PartitionByPulseChannel, as information of pulse channels are needed.Instantiate the pass with a hardware model.
- Parameters:
model¶ (
PhysicalHardwareModel) – The hardware model.
- run(ir, res_mgr, *args, **kwargs)
- Parameters:
ir¶ (
PartitionedIR) – The list of instructions stored in anInstructionBuilder.res_mgr¶ (
ResultManager) – The result manager to store the analysis results.
- Return type:
- class IntermediateFrequencyResult(frequencies)
Bases:
ResultInfoMixin-
frequencies:
Dict[PhysicalChannel,float]
-
frequencies:
- class PulseChannelTimeline(samples=<factory>, start_positions=<factory>, end_positions=<factory>)
Bases:
objectTimeline analysis for instructions on a pulse channel.
Imagine the timeline for a pulse channel, with an instruction that occurs over samples 3-7, i.e.,
samples: 0 1 2 [3 4 5 6 7] 8 9 10.
The start_position would be 3, the end_position 7, and the number of samples 5.
- Parameters:
-
end_positions:
ndarray[int]
-
samples:
ndarray[int]
-
start_positions:
ndarray[int]
- PydIntermediateFrequencyAnalysis
alias of
IntermediateFrequencyAnalysis
- PydIntermediateFrequencyResult
alias of
IntermediateFrequencyResult
- PydTimelineAnalysis
alias of
TimelineAnalysis
- PydTimelineAnalysisResult
alias of
TimelineAnalysisResult
- class TimelineAnalysis(model, target_data)
Bases:
AnalysisPassAnalyses the timeline of each pulse channel.
Takes the instruction list for each pulse channel retrieved from the the partitioned results, and calculates the timeline in units of samples (each sample takes time sample_time). It calculates the duration of each instruction in units of samples, and the start and end times of each instruction in units of samples.
Warning
The pass will assume that the durations of instructions are sanitised to the granularity of the channels. If instructions that do not meet the criteria are provided, it might produce incorrect timelines. This can be enforced used the
InstructionGranularitySanitisationpass.- Parameters:
model¶ (
PhysicalHardwareModel) – The hardware model that holds calibrated information on the qubits on the QPU.target_data¶ (
TargetData) – Target-related information.
- durations_as_samples(pulse_ch_id, durations)
Converts a list of durations into a number of samples.
- run(ir, res_mgr, *args, **kwargs)
- Parameters:
ir¶ (
PartitionedIR) – The list of instructions stored in anInstructionBuilder.res_mgr¶ (
ResultManager) – The result manager to store the analysis results.
- Return type:
- class TimelineAnalysisResult(target_map=<factory>, total_duration=0.0)
Bases:
ResultInfoMixinStores the timeline analysis for all pulse channels.
- Parameters:
target_map¶ (
dict[str,PulseChannelTimeline]) – The dictionary containing the timeline analysis for all pulse channels.
-
target_map:
dict[str,PulseChannelTimeline]
-
total_duration:
float= 0.0