Skip to content
Open
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
13 changes: 10 additions & 3 deletions qdp/qdp-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@ See `qdp/qdp-python/TRITON_AMD_BACKEND.md` for Triton AMD setup and validation d
| `amplitude` | Normalize input as quantum amplitudes |
| `angle` | Map values to rotation angles (one per qubit) |
| `basis` | Encode integer as computational basis state |
| `iqp` | IQP-style encoding with entanglement |
| `iqp` | IQP-style encoding with full ZZ entanglement |
| `iqp-z` | IQP encoding with Z-only diagonal (no ZZ pairs) |
| `phase` | Per-qubit phase product state via H⊗P(x_k) |

Backend support boundary:
- CUDA (`QdpEngine`): `amplitude`, `angle`, `basis`, `iqp`
- AMD (`QdpEngine(..., backend="amd")`): `amplitude`, `angle`, `basis` (no `iqp` yet)
- CUDA (`QdpEngine`): `amplitude`, `angle`, `basis`, `iqp`, `iqp-z`, `phase`
Comment thread
ryankert01 marked this conversation as resolved.
- `phase` is currently only reachable on the CUDA path via host inputs
(Python list / NumPy / file / CPU torch tensor). The Python extension's
CUDA-tensor validation does not yet allowlist `phase`; cuda-resident
torch tensors must use `.cpu()` first when targeting `phase`. Tracked as
a follow-up.
- AMD (`QdpEngine(..., backend="amd")`): `amplitude`, `angle`, `basis`, `iqp`, `iqp-z`, `phase`

## Input Sources

Expand Down
9 changes: 5 additions & 4 deletions qdp/qdp-python/TRITON_AMD_BACKEND.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ Supported methods:
- `amplitude`
- `angle`
- `basis`

Not supported in the AMD route yet:
- `iqp` (currently CUDA backend only)
- `iqp` (full, with ZZ entanglement)
- `iqp-z` (Z-only diagonal, no ZZ pairs)
- `phase`

## Correctness tests

Expand All @@ -79,7 +79,8 @@ uv run --project qdp/qdp-python pytest -m rocm qdp/qdp-python/tests -q
```

Tests include:
- parity against Torch reference outputs (amplitude/angle/basis)
- parity against Torch reference outputs (amplitude/angle/basis/iqp)
- structural checks for `phase` (output is a unit-norm product state)
- optional parity against CUDA backend reference (when NVIDIA CUDA path is present)

## Baseline benchmark
Expand Down
Loading
Loading