PennyLane plugin for the Maestro quantum simulator by Qoro Quantum
Project description
pennylane-maestro
A PennyLane plugin for the Maestro quantum simulator by Qoro Quantum.
Drop-in replacement for default.qubit — one line change, same code, faster results.
# Before
dev = qp.device("default.qubit", wires=20)
# After — up to 20× faster
dev = qp.device("maestro.qubit", wires=20)
Why Maestro?
- Iterate Faster — Up to 20× faster statevector simulations for VQE/QAOA loops.
- Scale Up — Simulate 1000+ qubits using Maestro's optimized MPS backend.
- Sample from MPS — The only PennyLane MPS backend that supports shot-based sampling.
- GPU Ready — 64× faster than PennyLane GPU on MPS workloads via cuQuantum.
Installation
pip install pennylane-maestro
That's it. This installs pennylane (≥0.38) and qoro-maestro (≥0.2.8) automatically.
Quick Start
import pennylane as qp
import numpy as np
dev = qp.device("maestro.qubit", wires=2)
@qp.qnode(dev)
def circuit(theta):
qp.RX(theta, wires=0)
qp.CNOT(wires=[0, 1])
return qp.expval(qp.PauliZ(1))
print(circuit(np.pi / 4))
Performance
Benchmarked on PennyLane 0.44.1. Run
examples/benchmark_lightning_vs_maestro.pyto reproduce.
Statevector
| Qubits | default.qubit |
lightning.qubit |
maestro.qubit |
vs dq | vs lq |
|---|---|---|---|---|---|
| 20 | 977 ms | 115 ms | 45 ms | 22× | 2.6× |
| 22 | 4.31 s | 543 ms | 184 ms | 23× | 3.0× |
| 24 | 10.5 s | 2.36 s | 820 ms | 13× | 2.9× |
| 26 | DNF | 10.1 s | 3.56 s | ∞ | 2.8× |
MPS — Scaling to 1000+ Qubits
| Qubits | default.qubit |
default.tensor (quimb) |
maestro.qubit (MPS) |
vs quimb |
|---|---|---|---|---|
| 100 | OOM | 90 ms | 11 ms | 8× |
| 500 | OOM | 689 ms | 90 ms | 7.7× |
| 1000 | OOM | 1.96 s | 207 ms | 9.5× |
MPS Shot Sampling
🔥 Only Maestro supports this. Neither
default.tensornor Qiskit Aer MPS offer shot-based sampling through PennyLane.
| Qubits | maestro.qubit (MPS) |
Unique Samples |
|---|---|---|
| 100 | 259 ms | 10,000 |
| 500 | 1.22 s | 10,000 |
| 1000 | 2.43 s | 10,000 |
Backends
All backends are selected via keyword arguments — no code changes needed:
# CPU Statevector (default)
dev = qp.device("maestro.qubit", wires=20)
# MPS for 100+ qubits
dev = qp.device("maestro.qubit", wires=100,
simulation_type="MatrixProductState",
max_bond_dimension=256)
# Stabilizer for Clifford circuits
dev = qp.device("maestro.qubit", wires=1000,
simulation_type="Stabilizer")
# Finite shots
dev = qp.device("maestro.qubit", wires=10, shots=10_000)
# GPU (requires separate license — see below)
dev = qp.device("maestro.qubit", wires=28, simulator_type="Gpu")
All available options
simulator_type |
Description |
|---|---|
"QCSim" |
Qoro's optimized CPU simulator (default) |
"Gpu" |
CUDA-accelerated GPU simulator |
"CompositeQCSim" |
p-block simulation |
simulation_type |
Description |
|---|---|
"Statevector" |
Full statevector (default) |
"MatrixProductState" |
MPS / tensor-train for large qubit counts |
"Stabilizer" |
Clifford-only stabilizer |
"TensorNetwork" |
General tensor network |
"PauliPropagator" |
Pauli propagation |
"ExtendedStabilizer" |
Extended stabilizer |
Examples
Hamiltonian VQE
Hamiltonians are evaluated natively via Maestro's batched estimate() — all Pauli terms in a single C++ call:
import pennylane as qp
import numpy as np
n_qubits = 20
H = qp.Hamiltonian(
[0.5] * (n_qubits - 1) + [0.3] * n_qubits,
[qp.PauliZ(i) @ qp.PauliZ(i+1) for i in range(n_qubits - 1)] +
[qp.PauliX(i) for i in range(n_qubits)]
)
dev = qp.device("maestro.qubit", wires=n_qubits)
@qp.qnode(dev, diff_method="parameter-shift")
def vqe_circuit(params):
for i in range(n_qubits):
qp.RY(params[i], wires=i)
for i in range(n_qubits - 1):
qp.CNOT(wires=[i, i + 1])
return qp.expval(H)
params = np.random.random(n_qubits)
energy = vqe_circuit(params)
gradient = qp.grad(vqe_circuit)(params)
100-Qubit Ising Quench with MPS Shot Sampling
See examples/ising_phase_transition.py for a full demo that simulates a 100-qubit transverse-field Ising model and uses Maestro's exclusive MPS shot sampling to extract magnetization distributions and spatial correlations. Runs in ~30 seconds.
Supported Operations
PennyLane automatically decomposes any unsupported gate (e.g. Rot) into Maestro's native gate set. No manual intervention needed.
🚀 GPU Acceleration
For large-scale workloads, Maestro supports CUDA-accelerated simulation (statevector, MPS, tensor network) via NVIDIA cuQuantum.
dev = qp.device("maestro.qubit", wires=28, simulator_type="Gpu")
GPU Benchmark — Fermi-Hubbard MPS (48 qubits, χ=256)
| Simulator | Relative Runtime |
|---|---|
| Maestro GPU | 1× |
| Maestro CPU | 5× |
| Qibo GPU | 7.5× |
| Qiskit CPU | 14× |
| PennyLane GPU | 64× |
Larger instances failed to run on some platforms, limiting comparison.
→ Request GPU access & free trial at maestro.qoroquantum.net
Citation
If you use pennylane-maestro in your research, please cite:
@misc{pennylane_maestro,
author = {{Qoro Quantum}},
title = {PennyLane-Maestro: High-Performance C++ Backend for PennyLane},
year = {2026},
publisher = {GitHub},
howpublished = {\url{https://github.com/QoroQuantum/pennylane-maestro}}
}
Authors & License
Maintained by Qoro Quantum (team@qoroquantum.de).
Licensed under GPL-3.0. See the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pennylane_maestro-0.2.2.tar.gz.
File metadata
- Download URL: pennylane_maestro-0.2.2.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
511e886dc7b7578b2529a9f98121d21dcfed4fc6f3677f2dae86380b295f172c
|
|
| MD5 |
eb10c5cc3d5fdfead6e29b802762f45c
|
|
| BLAKE2b-256 |
fbcd583361fb16bde7de64899512e2f748b5175bb9bcd690ffbedb353992b5fe
|
Provenance
The following attestation bundles were made for pennylane_maestro-0.2.2.tar.gz:
Publisher:
publish.yml on QoroQuantum/pennylane-maestro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pennylane_maestro-0.2.2.tar.gz -
Subject digest:
511e886dc7b7578b2529a9f98121d21dcfed4fc6f3677f2dae86380b295f172c - Sigstore transparency entry: 1356773828
- Sigstore integration time:
-
Permalink:
QoroQuantum/pennylane-maestro@d011c2311b32afb0bec6742294bbad623960e827 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/QoroQuantum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d011c2311b32afb0bec6742294bbad623960e827 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pennylane_maestro-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pennylane_maestro-0.2.2-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30d2eeeb4c8558c4cdb2d9d1fee40e5c3ada4b3e3cd777b84d598ae2ee135d2d
|
|
| MD5 |
f2f6669004df76184914a49021e4d7b1
|
|
| BLAKE2b-256 |
f938e0be22efa03fb0bfb7efe074a41a2e86e35ec8a2e155f2683063ce533e25
|
Provenance
The following attestation bundles were made for pennylane_maestro-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on QoroQuantum/pennylane-maestro
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pennylane_maestro-0.2.2-py3-none-any.whl -
Subject digest:
30d2eeeb4c8558c4cdb2d9d1fee40e5c3ada4b3e3cd777b84d598ae2ee135d2d - Sigstore transparency entry: 1356773834
- Sigstore integration time:
-
Permalink:
QoroQuantum/pennylane-maestro@d011c2311b32afb0bec6742294bbad623960e827 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/QoroQuantum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d011c2311b32afb0bec6742294bbad623960e827 -
Trigger Event:
workflow_dispatch
-
Statement type: