Skip to main content
IBM Quantum Platform
번역 정보

이 페이지의 추가 언어 번역이 곧 제공될 예정입니다.

QuantumProgramItem

class samplomatic.quantum_program.QuantumProgramItem(circuit: QuantumCircuit, chunk_size: int | None = None)

GitHub

Bases: ABC

An item of a QuantumProgram.

Each item has a shape that determines the number of circuit executions. This shape is computed by broadcasting the extrinsic shapes of all input arrays. Input arrays have both extrinsic axes (leftmost, defining the sweep grid) and intrinsic axes (rightmost, determined by the data type). For example, circuit_arguments for a circuit with n parameters has intrinsic shape (n,), so an array of shape (5, 3, n) has extrinsic shape (5, 3).

Output arrays should follow the same convention: extrinsic axes match the item’s shape, and intrinsic axes are determined by the output type (e.g., (num_shots, creg_size) for classical register data).

Parameters

  • circuit – The circuit to be executed.
  • 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

칼럼 1
칼럼 2
shapeThe extrinsic shape of this item, i.e. the broadcasted extrinsic shapes of all inputs.

Methods Summary

칼럼 1
칼럼 2
size()Return the total number elements in this item.

Attributes Documentation

shape

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

Methods Documentation

size

size() → int

GitHub

Return the total number elements in this item.

The size is calculated as the product of the entries of shape.

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.