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

# SamplexItem

*class* `SamplexItem(circuit, samplex, *, samplex_arguments=None, shape=None, chunk_size=None)`

[GitHub](https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.49/qiskit_ibm_runtime/quantum_program/quantum_program.py#L136-L208)

Bases: [`QuantumProgramItem`](/docs/api/qiskit-ibm-runtime/quantum-program-quantum-program-item "qiskit_ibm_runtime.quantum_program.quantum_program.QuantumProgramItem")

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

**Parameters**

- **circuit** (*QuantumCircuit*) – The circuit to be executed.
- **samplex** (*Samplex*) – A samplex to draw random parameters for the circuit.
- **samplex\_arguments** (*dict\[str, Any] | None*) – 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** (*tuple\[int, ...] | None*) – 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** (*int | None*) – 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

### shape

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

## Methods

### size

`size()`

[GitHub](https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.49/qiskit_ibm_runtime/quantum_program/quantum_program.py#L72-L74)

The total number elements in this item; the product of the entries of [`shape`](#qiskit_ibm_runtime.quantum_program.SamplexItem.shape "qiskit_ibm_runtime.quantum_program.SamplexItem.shape").

**Return type**

int
