Skip to main content
IBM Quantum Platform

qiskit_noise_learning.aer_executor.inline_samplexes

qiskit_noise_learning.aer_executor.inline_samplexes(program: QuantumProgram, omit: list[int] | None = None, rng: Generator | None = None) → QuantumProgram

GitHub

Return a new QuantumProgram with SamplexItems resolved in-place.

Each SamplexItem whose index is not in omit is replaced by a CircuitItem via inline_samplex_item(). The passthrough data produced by sampling (e.g. measurement_flips.* arrays) is stored in the returned program’s passthrough_data under the key "inlined", keyed by the original item index (as a string). Any existing passthrough_data on the input program is preserved alongside the new "inlined" entry.

Parameters

  • program – The quantum program to process.
  • omit – Indices of items to leave as SamplexItems. All other SamplexItems are inlined. CircuitItems are always left unchanged regardless of this list.
  • rng – Random number generator passed to inline_samplex_item(). If None, np.random.default_rng() is used.

Returns

A new QuantumProgram with the same shots, noise maps, and measurement level as the input, but with the selected SamplexItems replaced by CircuitItems.

Was this page helpful?
Report a bug, typo, or request content on GitHub.