qiskit_noise_learning.circuit_generator.ExecutorDataMapper
class qiskit_noise_learning.circuit_generator.ExecutorDataMapper(item_sequence_indices: list[list[int]], item_creg_names: list[list[str]], item_clbit_qubit_idxs: list[dict[str, ndarray[int]]], instruction_sequences: list[InstructionSequence], num_randomizations: int, randomization_multipliers: list[int] | None = None, shots: int | None = None, fidelity_model: LinearMap[Hashable, FidelityIndex] | None = None, paths: list[Path] | None = None, relations: set[tuple[int, int]] | None = None)
Bases: object
Map executor results into standard results.
As instruction sequences with similar structure are generated together with a single template circuit and different samplex arguments, the order of input sequences to ExecutorCircuitGenerator.generate() is not preserved during execution. This class contains properties to format the results of a qiskit_ibm_runtime.results.QuantumProgramResult to the order of the input sequences.
Parameters
- item_sequence_indices – For each program item, an ordered list of instruction sequence indices. Position in the list corresponds to the configuration index within the result item.
- item_creg_names – The name of classical registers in each program item.
- item_clbit_qubit_idxs – For each program item, a dictionary from creg names to the physical qubit index measured into each of their classical bits, in classical bit order.
- instruction_sequences – The instruction sequences associated with the data.
- num_randomizations – The number of randomizations used per experiment.
- randomization_multipliers – Per-sequence randomization multipliers, parallel to
instruction_sequences, so that sequenceiusesnum_randomizationstimes entryirandomizations. - shots – The number of shots per randomization.
- fidelity_model – The fidelity model used in the experiment.
- paths – The analysis paths.
- relations – Path-to-sequence relations.
__init__
__init__(item_sequence_indices: list[list[int]], item_creg_names: list[list[str]], item_clbit_qubit_idxs: list[dict[str, ndarray[int]]], instruction_sequences: list[InstructionSequence], num_randomizations: int, randomization_multipliers: list[int] | None = None, shots: int | None = None, fidelity_model: LinearMap[Hashable, FidelityIndex] | None = None, paths: list[Path] | None = None, relations: set[tuple[int, int]] | None = None)
Methods
Kolumne „ 1 “ | Kolumne „ 2 “ |
|---|---|
__init__(item_sequence_indices, ...[, ...]) |
Attributes
Kolumne „ 1 “ | Kolumne „ 2 “ |
|---|---|
fidelity_model | The fidelity model used in the experiment. |
instruction_sequences | The instruction sequences corresponding to the sequence indices in the sequence map. |
item_clbit_qubit_idxs | A per-program-item map from creg name to measured qubit indices. |
item_creg_names | List of names of the classical registers contained in the results. |
item_sequence_indices | Per program item, the instruction sequence indices corresponding to each config. |
num_randomizations | The base number of randomizations used per experiment. |
paths | The analysis paths. |
randomization_multipliers | Per-sequence randomization multipliers, or None if unspecified. |
relations | Path-to-sequence relations. |
shots | The number of shots per randomization, or None if unspecified. |
item_sequence_indices
Per program item, the instruction sequence indices corresponding to each config.
item_creg_names
List of names of the classical registers contained in the results.
The list at a given index corresponds to names expected in the data of the qiskit_ibm_runtime.results.QuantumProgramResult at the same index.
item_clbit_qubit_idxs
Type: list[dict[str, ndarray[int]]]
A per-program-item map from creg name to measured qubit indices.
Entry j of a register’s array is the physical qubit index measured into its classical bit j.
instruction_sequences
Type: list
The instruction sequences corresponding to the sequence indices in the sequence map.
num_randomizations
Type: int
The base number of randomizations used per experiment.
Where randomization_multipliers is given, sequence i uses this count times entry i of those multipliers.
randomization_multipliers
Per-sequence randomization multipliers, or None if unspecified.
Entry i scales num_randomizations for instruction sequence i.
shots
fidelity_model
Type: LinearMap[Hashable, FidelityIndex] | None
The fidelity model used in the experiment.