Agent-driven experiments fork of the PennyLane demonstration suite.
Contains 5 Python implementations of testable hypotheses in hybrid quantum-classical ML.
β¬οΈ Inherits the full upstream demo collection from PennyLaneAI/demos.
Fork architecture showing upstream origin, added experiments, and mapping of each hypothesis to its PennyLane baseline demo. Each experiment extends a specific tutorial.
graph TB
classDef north fill:#1a1a2e,stroke:#00d4aa,stroke-width:2,color:#ccc
classDef impl fill:#1a1a2e,stroke:#7C3AED,stroke-width:3,color:#fff
classDef exec fill:#1a1a2e,stroke:#10B981,stroke-width:2,color:#ccc
classDef up fill:#333,stroke:#666,stroke-width:1,color:#999
subgraph Upstream_Source["βοΈ Upstream"]
U[("π¬ PennyLaneAI/demos<br/>Official Demos")]
end
subgraph Agent_Stack["π€ Agent Experiment Stack"]
direction TB
H[("π§ͺ agent-hypotheses<br/>Research Definitions")]
D[("π pennylane-demos<br/><b>β You Are Here</b>")]
E[("π agent-experiments<br/>Runnable Notebooks")]
end
subgraph Deliverables["π¦ Deliverables"]
S[("π experiments/<br/>H1βH5 Python scripts")]
R[("π results/<br/>Metrics & Plots")]
end
U -.->|"fork + extend"| D
H -->|"defines"| D
D -->|"implements"| S
S -->|"packaged as"| E
S --> R
E -->|"results validate"| H
class H north
class D,impl,S,R impl
class E exec
class U up
This fork adds 5 agent-generated experiment scripts on top of the full PennyLane demo suite.
graph LR
subgraph H1_H2["Trainability Track"]
H1["H1: NAS HQNN"]
H2["H2: Dissipation vs Local Cost"]
end
subgraph H3_H5["Expressivity Track"]
H3["H3: Post-Variational"]
H4["H4: PDE-Constrained"]
H5["H5: Data-Reuploading"]
end
H1_H2 -->|"BP mitigation"| H3_H5
style H1 fill:#8B5CF6,color:#fff
style H2 fill:#3B82F6,color:#fff
style H3 fill:#EF4444,color:#fff
style H4 fill:#F59E0B,color:#fff
style H5 fill:#10B981,color:#fff
| ID | Script | Area | Est. Cost | Dependencies | Run Command |
|---|---|---|---|---|---|
| H1 | h1_joint_nas_hqnn.py |
pennylane torch scikit-learn |
python experiments/h1_joint_nas_hqnn.py |
||
| H2 | h2_engineered_dissipation_bp.py |
pennylane matplotlib |
python experiments/h2_engineered_dissipation_bp.py |
||
| H3 | h3_post_variational_benchmarks.py |
pennylane scikit-learn |
python experiments/h3_post_variational_benchmarks.py |
||
| H4 | h4_pde_constrained_loss.py |
pennylane matplotlib |
python experiments/h4_pde_constrained_loss.py |
||
| H5 | h5_data_reuploading_scaling.py |
pennylane scikit-learn |
python experiments/h5_data_reuploading_scaling.py |
Each script is self-contained with CLI argument parsing (--help for options) and timestamped JSON output saved to experiments/results/.
# Python 3.10+
python --version
# PennyLane (core + lightning simulator)
pip install pennylane pennylane-lightning# Clone this fork
git clone https://github.com/NullLabTests/pennylane-demos.git
cd pennylane-demos
# Run experiments sequentially
for script in experiments/h*.py; do
echo "=== Running $script ==="
python "$script"
echo ""
doneEach script supports CLI arguments:
python experiments/h1_joint_nas_hqnn.py --n-samples 200 --n-epochs 20 --output-dir experiments/results
python experiments/h2_engineered_dissipation_bp.py # uses defaults
python experiments/h3_post_variational_benchmarks.py # uses defaults
python experiments/h4_pde_constrained_loss.py # uses defaults
python experiments/h5_data_reuploading_scaling.py # uses defaultsResults are saved to experiments/results/<id>_<timestamp>.json with plots in PNG format.
π¦ pennylane-demos (fork)
β
βββ π§ͺ AGENT EXPERIMENTS β Added content
β βββ π experiments/
β β βββ h1_joint_nas_hqnn.py # H1: NAS for Pareto-optimal HQNNs
β β βββ h2_engineered_dissipation_bp.py # H2: Engineered dissipation vs local cost
β β βββ h3_post_variational_benchmarks.py # H3: Post-variational strategies
β β βββ h4_pde_constrained_loss.py # H4: PDE-constrained loss functions
β β βββ h5_data_reuploading_scaling.py # H5: Trainable data reuploading
β β βββ π results/ # π Generated metrics & plots (gitignored)
β βββ π README.md # βΉοΈ This file
β
βββ β¬οΈ UPSTREAM CONTENT β Inherited from PennyLaneAI/demos
β βββ π demonstrations_v2/ # π Official PennyLane demo notebooks
β βββ π dependencies/ # π¦ Dependency metadata
β βββ π documentation/ # π CLI tool & docs
β βββ π lib/ # π οΈ Shared utilities
β βββ π _static/ # π¨ Web assets
β βββ π _templates/ # π Sphinx templates
β βββ π conf.py # βοΈ Sphinx configuration
β βββ π index.rst # π Documentation index
β βββ π CONTRIBUTING.md # π Contributor guide
β βββ π LICENSE # βοΈ Apache 2.0
β
βββ π οΈ BUILD & CI
βββ π pyproject.toml # π Poetry project config
βββ π poetry.lock # π Locked dependencies
βββ π extension.py # π§ Sphinx extension
βββ π .github/ # π€ CI workflows
| Repository | Badge | Purpose | Link |
|---|---|---|---|
| agent-hypotheses | Research hypotheses & metrics | β View | |
| pennylane-demos (this repo) | Python scripts (forked) | β You are here | |
| agent-experiments | Notebooks + CI | β View |
flowchart LR
subgraph Up[" "]
U["PennyLaneAI/demos"] -.->|"basis for"| D["pennylane-demos"]
end
subgraph Core[" "]
H["agent-hypotheses"] -->|"informs"| D
end
subgraph Down[" "]
D -->|"wraps into"| E["agent-experiments"]
end
style U fill:#333,stroke:#666,color:#999,stroke-width:1
style H fill:#1a1a2e,stroke:#00d4aa,color:#fff,stroke-width:2
style D fill:#1a1a2e,stroke:#7C3AED,color:#fff,stroke-width:3
style E fill:#1a1a2e,stroke:#10B981,color:#fff,stroke-width:2
End-to-end data flow: hypotheses.json defines experiment parameters β Python scripts execute with CLI args β timestamped JSON results validate hypotheses. A complete feedback loop across all three repositories.
This fork inherits the full PennyLane demonstration suite β a collection of tutorials and implementations ranging from introductory concepts to cutting-edge quantum computing research. Built by Xanadu, for research.
| Resource | Link |
|---|---|
| π Online Demonstrations | pennylane.ai/qml/demonstrations |
| π Contributing Guide | CONTRIBUTING.md |
| π οΈ CLI Tool | documentation/demo-cli.md |
| π¦ Dependency Management | dependencies/README.md |
| π Issue Tracker | PennyLaneAI/demos/issues |
The materials and demonstrations contained within this repository are free and open-source, released under the Apache License, Version 2.0.
Please note, the file custom_directives.py is available under the BSD 3-Clause License, with copyright Β© 2017, PyTorch contributors.
Part of the NullLabTests agent-driven research ecosystem.