rich7420 commented on code in PR #649:
URL: https://github.com/apache/mahout/pull/649#discussion_r2572967154


##########
qdp/qdp-python/src/lib.rs:
##########
@@ -0,0 +1,58 @@
+use pyo3::prelude::*;
+use pyo3::exceptions::PyRuntimeError;
+use qdp_core::QdpEngine as CoreEngine;
+
+/// PyO3 wrapper for QdpEngine
+///
+/// Provides Python bindings for GPU-accelerated quantum state encoding.
+#[pyclass]
+struct QdpEngine {
+    engine: CoreEngine,
+}
+
+#[pymethods]
+impl QdpEngine {
+    /// Initialize QDP engine on specified GPU device
+    ///
+    /// Args:
+    ///     device_id: CUDA device ID (typically 0)
+    ///
+    /// Returns:
+    ///     QdpEngine instance
+    ///
+    /// Raises:
+    ///     RuntimeError: If CUDA device initialization fails
+    #[new]
+    fn new(device_id: usize) -> PyResult<Self> {

Review Comment:
   wow the part of `if self.consumed` is so good.



-- 
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