What is Qumat in Apache Mahout and which quantum backends does it support?

Updated

Qumat is Apache Mahout's high-level Python library for writing quantum circuits once and running them on Qiskit, Cirq, or Amazon Braket through a single unified API. You switch backends by changing a config value rather than rewriting circuit code, and the same circuit can target simulators or real quantum hardware. It requires Python 3.10+ and installs from PyPI with pip install qumat.

What Qumat does

Qumat sits above the backend SDKs. You build a circuit from standard and parameterized gates, then execute it on whichever backend your configuration selects. The library's current release, Qumat 0.6, adds first-class AMD ROCm support and faster zero-copy GPU paths, according to the project site.

Supported backends

Backend How it's selected What runs
Qiskit Config value Simulators or real hardware
Cirq Config value Simulators or real hardware
Amazon Braket Config value Simulators or real hardware

The key design point: the circuit definition stays the same across all three. Only the backend configuration changes.

Supported gates

Qumat covers both fixed and parameterized gates:

  • Standard gates: Hadamard, Pauli, CNOT, Toffoli, SWAP
  • Rotation gates: with parameter binding for variational circuits

Parameter binding matters for variational algorithms, where gate angles are tuned during training rather than fixed at circuit construction. You define the circuit structure once and bind new parameter values per run.

How the backend switch works in practice

The workflow is:

  1. Install: pip install qumat on Python 3.10 or newer.
  2. Build the circuit: compose standard and parameterized gates into a circuit object.
  3. Set the backend: choose Qiskit, Cirq, or Amazon Braket in configuration.
  4. Execute: run on a simulator or submit to real hardware.

The expected result is the same circuit executed on your chosen backend without edits to the circuit code. The common pitfall is assuming backend parity is automatic for every feature — gate coverage and hardware availability differ by provider, so verify your specific gate set and target device before relying on a straight swap.

Where Qumat fits in Mahout today

Mahout's current focus is quantum machine learning in Python, built on two components: Qumat for circuits and QDP (Quantum Data Plane) for data encoding. QDP is a separate, GPU-accelerated engine that constructs quantum state vectors directly in GPU memory instead of simulating state-preparation circuits, with six encodings (amplitude, angle, basis, phase, IQP, IQP-Z) across NVIDIA CUDA and AMD ROCm.

The earlier Mahout Classic codebase (Samsara and MapReduce) is in maintenance mode; the community's active work is on Qumat and QDP. If you arrived at mahout.apache.org expecting the classic scalable-ML stack, note that the project has moved toward quantum ML.

When Qumat is the right choice

Choose Qumat if you want to prototype variational or gate-based circuits and compare behavior across Qiskit, Cirq, and Braket without maintaining three codebases. It is less suitable if you need deep provider-specific features that the unified API does not expose, or if you are maintaining legacy Mahout Classic workloads — those remain in maintenance mode rather than active development.