[Bug] QDP CUDA file APIs cannot load documented PyTorch tensor files

Open
#1,467 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@gautham0104-neitizen is already working on this.

Since Oct 14, 2026.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python, pytorch, rust

Research direction

Start by tracing the qumat-qdp native extension build and qdp-core's optional pytorch feature, then reproduce the failure through QdpEngine.encode and QuantumDataLoader with the documented .pt example. Check how the standard Python package is built and how existing feature-dependent readers are tested. Done means local .pt and .pth files work through both entry points while remote object-storage behavior remains unchanged.

Written by the indexing model from the issue text.

Description

bug docs enhancement good-first-issue
What

The QDP Python documentation lists .pt and .pth as supported file inputs for the CUDA route and the Rust-backed QuantumDataLoader. A default qumat-qdp build cannot read those files because the native extension is built without qdp-core's optional pytorch feature.

Steps to reproduce:

from pathlib import Path

import torch
from qumat_qdp import QdpEngine, QuantumDataLoader

path = Path("vectors.pt")
torch.save(torch.eye(4, dtype=torch.float64), path)

QdpEngine().encode(path, num_qubits=2, encoding_method="amplitude")

list(
    QuantumDataLoader()
    .backend("rust")
    .qubits(2)
    .batches(1, size=2)
    .source_file(str(path))
)

Both documented entry points fail with an error containing:

Not implemented: PyTorch reader requires the 'pytorch' feature

Actual result: Local .pt and .pth inputs fail in both APIs with a runtime error from the disabled native reader.

Expected result: Local .pt and .pth files work with the standard Python package installation and return CUDA-backed quantum tensors. Remote object-storage paths continue to work when remote I/O is enabled.

This issue is limited to PyTorch tensor files. Compressed Feather input is tracked separately because it fails in the Arrow IPC reader.

Dominant language
Rust
Stars
2.3k
Forks
1k
Avg merge
2d 20h
Merged PRs (30d)
7

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/mahout

All issues in apache/mahout

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.