Tutorials#
Find some examples on how to use pyqit here:
- Variational quantum classifier
Trains a
VQCClassifieron a synthetic dataset using the torch backend, plots the loss curve fromhistory.as_dict(), then evaluates on the test split. Ends with aVQCRegressorfitting a sine curve. Start here.- Training pipeline with callbacks
Runs
EarlyStoppingandModelCheckpointtogether, then inspects what each one recorded:stopped_epoch,stopping_reason,best_epochandbest_path. Ends by resuming the run fromlast.npzwithModelCheckpoint(resume_from=...)and predicting new rows through a savedDataModule.- Diagnosing barren plateaus with PyQit
Takes a circuit at 8 qubits and 15 layers, deep enough to plateau, and shows the gradient variance collapsing below the baseline. Then runs the same check through
Trainer(check_bp=True)on a circuit that trains fine, so you can see both verdicts.- Quantum pipelines
Composes two models into a
QuantumPipelinewith a frozen backbone and a trainable head, then builds a dense, circuit, dense network frompyqit.models.layersand trains it as one model withfit_mode="joint".