You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mahout.apache.org by "viiccwen (via GitHub)" <gi...@apache.org> on 2026/04/08 13:01:03 UTC

[I] benchmark_latency.py and benchmark_throughput.py allow basis/angle selections without cross-framework encoding parity [mahout]

viiccwen opened a new issue, #1252:
URL: https://github.com/apache/mahout/issues/1252

   # [Bug] benchmark files (latency, throughput) allow basis/angle selections without cross-framework encoding parity
   
   ## Problem
   
   The main cross-framework benchmark scripts accept:
   
   - `--encoding-method amplitude`
   - `--encoding-method angle`
   - `--encoding-method basis`
   
   But only the Mahout leg actually uses the selected encoding method.
   
   The PennyLane and Qiskit legs are still hard-coded to amplitude-style state preparation, so a run such as:
   
   ```bash
   uv run --project qdp/qdp-python python qdp/qdp-python/benchmark/benchmark_throughput.py \
     --frameworks mahout,pennylane \
     --encoding-method basis
   ```
   
   does **not** produce a fair basis benchmark.
   
   ## Evidence
   
   - `qdp/qdp-python/benchmark/benchmark_throughput.py`
     - Mahout path uses `.encoding(encoding_method)`
     - PennyLane path uses `qml.AmplitudeEmbedding(...)`
     - Qiskit path uses `qc.initialize(...)`
   - `qdp/qdp-python/benchmark/benchmark_latency.py`
     - Mahout path uses `.encoding(encoding_method)`
     - PennyLane path uses `qml.AmplitudeEmbedding(...)`
     - Qiskit paths use `qc.initialize(...)` / `Statevector(...)`
   
   ## Why this matters
   
   This makes the benchmark output potentially misleading:
   
   - Mahout may run `basis` or `angle`
   - competitor frameworks still run amplitude-style preparation
   - the script still prints a single comparison table as if all legs measured the same workload
   
   That is a benchmark validity bug, not just a docs problem.
   
   ## Proposed fix
   
   Short term:
   
   - reject non-amplitude cross-framework combinations
   - allow `angle` / `basis` only for Mahout-only runs
   - update benchmark docs/examples to state that cross-framework parity currently exists only for `amplitude`
   
   Longer term:
   
   - add true `angle` / `basis` parity for competitor frameworks where semantics can be matched reliably


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@mahout.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] benchmark files (latency, throughput) allow basis/angle selections without cross-framework encoding parity [mahout]

Posted by "guan404ming (via GitHub)" <gi...@apache.org>.
guan404ming closed issue #1252: [Bug] benchmark files (latency, throughput) allow basis/angle selections without cross-framework encoding parity
URL: https://github.com/apache/mahout/issues/1252


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] benchmark files (latency, throughput) allow basis/angle selections without cross-framework encoding parity [mahout]

Posted by "400Ping (via GitHub)" <gi...@apache.org>.
400Ping commented on issue #1252:
URL: https://github.com/apache/mahout/issues/1252#issuecomment-4230991451

   @viiccwen you wanna take a stab at this since there's no other contributors want to do it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] benchmark files (latency, throughput) allow basis/angle selections without cross-framework encoding parity [mahout]

Posted by "viiccwen (via GitHub)" <gi...@apache.org>.
viiccwen commented on issue #1252:
URL: https://github.com/apache/mahout/issues/1252#issuecomment-4230996204

   > @viiccwen you wanna take a stab at this since there's no other contributors want to do it?
   
   Sure, I'll take this one after 14 Apr.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug] benchmark files (latency, throughput) allow basis/angle selections without cross-framework encoding parity [mahout]

Posted by "viiccwen (via GitHub)" <gi...@apache.org>.
viiccwen commented on issue #1252:
URL: https://github.com/apache/mahout/issues/1252#issuecomment-4206423683

   @guan404ming, @rich7420 IMO, we should restrict first (only allow fair comparison), and extends more encoding method to Pennylane & Qiskit, WDYT?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@mahout.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org