遇见数据集

QSBench/QSBench-Core-v1.0.0-demo

收藏
Hugging Face2026-04-06 更新2026-04-12 收录
官方服务:

资源简介:

--- license: cc-by-nc-4.0 task_categories: - tabular-regression - feature-extraction language: - en tags: - qiskit - quantum-circuits - synthetic-dataset - benchmark - expectation-values - quantum-computing - qml-benchmark - quantum dataset - qml dataset - quantum benchmark - quantum circuits dataset - expectation value prediction - variational quantum circuits - hybrid quantum classical pretty_name: QSBench Core Demo v1.0.0 – Quantum Machine Learning Dataset (Quantum Circuits, Expectation Values, n=6) size_categories: - n<1K --- ![QSBench Logo](https://i.imgur.com/VyLgYtf.png) 🌐 [Website](https://qsbench.github.io) | 🤗 [Dataset](https://huggingface.co/datasets/QSBench/QSBench-Core-v1.0.0-demo) | 🛠️ [GitHub](https://github.com/QSBench/QSBench-Core-v1.0.0-demo) | 🚀 [Interactive Demo](https://huggingface.co/QSBench/spaces) # QSBench Core Demo v1.0.0 **Quantum Machine Learning dataset for regression on expectation values.** Includes quantum circuits, QASM, and structured features for training ML models. Keywords: quantum dataset, QML benchmark, quantum circuits dataset, expectation value prediction. **2000 high-quality synthetic quantum circuits** — clean simulation demo of the QSBench family. Designed for researchers and engineers working on Quantum Machine Learning, variational algorithms, and hybrid quantum-classical models. ### Why QSBench? Most public quantum datasets are too small, poorly documented, or lack paired ideal/noisy data. QSBench solves this by providing **reproducible, richly annotated, and ready-to-use** datasets. ### Use Cases - Training Quantum Machine Learning models - Benchmarking noise robustness - Predicting expectation values from circuit structure - Hybrid quantum-classical ML pipelines - Feature engineering from quantum circuits ### Dataset Overview - **Samples**: 2000 - **Qubits**: 6 - **Depth**: 4 - **Circuit Families**: Mixed (HEA, RealAmplitudes, QFT, Efficient SU(2), Random) - **Entanglement**: Full - **Noise**: None (clean simulation) - **Observables**: Z, X, Y in mixed mode (global + per‑qubit) - **Shots**: 512 - **Splits**: Train (157) / Validation (26) / Test (17) — deterministic hash‑based ### What's Inside Each Sample Each sample in the Parquet files contains: - Raw and transpiled QASM representations - Circuit adjacency matrix - Detailed gate statistics (single‑qubit, two‑qubit, CX, H, RX, RY, RZ) - Structural metrics: Gate entropy + Meyer‑Wallach entanglement - Ideal expectation values for Z, X, Y (global and per‑qubit) - Circuit family label and full generation metadata - Deterministic split label (train/val/test) ### QSBench-Core: Quantum Circuit Complexity **You don't need a PhD in Quantum Physics to use this dataset.** If you are a Data Scientist, ML Engineer, or AI Researcher, think of a quantum circuit as a **Computational Graph (DAG)** or a piece of **Code**. This dataset provides the raw structural blueprints of thousands of quantum algorithms. ### The ML Mission: Unsupervised Learning & Clustering Since this dataset contains clean, ideal circuits (no noise), it is perfect for **Unsupervised Learning**. Can you cluster these circuits into distinct "complexity classes" using K-Means or HDBSCAN? Can you build a Graph Neural Network (GNN) that learns the topology of these circuits? ### Dataset Anatomy (Features) Think of these columns as your `X` features. | Group | Column Name | What is it for ML? | | :--- | :--- | :--- | | **Meta** | `circuit_hash`, `split` | Unique IDs and train/test splits. | | **Topology** | `adjacency` | The graph structure! A matrix showing how nodes (qubits) are connected. Perfect for GNNs. | | **Code** | `qasm_raw` | The raw text of the algorithm. Great for NLP/LLM tasks. | | **Complexity** | `depth`, `gate_entropy` | Tabular features indicating how "deep" and "random" the graph is. | | **Weights** | `total_gates`, `cx_count` | Node/Edge counts. `cx_count` is the number of complex interactions. | ### Quick Start Idea Try to run **PCA** on the numeric features (`depth`, `gate_entropy`, `cx_count`, `adj_density`) to visualize the "DNA" of quantum algorithms in 2D space. ### Load the Dataset The dataset is stored in Parquet format inside the `data/shards/` folder. You can load it directly using the Hugging Face `datasets` library: ```python from datasets import load_dataset # Load the demo dataset (free) dataset = load_dataset("QSBench/QSBench-Core-v1.0.0-demo", split="train") # Inspect the first sample print(dataset[0]) ``` If you prefer to use `pandas`: ```python import pandas as pd # Load all Parquet shards from the data folder df = pd.read_parquet("data/shards/*.parquet") print(df.head()) ``` ### Example: Train a simple model on expectation values ```python from sklearn.ensemble import RandomForestRegressor import numpy as np from datasets import load_dataset # Load dataset ds = load_dataset("QSBench/QSBench-Core-v1.0.0-demo") # Use gate count as a simple feature X_train = np.array([s["total_gates"] for s in ds["train"]]).reshape(-1, 1) y_train = np.array([s["ideal_expval_Z_global"] for s in ds["train"]]) model = RandomForestRegressor(random_state=42) model.fit(X_train, y_train) # Evaluate on test set X_test = np.array([s["total_gates"] for s in ds["test"]]).reshape(-1, 1) y_test = np.array([s["ideal_expval_Z_global"] for s in ds["test"]]) score = model.score(X_test, y_test) print(f"R² score: {score:.4f}") ``` For more advanced usage (e.g., using QASM strings, adjacency matrices), check the provided metadata files in the `meta/` folder. ### Repository Structure The dataset is stored in the `main` branch and contains only the data files to ensure the Dataset Viewer works correctly: ``` QSBench-Core-v1.0.0-demo/ ├── README.md # This file └── data/ # Parquet shards (main data) └── shards/ └── *.parquet └── *.csv ``` All metadata files (coverage.json, schema.json, meta.json, data_card.md, etc.) are located in a separate branch called **`metadata`** to avoid interfering with the Dataset Viewer. You can browse them here: 👉 [metadata branch](https://huggingface.co/datasets/QSBench/QSBench-Core-v1.0.0-demo/tree/metadata) ### Related QSBench Datasets - QSBench Lite (20k samples, n=4) - QSBench Core (75k samples, n=8) - Depolarizing Noise Pack (150k samples) - Amplitude Damping Pack (150k samples) - Transpilation Hardware Pack (200k samples) ### Part of the QSBench Family This is a small public **demo version**. Full‑scale datasets (20k–150k+ samples), noisy versions (Depolarizing, Amplitude Damping), and custom datasets are available. [Repository](https://github.com/QSBench/QSBench-Core-v1.0.0-demo) [Website & Full Catalog](https://qsbench.github.io) **License**: CC BY‑NC 4.0 (Personal & Research Use) **Questions or custom requests?** Visit our [website](https://qsbench.github.io) or open an issue on [GitHub](https://github.com/QSBench/QSBench-Core-v1.0.0-demo), or inspect the generation pipeline in the **QSBench Generator** [repository](https://github.com/QSBench/QSBench-Generator). ### Support QSBench You can support the project directly on this Giveth page: **[https://giveth.io/project/qsbench](https://giveth.io/project/qsbench)** Your donations help us generate larger datasets, cover GPU costs, and continue developing new realistic noise models. --- *Generated with QSBench Generator v5.0.2*

license: cc-by-nc-4.0 任务类别: - 表格回归(tabular-regression) - 特征提取(feature-extraction) 语言: - 英语 标签: - Qiskit(Qiskit) - 量子电路(quantum-circuits) - 合成数据集(synthetic-dataset) - 基准测试(benchmark) - 期望值(expectation-values) - 量子计算(quantum-computing) - 量子机器学习基准测试(qml-benchmark) - 量子数据集(quantum dataset) - 量子机器学习数据集(qml dataset) - 量子基准测试(quantum benchmark) - 量子电路数据集(quantum circuits dataset) - 期望值预测(expectation value prediction) - 变分量子电路(variational quantum circuits) - 混合量子-经典(hybrid quantum classical) 漂亮名称:QSBench Core Demo v1.0.0 – 量子机器学习数据集(量子电路、期望值、n=6) 规模类别: - n<1000 ![QSBench 标识](https://i.imgur.com/VyLgYtf.png) 🌐 [官方网站](https://qsbench.github.io) | 🤗 [数据集页面](https://huggingface.co/datasets/QSBench/QSBench-Core-v1.0.0-demo) | 🛠️ [GitHub仓库](https://github.com/QSBench/QSBench-Core-v1.0.0-demo) | 🚀 [交互式演示](https://huggingface.co/QSBench/spaces) # QSBench Core Demo v1.0.0 **用于期望值回归的量子机器学习数据集**,包含量子电路、QASM(Quantum Assembly Language)以及用于训练机器学习模型的结构化特征。 关键词:量子数据集、量子机器学习基准测试、量子电路数据集、期望值预测。 **2000个高质量合成量子电路**——QSBench系列的轻量化仿真演示版本。 专为从事量子机器学习、变分算法以及混合量子-经典模型研究的科研人员与工程师设计。 ### 为何选择QSBench? 当前公开的量子数据集普遍存在规模过小、文档不完善或缺乏理想/带噪配对数据的问题。QSBench通过提供**可复现、注释丰富且开箱即用**的数据集解决了这一痛点。 ### 应用场景 - 训练量子机器学习模型 - 基准测试抗噪鲁棒性 - 基于电路结构预测期望值 - 混合量子-经典机器学习流水线 - 从量子电路中进行特征工程 ### 数据集概览 - **样本量**:2000 - **量子比特数**:6 - **电路深度**:4 - **电路家族**:混合类型(硬件高效近似(HEA)、RealAmplitudes、量子傅里叶变换(QFT)、高效SU(2)、随机电路) - **纠缠模式**:全连接 - **噪声设置**:无(纯仿真) - **可观测量**:混合模式下的Z、X、Y泡利算符(全局+单量子比特) - **采样次数(shots)**:512 - **数据划分**:训练集(157)/验证集(26)/测试集(17)——基于哈希的确定性划分 ### 单样本内容说明 Parquet(Parquet格式)文件中的每个样本包含: - 原始与编译后的QASM表示 - 电路邻接矩阵 - 详细的门统计信息(单量子比特门、双量子比特门、CX门、H门、RX门、RY门、RZ门) - 结构度量指标:门熵与Meyer-Wallach纠缠度 - Z、X、Y泡利算符的理想期望值(全局与单量子比特维度) - 电路家族标签与完整生成元数据 - 确定性划分标签(训练/验证/测试) ### QSBench-Core:量子电路复杂度 **无需量子物理博士学位即可使用本数据集**。若你是数据科学家、机器学习工程师或人工智能研究员,可以将量子电路理解为**计算图(DAG,Directed Acyclic Graph)**或一段**代码**。本数据集提供了数千个量子算法的原始结构蓝图。 ### 机器学习任务:无监督学习与聚类 由于本数据集包含纯净的理想电路(无噪声),非常适合**无监督学习**任务。你能否使用K-Means或HDBSCAN将这些电路聚类为不同的“复杂度类别”?能否构建一个图神经网络(GNN,Graph Neural Network)来学习这些电路的拓扑结构? ### 数据集结构(特征维度) 可以将这些列视为你的`X`特征: | 特征组 | 列名 | 机器学习用途 | | :--- | :--- | :--- | | **元数据** | `circuit_hash`, `split` | 唯一标识符与训练/测试划分标签 | | **拓扑结构** | `adjacency` | 图结构!展示节点(量子比特)连接关系的矩阵,非常适合图神经网络 | | **代码** | `qasm_raw` | 算法的原始文本,适用于自然语言处理/大语言模型(LLM,Large Language Model)任务 | | **复杂度指标** | `depth`, `gate_entropy` | 表征电路“深度”与“随机性”的表格型特征 | | **权重统计** | `total_gates`, `cx_count` | 节点/边计数,`cx_count`代表复杂交互门的数量 | ### 快速入门思路 尝试对数值特征(`depth`、`gate_entropy`、`cx_count`、`adj_density`)运行**主成分分析(PCA,Principal Component Analysis)**,在二维空间中可视化量子算法的“DNA”。 ### 加载数据集 本数据集以Parquet格式存储在`data/shards/`文件夹中。你可以直接通过Hugging Face的`datasets`库加载: python from datasets import load_dataset # 加载演示数据集(免费) dataset = load_dataset("QSBench/QSBench-Core-v1.0.0-demo", split="train") # 查看第一个样本 print(dataset[0]) 若偏好使用`pandas`: python import pandas as pd # 加载data文件夹下所有Parquet分片 df = pd.read_parquet("data/shards/*.parquet") print(df.head()) ### 示例:基于期望值训练简单模型 python from sklearn.ensemble import RandomForestRegressor import numpy as np from datasets import load_dataset # 加载数据集 ds = load_dataset("QSBench/QSBench-Core-v1.0.0-demo") # 使用门总数作为简单特征 X_train = np.array([s["total_gates"] for s in ds["train"]]).reshape(-1, 1) y_train = np.array([s["ideal_expval_Z_global"] for s in ds["train"]]) model = RandomForestRegressor(random_state=42) model.fit(X_train, y_train) # 在测试集上评估 X_test = np.array([s["total_gates"] for s in ds["test"]]).reshape(-1, 1) y_test = np.array([s["ideal_expval_Z_global"] for s in ds["test"]]) score = model.score(X_test, y_test) print(f"R²得分: {score:.4f}") 如需更高级的用法(例如使用QASM字符串、邻接矩阵),请查看`meta/`文件夹中提供的元数据文件。 ### 仓库结构 本数据集存储在`main`分支,仅包含数据文件以确保数据集查看器正常工作: QSBench-Core-v1.0.0-demo/ ├── README.md # 本说明文件 └── data/ # Parquet分片(主数据) └── shards/ └── *.parquet └── *.csv 所有元数据文件(coverage.json、schema.json、meta.json、data_card.md等)均存储在名为**`metadata`**的独立分支中,以免干扰数据集查看器。你可以在此处浏览: 👉 [metadata分支](https://huggingface.co/datasets/QSBench/QSBench-Core-v1.0.0-demo/tree/metadata) ### 相关QSBench数据集 - QSBench Lite(20000个样本,n=4) - QSBench Core(75000个样本,n=8) - 去极化噪声包(150000个样本) - 振幅阻尼噪声包(150000个样本) - 编译硬件适配包(200000个样本) ### 属于QSBench系列 本数据集为小型公开**演示版本**。全规模数据集(20000–150000+样本)、带噪版本(去极化噪声、振幅阻尼噪声)以及自定义数据集均可获取。 [GitHub仓库](https://github.com/QSBench/QSBench-Core-v1.0.0-demo) [官方网站与完整目录](https://qsbench.github.io) **许可证**:CC BY-NC 4.0(个人与研究用途) **疑问或定制需求?** 请访问我们的[官方网站](https://qsbench.github.io)或在[GitHub](https://github.com/QSBench/QSBench-Core-v1.0.0-demo)提交Issue,或查看QSBench生成器[仓库](https://github.com/QSBench/QSBench-Generator)中的生成流水线。 ### 支持QSBench 你可以通过以下Giveth页面直接支持本项目: **[https://giveth.io/project/qsbench](https://giveth.io/project/qsbench)** 你的捐赠将帮助我们生成更大规模的数据集、覆盖GPU开销并持续开发更贴近真实场景的噪声模型。 --- *由QSBench Generator v5.0.2生成*

提供机构:
QSBench
二维码
社区交流群
二维码
科研交流群
商业服务