How Qumat and QDP Differ in Apache Mahout, and When to Use Each
Updated
Qumat and QDP solve different problems in the same quantum machine learning pipeline. Qumat is a Python library for building quantum circuits once and running them on Qiskit, Cirq, or Amazon Braket through a single API. QDP (Quantum Data Plane) is a GPU-accelerated engine that turns classical data into quantum state vectors directly in GPU memory, skipping state-preparation circuit simulation. Choose Qumat when your bottleneck is circuit portability across backends; choose QDP when your bottleneck is loading classical data into quantum form. They are designed to be used together, not as alternatives.
The core difference in one table
| Dimension | Qumat | QDP (Quantum Data Plane) |
|---|---|---|
| Role in the pipeline | Circuit construction and execution | Classical-to-quantum data encoding |
| Main input | Gate definitions (standard and parameterized) | Classical data (e.g., images, feature vectors) |
| Main output | Executed circuits on a chosen backend | State vectors in GPU memory |
| Backend scope | Qiskit, Cirq, Amazon Braket; simulators or real hardware | NVIDIA CUDA and AMD ROCm GPUs |
| Switching mechanism | Change a config value, not circuit code | Same API across CUDA and ROCm |
| Interop | Python 3.10+, installable via pip install qumat |
Zero-copy DLPack handoff to/from PyTorch, NumPy, TensorFlow |
| Typical bottleneck addressed | Rewriting circuits per backend | Data-loading latency in quantum ML training |
What Qumat does
Qumat is a high-level Python library for quantum computing. You build a circuit with standard gates (Hadamard, Pauli, CNOT, Toffoli, SWAP) and rotation gates with parameter binding for variational circuits, then execute it on Qiskit, Cirq, or Amazon Braket. The key property is portability: switching backends is a config change, not a rewrite of your circuit code. It runs on simulators or real quantum hardware.
Use Qumat when:
- You want to prototype a variational circuit and compare results across more than one backend.
- You need to move from a simulator to real hardware without changing circuit definitions.
- Your team standardizes on Python and wants a pip-installable dependency (
pip install qumat, Python 3.10+).
What QDP does
QDP removes the data-loading bottleneck in quantum machine learning. Instead of simulating a state-preparation circuit to encode classical data, it constructs the state vector directly in GPU memory and hands it to your training or kernel pipeline. It supports six encodings — amplitude, angle, basis, phase, IQP, and IQP-Z — with the same coverage on every GPU backend. Native CUDA kernels and hand-written Triton kernels for ROCm are selectable from the same API, and zero-copy DLPack paths connect to PyTorch, NumPy, and TensorFlow without a host round trip.
Use QDP when:
- Your pipeline spends significant time encoding classical data (images, feature vectors) into quantum states.
- You train on NVIDIA or AMD GPUs and want the same encoding coverage on both.
- You need the encoded state to flow into PyTorch or NumPy tensors without copying through host memory.
How they fit together
A quantum ML workflow typically has two stages: prepare data as quantum states, then run circuits over them. QDP handles the first stage on GPU; Qumat handles the second across backends. For example, an IQP-encoded image dataset produced by QDP can feed a variational circuit defined and executed through Qumat. The project ships benchmarks for exactly this kind of workload, including SVHN IQP training, quantum kernel SVM, and data-to-state latency, so you can check whether the encoding stage is your actual bottleneck before adopting QDP.
Which to start with
Start with Qumat if your immediate need is circuit portability or you are evaluating multiple backends. Start with QDP if profiling shows data encoding dominates your training time, or if you already have a circuit stack and only need faster state preparation. If you are building a full pipeline from scratch, Qumat is the natural entry point because circuit code is where most workflows begin; add QDP once encoding latency becomes measurable.
Practical notes
- Qumat 0.6 added first-class AMD ROCm support, six QDP encodings with parity across CUDA and ROCm, and faster zero-copy GPU paths.
- The earlier Mahout Classic codebase (Samsara and MapReduce) is in maintenance mode; current community work is on Qumat and QDP.
- Both components are Apache-licensed and part of the Apache Software Foundation.