Skip to content

Conversation

@400Ping
Copy link
Contributor

@400Ping 400Ping commented Dec 25, 2025

Purpose of PR

DLPack output was coming back as a flat 1-D tensor (n_samples * 2^n_qubits), so the benchmark assert expected 2-D [n_samples, state_len] was failing. Added a defensive reshape to view the tensor as [n_samples, state_len] before asserting, so benchmarks can continue even when the producer flattens the DLPack shape.

Error log:

$ python ./benchmark/benchmark_e2e.py --frameworks all --samples 1000
Generating 1000 samples of 16 qubits...
  Generated 1000 samples
  Parquet: 500.34 MB, Arrow IPC: 500.00 MB

======================================================================
E2E BENCHMARK: 16 Qubits, 1000 Samples
======================================================================

[PennyLane] Full Pipeline (Disk -> GPU)...
  IO Time: 0.9895 s
/home/jay/work/mahout/qdp/./benchmark/benchmark_e2e.py:237: UserWarning: Casting complex values to real discards the imaginary part (Triggered internally at /pytorch/aten/src/ATen/native/Copy.cpp:309.)
  state_gpu = state_cpu.to("cuda", dtype=torch.float32)
  Total Time: 1.4611 s

[Qiskit] Full Pipeline (Disk -> GPU)...
  IO Time: 0.9268 s
    Processed 40/40 vectors...
  Total Time: 68.6920 s

[Mahout-Parquet] Full Pipeline (Parquet -> GPU)...
  Parquet->GPU (IO+Encode): 0.7504 s
  DLPack conversion: 0.0001 s
Traceback (most recent call last):
  File "/home/jay/work/mahout/qdp/./benchmark/benchmark_e2e.py", line 450, in <module>
    t_mahout_parquet, mahout_parquet_all_states = run_mahout_parquet(
                                                  ^^^^^^^^^^^^^^^^^^^
  File "/home/jay/work/mahout/qdp/./benchmark/benchmark_e2e.py", line 282, in run_mahout_parquet
    assert gpu_batched.shape == (n_samples, state_len), (

Related Issues or PRs

Closes #759

Changes Made

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Test
  • CI/CD pipeline
  • Other

Breaking Changes

  • Yes
  • No

Checklist

  • Added or updated unit tests for all changes
  • Added or updated documentation for all changes
  • Successfully built and ran all unit tests or manual tests locally
  • PR title follows "MAHOUT-XXX: Brief Description" format (if related to an issue)
  • Code follows ASF guidelines

guan404ming and others added 8 commits November 27, 2025 00:38
…pache#654)

* Add mypy for static type checking

Added mypy static type checking to pre-commit hooks.

* pre-commit hook: fix

Signed-off-by: ryankert01 <ryan980053@gmail.com>

* update version and clean-up strings

Signed-off-by: ryankert01 <ryan980053@gmail.com>

---------

Signed-off-by: ryankert01 <ryan980053@gmail.com>
* Implement T-gate (π/8 gate) across all backends

- Add apply_t_gate() method to QuMat class with validation
- Implement T-gate support in Qiskit, Cirq, and Amazon Braket backends
- Restore T-gate documentation in basic_gates.md to match implementation

Fixes apache#681

* Refine T-gate docs and add coverage

* chore: satisfy pre-commit hooks
* docs: add missing QuMat APIs

* clarify T-gate usage and parameter description

* alignment docs/api.md

Co-authored-by: 江家瑋 <36886416+JiangJiaWei1103@users.noreply.github.com>

---------

Co-authored-by: 江家瑋 <36886416+JiangJiaWei1103@users.noreply.github.com>
Fixes apache#707 

(Trying to find some simple issues to help with while hopefully finally finding time to toy with the code over Christmas.)
…d of None (apache#757)

* fix the bug

* Update documentation to reflect draw_circuit() returns value instead of printing
@400Ping
Copy link
Contributor Author

400Ping commented Dec 28, 2025

cc @rich7420 @guan404ming

@rich7420
Copy link
Contributor

plz resolve the conflict.

@400Ping 400Ping force-pushed the bug/qdp-benchmark_e2e branch from 7a78a02 to c9658f1 Compare December 29, 2025 12:08
Signed-off-by: 400Ping <fourhundredping@gmail.com>
@400Ping 400Ping force-pushed the bug/qdp-benchmark_e2e branch from 7d378ea to 7ed9cda Compare December 29, 2025 12:13
@400Ping
Copy link
Contributor Author

400Ping commented Dec 29, 2025

@rich7420 done.

@400Ping 400Ping closed this Dec 30, 2025
@400Ping 400Ping reopened this Dec 30, 2025
@400Ping 400Ping closed this Dec 30, 2025
@400Ping 400Ping deleted the bug/qdp-benchmark_e2e branch December 30, 2025 13:48
@400Ping
Copy link
Contributor Author

400Ping commented Dec 30, 2025

my commits got messed up, will reopen another one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants