---
title: SamplexItem (latest version)
description: API reference for samplomatic.quantum_program.SamplexItem in the latest version of samplomatic
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/samplomatic/auto/quantum-program-samplex-item
---

# SamplexItem

*class* `samplomatic.quantum_program.SamplexItem(circuit: QuantumCircuit, samplex: Samplex, *, samplex_arguments: dict[str, Any] | None = None, shape: tuple[int, ...] | None = None, chunk_size: int | None = None)`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/quantum_program/quantum_program.py#L135-L207)

Bases: [`QuantumProgramItem`](/docs/api/samplomatic/auto/quantum-program-quantum-program-item "samplomatic.quantum_program.quantum_program.QuantumProgramItem")

An item of a [`QuantumProgram`](/docs/api/samplomatic/auto/quantum-program-quantum-program "samplomatic.quantum_program.QuantumProgram") containing a circuit and samplex to feed it arguments.

**Parameters**

- **circuit** – The circuit to be executed.
- **samplex** – A samplex to draw random parameters for the circuit.
- **samplex\_arguments** – A map from argument names to argument values for the samplex. Each argument array has intrinsic axes determined by its type (e.g., `parameter_values` has intrinsic shape `(n,)` for `n` parameters, while scalar inputs like `noise_scale` have intrinsic shape `()`). The extrinsic shapes of all arguments are broadcasted together following NumPy conventions.
- **shape** – A shape that the item’s extrinsic shape must be broadcastable to. Axes where `shape` exceeds the shape implicit in `samplex_arguments` enumerate independent randomizations.
- **chunk\_size** – The maximum number of bound circuits in each shot loop execution, or `None` to use a server-side heuristic to optimize speed. When not executing in a session, the server-side heuristic is always used and this value is ignored.

**Attributes Summary**

|                                                                                                           |                                                                                        |
| --------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [`shape`](#samplomatic.quantum_program.SamplexItem.shape "samplomatic.quantum_program.SamplexItem.shape") | The extrinsic shape of this item, i.e. the broadcasted extrinsic shapes of all inputs. |

**Attributes Documentation**

### shape

The extrinsic shape of this item, i.e. the broadcasted extrinsic shapes of all inputs.
