Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions qdp/qdp-python/qumat_qdp/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ def __init__(
precision: str = "float32",
backend: str = "cuda",
) -> None:
"""Create a backend-selecting QDP engine facade.

:param device_id: GPU device ordinal to use.
:param precision: Numeric precision requested from the backend.
:param backend: Backend selector, either ``"cuda"``, ``"amd"``, or
``"triton_amd"``.
:raises ValueError: If ``backend`` is not supported.
"""
self.device_id = device_id
self.precision = precision
self.backend, self._engine_adapter = _select_engine_adapter(
Expand Down
10 changes: 10 additions & 0 deletions qdp/qdp-python/qumat_qdp/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ def __init__(
encoding_method: str = "amplitude",
seed: int | None = None,
) -> None:
"""Create a loader builder with default synthetic batching settings.

:param device_id: GPU device ordinal used by native and PyTorch backends.
:param num_qubits: Number of qubits in each encoded output state.
:param batch_size: Number of samples per emitted batch.
:param total_batches: Maximum number of batches to emit.
:param encoding_method: Encoding method name.
:param seed: Optional synthetic data seed.
:raises ValueError: If any initial setting is invalid.
"""
_validate_loader_args(
device_id=device_id,
num_qubits=num_qubits,
Expand Down
1 change: 1 addition & 0 deletions qdp/qdp-python/qumat_qdp/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,5 @@ def to_torch(self) -> Any:
return torch.from_dlpack(self)


#: Backward-compatible alias for :class:`QdpTensor`.
QuantumTensor = QdpTensor
Loading