Maestro Examples
June 18, 2026 ยท View on GitHub
๐ Go beyond your laptop. Try Maestro GPU mode with a free trial. Sign up at maestro.qoroquantum.net to run these simulations at scale.
Example simulations demonstrating quantum simulation capabilities with the Maestro high-performance quantum circuit simulator โ each structured as a two-phase tutorial showing the jump from local CPU simulation to GPU-accelerated execution.
Why GPU Mode?
MPS simulation accuracy is controlled by bond dimension ฯ โ but tensor contractions scale as O(ฯยณ). On a CPU, doubling ฯ means 8ร the runtime. For large systems with high entanglement, CPU-only simulation hits a wall fast.
Maestro's GPU backend (SimulatorType.Gpu) parallelizes those O(ฯยณ) contractions on NVIDIA GPUs, delivering 10โ100ร speedups on the expensive steps โ with zero code changes:
# CPU โ works, but slow at high bond dimension
config = maestro.SimulatorConfig(
simulator_type=maestro.SimulatorType.QCSim,
simulation_type=maestro.SimulationType.MatrixProductState,
max_bond_dimension=64,
)
result = qc.estimate(observables, config)
# GPU โ same API, same code, just swap one argument
config = maestro.SimulatorConfig(
simulator_type=maestro.SimulatorType.Gpu, # โ GPU
simulation_type=maestro.SimulationType.MatrixProductState,
max_bond_dimension=256, # โ go higher
)
result = qc.estimate(observables, config)
Every example below follows the same pattern: Phase 1 runs locally on CPU with modest parameters to prove the physics works. Phase 2 scales up with GPU mode โ because your CPU shouldn't be the bottleneck.
Getting Started
pip install qoro-maestro
๐ Start your free GPU trial โ
Examples
1. Rydberg Atom Simulation โก
Phase diagram and spatial correlations of a 64-atom Rydberg array. Sweeps (ฮ, ฮฉ) parameter space to map the Z2 ordered phase.
The bottleneck: 64 atoms ร 144 parameter points ร MPS simulation each. Scaling to higher bond dimension for accuracy multiplies cost by ฯยณ. The fix: GPU mode handles high-ฯ MPS at a fraction of the CPU time โ sharper phase boundaries without the wait.
๐ Interactive notebook โ step-by-step tutorial
2. Classical Shadows โก
Entanglement detection via MPS-based shadow tomography. Estimates 2nd Rรฉnyi entropy during Trotter evolution of the transverse-field Ising model.
The bottleneck: Hundreds of independent MPS snapshots at 36 qubits. Each snapshot is a full simulation โ sequentially, it crawls. The fix: GPU-accelerated MPS cuts per-snapshot time dramatically, making large-scale shadow tomography feasible.
๐ Interactive notebook โ step-by-step tutorial
3. Fermi-Hubbard Model โก
Adaptive 3-tier simulation of a 200-qubit Fermi-Hubbard system. The Lieb-Robinson light cone reduces a 200-qubit problem to ~40 active qubits.
The bottleneck: The precision tier (ฯ=256) dominates runtime. O(ฯยณ) tensor contractions on CPU take hours. The fix: GPU acceleration on the precision tier โ ~10ร speedup on the most expensive step. The whole pipeline finishes in minutes.
๐ Interactive notebook โ step-by-step tutorial
4. Adaptive Bond Dimension โก
CPUโGPU backend switching during MPS time evolution. As entanglement grows, the simulation automatically upgrades from low-ฯ CPU to high-ฯ GPU.
The bottleneck: High bond dimension means O(ฯยณ) per step. CPU grinds to a halt exactly when accuracy matters most. The fix: GPU mode parallelizes the heavy tensor contractions โ accurate AND fast. Same code, one argument change.
๐ Interactive notebook โ step-by-step tutorial
5. Quantum Many-Body Scarring โก
PXP fidelity revivals from the Nรฉel state in a Rydberg chain. Tracks staggered magnetization oscillations โ a dramatic ETH violation.
The bottleneck: 64 atoms ร 60 Trotter steps at moderate bond dimension = hours on CPU. The fix: GPU mode delivers the full revival structure of a 64-atom chain without overnight runs.
6. Dynamical Quantum Phase Transition โก
Loschmidt echo cusps after a sudden TFIM quench. Non-analytic singularities in the rate function โ dynamical analogs of thermodynamic phase transitions.
The bottleneck: Multi-quench sweep ร 40 Trotter steps each. Crisp cusps need ฯ=64+ on 80 qubits. The fix: GPU mode makes the full 80-qubit, 3-quench sweep run in reasonable time.
7. Surface Code Noise โก
Coherent vs Pauli noise analysis on surface code circuits. Reveals error correlations that stabiliser simulators (Stim) fundamentally cannot capture.
The bottleneck: Surface codes at d=5+ have 49+ qubits with deep CX networks. MPS at high ฯ is needed to faithfully track coherent noise correlations. The fix: GPU mode enables high-fidelity noise characterisation at scale โ understanding real hardware noise beyond Pauli approximations.
Ready to Scale?
Every example in this repo works locally on CPU. But when you're ready to go beyond toy parameters:
- Start your free GPU trial โ no credit card required
pip install qoro-maestro- Add
--gputo any example script
That's it. Same code, GPU scale.
# CPU (default)
python scarring_demo.py
# GPU โ one flag, 10-100ร faster
python scarring_demo.py --gpu
Maestro Features Demonstrated
| Feature | API | Examples |
|---|---|---|
| Matrix Product State | SimulationType.MatrixProductState | All examples |
| Pauli Propagator | SimulationType.PauliPropagator | Fermi-Hubbard (Tier 1) |
| Backend configuration | SimulatorConfig(...) | All examples |
| Bond dimension control | max_bond_dimension=ฯ | All examples |
| Expectation values | qc.estimate(obs, config) | All examples |
| Bitstring sampling | qc.execute(config, shots=N) | Rydberg, Classical Shadows |
| CPU backend | SimulatorType.QCSim | All examples |
| GPU acceleration | SimulatorType.Gpu | All examples (Phase 2) |
License
See LICENSE for details.