Skip to main content
IBM Quantum Platform
Informationen zur Übersetzung

In Kürze folgen für diese Seite weitere Übersetzungen in andere Sprachen.

qiskit_noise_learning.circuit_generator.ExecutorCircuitGenerator

class qiskit_noise_learning.circuit_generator.ExecutorCircuitGenerator(gate_set: QiskitGateSet, creg_prefix: str = 'meas', local_clifford_ref_prefix: str = 'c', pass_manager: PassManager | None = None)

GitHub

Bases: CircuitGenerator[QuantumProgram, QuantumProgramResult]

A circuit generator that converts sequences of Qiskit gates into a samplex items.

Parameters

  • gate_set – The Qiskit gate set that this generator constructs against.
  • creg_prefix – The prefix assigned to all creg names used in instruction sequence measurements. Defaults to "meas".
  • local_clifford_ref_prefix – The prefix assigned to all local Clifford parameter references in template circuits. Defaults to "c".
  • pass_manager – An optional PassManager to apply to all template circuits produced by ExecutorCircuitGenerator.generate(). Pass managers should not modify the details of the existing circuit (e.g. re-order qubits or rename measurements).

Pure preparation gates (those with prep_idxs and no operations) at the beginning of an instruction sequence are not explicitly included as a box in the template circuit. Instead, any single-qubit gates (e.g. basis rotation) associated with preparation are absorbed into the subsequent box’s left-dressing.

__init__

__init__(gate_set: QiskitGateSet, creg_prefix: str = 'meas', local_clifford_ref_prefix: str = 'c', pass_manager: PassManager | None = None)


Methods

Kolumne „ 1 “
Kolumne „ 2 “
__init__(gate_set[, creg_prefix, ...])
collect(result)Coerce data from a specific execution framework into a canonical form.
generate(experiment)Generate a new experimental task from the provided experiment.
generate_samplex_item(instruction_sequences, ...)Generate a samplex item from instruction sequences with the same structure.
generate_samplex_items(...)Generate samplex items from instruction sequences.
partition(sequences)Partition the positions of instruction sequences that can share a generation output.

Attributes

Kolumne „ 1 “
Kolumne „ 2 “
gate_setThe gate set this generator constructs against.

gate_set

Type: QiskitGateSet

The gate set this generator constructs against.

collect

static collect(result)

Coerce data from a specific execution framework into a canonical form.

generate

generate(experiment)

Generate a new experimental task from the provided experiment.

generate_samplex_items

generate_samplex_items(instruction_sequences: list[InstructionSequence], num_randomizations: int) → tuple[list[SamplexItem], ExecutorDataMapper]

Generate samplex items from instruction sequences.

Parameters

  • instruction_sequences – The instruction sequences to generate circuits for.
  • num_randomizations – The number of randomizations per sequence.

Returns

A tuple of samplex items and a data mapper.

generate_samplex_item

generate_samplex_item(instruction_sequences: list[InstructionSequence], num_randomizations: int) → tuple[SamplexItem, list[str], dict[str, ndarray[int]]]

Generate a samplex item from instruction sequences with the same structure.

Every twirled box must be left-dressed: the accumulated PartialPauliPermutation is emitted as each box’s left-dressing local Clifford, so a right-dressed twirl is not supported and raises.

Parameters

  • instruction_sequences – The similar instruction sequences to generate.
  • num_randomizations – The number of randomizations per sequence.

Returns

A samplex item where the order of the arguments correspond to the order of instruction_sequences, an ordered list of creg names, and a dictionary mapping creg names to the physical qubit index measured into each of their classical bits, in classical bit order.

Raises

  • ValueError – If instruction_sequences is empty.
  • ValueError – If any of the instruction sequences is not complete.
  • ValueError – If any of the instruction sequences have different structure.
  • ValueError – If a twirled box is not left-dressed.
War diese Seite hilfreich?
Melden Sie auf GitHub einen Fehler, einen Tippfehler oder fordern Sie Inhalte an.