Examples

Seven scripts, from the repository’s examples/ folder. Run each from the repository root, e.g. python examples/hamiltonian_vqe.py. Scripts with a --cloud flag run the same code on the Qoro cloud: see Run on the Qoro cloud to set up an API key.

Example

What it shows

Running on the Qoro cloud

Training a circuit and sampling a 50-qubit state on the Qoro cloud

VQE for an Ising chain

VQE for a 20-qubit Ising chain with adjoint gradients, checked against the exact energy (--cloud)

QAOA for MaxCut

QAOA for MaxCut, trained with adjoint gradients and sampled for the best cut (--cloud)

A data re-uploading classifier

A classifier trained on a broadcast batch in one engine call (--cloud)

A 100-qubit Ising quench

A quench with MPS shot sampling (needs matplotlib, scipy)

Trotter time evolution

Persistent-state Trotter evolution with qp.Snapshot and incremental_evolve

Benchmarks

The benchmark suite behind the performance tables (needs pennylane-lightning, quimb)