ryankert01 commented on code in PR #840:
URL: https://github.com/apache/mahout/pull/840#discussion_r2698115661


##########
qdp/qdp-python/benchmark/benchmark_e2e.py:
##########
@@ -91,7 +91,12 @@ def generate_data(n_qubits, n_samples):
 
     # Generate all data at once
     np.random.seed(42)
-    all_data = np.random.rand(n_samples, dim).astype(np.float64)
+    if encoding_method == "basis":
+        # Basis encoding: single index per sample
+        all_data = np.random.randint(0, dim, size=(n_samples, 
1)).astype(np.float64)
+    else:
+        # Amplitude encoding: full vectors
+        all_data = np.random.rand(n_samples, dim).astype(np.float64)

Review Comment:
   Can this be a shared utility function that can be used on multiple benchmark?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to