zlysunshine commited on
Commit
3281ad2
·
verified ·
1 Parent(s): 6d5fd57

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +253 -81
README.md CHANGED
@@ -1,84 +1,256 @@
1
  ---
2
- dataset_info:
3
- - config_name: circuits
4
- features:
5
- - name: id
6
- dtype: string
7
- - name: circuit_image
8
- dtype: image
9
- - name: braket_code
10
- dtype: string
11
- - name: qiskit_code
12
- dtype: string
13
- - name: category
14
- dtype: string
15
- - name: difficulty
16
- dtype: string
17
- - name: qubits
18
- dtype: int32
19
- - name: gate_count
20
- dtype: int32
21
- - name: depth
22
- dtype: int32
23
- - name: description_en
24
- dtype: string
25
- - name: description_cn
26
- dtype: string
27
- - name: blockchain_relevance
28
- dtype: string
29
- - name: state_vector_dim
30
- dtype: int32
31
- - name: nonzero_amplitudes
32
- dtype: int32
33
- - name: state_vector_real
34
- list: float64
35
- - name: state_vector_imag
36
- list: float64
37
- - name: target_description
38
- dtype: string
39
- - name: best_pass_rate
40
- dtype: string
41
- - name: all_pass
42
- dtype: bool
43
- - name: all_fail
44
- dtype: bool
45
- splits:
46
- - name: train
47
- num_bytes: 2360453
48
- num_examples: 132
49
- download_size: 2325540
50
- dataset_size: 2360453
51
- - config_name: experiments
52
- features:
53
- - name: circuit_id
54
- dtype: string
55
- - name: model
56
- dtype: string
57
- - name: mode
58
- dtype: string
59
- - name: syntax_ok
60
- dtype: bool
61
- - name: exec_ok
62
- dtype: bool
63
- - name: fidelity
64
- dtype: float64
65
- - name: pass
66
- dtype: bool
67
- - name: error
68
- dtype: string
69
- splits:
70
- - name: train
71
- num_bytes: 54003
72
- num_examples: 792
73
- download_size: 8778
74
- dataset_size: 54003
75
  configs:
76
- - config_name: circuits
77
- data_files:
78
- - split: train
79
- path: circuits/train-*
80
- - config_name: experiments
81
- data_files:
82
- - split: train
83
- path: experiments/train-*
 
 
 
 
 
 
 
 
84
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - zh
6
+ pretty_name: QCV-Dataset
7
+ tags:
8
+ - quantum-computing
9
+ - quantum-circuits
10
+ - code-generation
11
+ - multimodal
12
+ - image-to-text
13
+ - braket
14
+ - qiskit
15
+ - science
16
+ - physics
17
+ - machine-learning
18
+ - bilingual
19
+ task_categories:
20
+ - image-to-text
21
+ - text-generation
22
+ - visual-question-answering
23
+ task_ids:
24
+ - image-captioning
25
+ - code-generation
26
+ - visual-reasoning
27
+ size_categories:
28
+ - n<1K
29
+ annotations_creators:
30
+ - expert-generated
31
+ - machine-generated
32
+ language_creators:
33
+ - expert-generated
34
+ multilinguality:
35
+ - multilingual
36
+ source_datasets:
37
+ - original
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  configs:
39
+ - config_name: circuits
40
+ data_files:
41
+ - split: train
42
+ path: data/circuits-*.parquet
43
+ - config_name: experiments
44
+ data_files:
45
+ - split: train
46
+ path: data/experiments-*.parquet
47
+ - config_name: failures
48
+ data_files:
49
+ - split: train
50
+ path: data/failures-*.parquet
51
+ - config_name: equivalences
52
+ data_files:
53
+ - split: train
54
+ path: data/equivalences-*.parquet
55
  ---
56
+
57
+ # QCV-Dataset
58
+
59
+ **132 Quantum Circuits · 5 Core Modalities · 792 Experiment Results · Bilingual Annotations**
60
+
61
+ The first multimodal quantum circuit dataset for training and evaluating AI systems on quantum circuit understanding, code generation, and verification.
62
+
63
+ ## Dataset Description
64
+
65
+ - **Curated by:** Dongping Liu, Aoyu Zhang, Luyao Zhang
66
+ - **Language(s):** English (EN), Chinese (CN) — bilingual annotations
67
+ - **License:** MIT
68
+ - **Modality:** Multimodal — Images (circuit diagrams), Text (code + descriptions), Numerical (state vectors)
69
+
70
+ ## Dataset Summary
71
+
72
+ QCV-Dataset contains 132 quantum circuits across 13 categories, each with 5 core modalities: circuit diagram image, Amazon Braket SDK code, Qiskit code, simulation results (state vectors), and bilingual expert annotations. Additionally, 792 experimental model invocations (3 models × 2 prompting modes × 132 circuits) provide a comprehensive benchmark for evaluating visual AI agents on quantum code generation.
73
+
74
+ ## Dataset Structure
75
+
76
+ ### Config: `circuits` (default)
77
+
78
+ | Feature | Type | Description |
79
+ |---|---|---|
80
+ | `id` | string | Unique circuit identifier (e.g., `C01_deutsch_jozsa_3`) |
81
+ | `circuit_image` | Image | Qiskit-generated circuit diagram (PNG, 150 DPI, IQP style) |
82
+ | `braket_code` | string | Amazon Braket SDK executable Python code |
83
+ | `qiskit_code` | string | Qiskit equivalent implementation |
84
+ | `description_en` | string | English algorithm description |
85
+ | `description_cn` | string | Chinese algorithm description |
86
+ | `category` | string | Circuit category (13 categories) |
87
+ | `difficulty` | string | Difficulty level: `basic`, `intermediate`, `advanced` |
88
+ | `qubits` | int32 | Number of qubits (1–10) |
89
+ | `gate_count` | int32 | Number of gates (or null) |
90
+ | `depth` | int32 | Circuit depth (1–27) |
91
+ | `blockchain_relevance` | string | Blockchain relevance tag (if applicable) |
92
+ | `state_vector_dim` | int32 | Dimension of state vector (2^qubits) |
93
+ | `nonzero_amplitudes` | int32 | Number of nonzero amplitudes |
94
+ | `state_vector_real` | sequence[float64] | Real components of simulated state vector |
95
+ | `state_vector_imag` | sequence[float64] | Imaginary components of simulated state vector |
96
+ | `target_description` | string | Target task description |
97
+ | `best_pass_rate` | string | Best pass rate across all models (e.g., "5/6") |
98
+ | `all_pass` | bool | Whether circuit passed all model-mode combinations |
99
+ | `all_fail` | bool | Whether circuit failed all model-mode combinations |
100
+
101
+ ### Config: `experiments`
102
+
103
+ | Feature | Type | Description |
104
+ |---|---|---|
105
+ | `circuit_id` | string | Reference to circuit |
106
+ | `model` | string | Model name (claude-opus-4.6, claude-sonnet-4.6, claude-haiku-4.5) |
107
+ | `mode` | string | Prompting mode (bv = base vision, tv = thinking vision / chain-of-thought) |
108
+ | `syntax_ok` | bool | Whether generated code compiles |
109
+ | `exec_ok` | bool | Whether code executes without runtime errors |
110
+ | `fidelity` | float64 | Unitary matrix fidelity score |
111
+ | `pass` | bool | Whether verification passed (fidelity >= 0.99) |
112
+ | `error` | string | Error message (if failed) |
113
+
114
+ ### Config: `failures`
115
+
116
+ Annotated failure cases from model evaluation with error type classification.
117
+
118
+ ### Config: `equivalences`
119
+
120
+ Circuit equivalence pairs for verification benchmarking.
121
+
122
+ ## Categories (13)
123
+
124
+ | ID | Category | Count | Qubits |
125
+ |:---|:---|:---:|:---:|
126
+ | demo | Basic Gates | 5 | 1–3 |
127
+ | inter | Intermediate | 10 | 2–4 |
128
+ | adv | Advanced Algorithms | 6 | 3–5 |
129
+ | blockchain | Blockchain Protocols | 11 | 2–8 |
130
+ | A | Gate Type Coverage | 15 | 1–3 |
131
+ | B | Qubit Scaling | 12 | 4–10 |
132
+ | C | Classical Algorithms | 15 | 2–4 |
133
+ | D | Variational/Parameterized | 10 | 2–4 |
134
+ | E | Error Correction | 8 | 3–9 |
135
+ | F | Quantum ML | 10 | 2–8 |
136
+ | G | Blockchain Extended | 8 | 3–6 |
137
+ | H | Visual Variants | 10 | 2–4 |
138
+ | I | BTC/Blockchain Security | 12 | 4–7 |
139
+
140
+ ## Dataset Creation
141
+
142
+ ### Data Collection
143
+ - Circuit diagrams generated with Qiskit `QuantumCircuit.draw("mpl", style="iqp")` at 150 DPI with tight bounding boxes
144
+ - Ground-truth code implemented in Amazon Braket SDK
145
+ - All circuits verified executable on Amazon Braket `LocalSimulator`
146
+
147
+ ### Annotations
148
+ - Bilingual descriptions (EN/CN) created by domain experts
149
+ - Categories assigned based on algorithm type and complexity
150
+ - Difficulty levels determined by circuit depth and gate complexity
151
+
152
+ ## Experiment Results
153
+
154
+ | Model | BV Pass% | TV Pass% | Credits/Correct |
155
+ |---|---|---|---|
156
+ | Claude Opus 4.6 | 78% | 75% | 0.778 |
157
+ | Claude Sonnet 4.6 | 77% | 75% | 0.142 |
158
+ | Claude Haiku 4.5 | 43% | 46% | 0.072 |
159
+
160
+ **Key Findings:**
161
+ - **45 circuits** passed all 6 model-mode combinations
162
+ - **18 circuits** failed all 6 combinations
163
+ - Structural complexity (not qubit count) determines success
164
+ - Chain-of-thought provides no benefit for strong models (delta = -3 to -4%) but modest improvement for weakest (delta = +5%)
165
+
166
+ ## Usage
167
+
168
+ ### Load the dataset
169
+
170
+ ```python
171
+ from datasets import load_dataset
172
+
173
+ # Load main circuits dataset
174
+ circuits = load_dataset("QuantBlockchain/qcv-dataset", "circuits", split="train")
175
+
176
+ # Load experiment results
177
+ experiments = load_dataset("QuantBlockchain/qcv-dataset", "experiments", split="train")
178
+
179
+ # Access a sample
180
+ sample = circuits[0]
181
+ print(sample["id"]) # C01_deutsch_jozsa_3
182
+ print(sample["circuit_image"]) # PIL.Image object
183
+ print(sample["braket_code"]) # Python code string
184
+ print(sample["description_en"]) # English description
185
+ print(sample["description_cn"]) # Chinese description
186
+ ```
187
+
188
+ ### Filter by category
189
+
190
+ ```python
191
+ algo_circuits = circuits.filter(lambda x: x["category"] == "classical_algorithms")
192
+ small_circuits = circuits.filter(lambda x: x["qubits"] <= 3)
193
+ passing_circuits = circuits.filter(lambda x: x["all_pass"] == True)
194
+ ```
195
+
196
+ ### Analyze experiment results
197
+
198
+ ```python
199
+ from collections import Counter
200
+
201
+ model_pass = {}
202
+ for exp in experiments:
203
+ model = exp["model"]
204
+ if model not in model_pass:
205
+ model_pass[model] = {"total": 0, "passed": 0}
206
+ model_pass[model]["total"] += 1
207
+ if exp["pass"]:
208
+ model_pass[model]["passed"] += 1
209
+
210
+ for model, stats in model_pass.items():
211
+ rate = stats["passed"] / stats["total"] * 100
212
+ print(f"{model}: {rate:.1f}% ({stats['passed']}/{stats['total']})")
213
+ ```
214
+
215
+ ## Data Governance & Croissant
216
+
217
+ This dataset follows [Croissant](https://github.com/mlcommons/croissant) metadata standards for machine-readable dataset descriptions. The dataset card uses structured YAML front matter for discoverability and includes:
218
+
219
+ - **Data provenance:** Synthetic generation via Qiskit + expert curation
220
+ - **Annotation methodology:** Expert-generated bilingual descriptions
221
+ - **Verification protocol:** Unitary matrix fidelity >= 0.99 on Braket LocalSimulator
222
+ - **Known limitations:** Framework-specific (Braket SDK), simulation-only, EN/CN bilingual only
223
+ - **Bias considerations:** 23.5% blockchain-relevant circuits may skew toward cryptographic applications
224
+
225
+ The dataset also includes a Croissant-RAI (`croissant-rai.jsonld`) extension documenting responsible AI considerations, data limitations, and recommended use cases.
226
+
227
+ ## Limitations and Biases
228
+
229
+ | Limitation | Description |
230
+ |---|---|
231
+ | Framework lock-in | Code is Amazon Braket SDK specific |
232
+ | Simulation gap | No hardware execution data; LocalSimulator results may differ from real QPUs |
233
+ | Language coverage | Bilingual EN/CN only |
234
+ | Depth range | 1-27; may not represent extremely deep circuits |
235
+ | Domain skew | 23.5% blockchain-relevant circuits over-represents cryptographic applications |
236
+
237
+ ## Citation
238
+
239
+ ```bibtex
240
+ @misc{liu2026qcv,
241
+ title={QCV: Cost-Aware Evaluation of Visual AI Agents for Quantum Code Generation},
242
+ author={Liu, Dongping and Zhang, Aoyu and Zhang, Luyao},
243
+ year={2026},
244
+ url={https://github.com/QuantBlockchain/quantum-circuit-vision}
245
+ }
246
+ ```
247
+
248
+ ## License
249
+
250
+ MIT — see [LICENSE](LICENSE)
251
+
252
+ ## Additional Documentation
253
+
254
+ - [DATASHEET.md](https://github.com/QuantBlockchain/quantum-circuit-vision/blob/main/DATASHEET.md) — Full dataset documentation following Gebru et al. (2021)
255
+ - [CITATION.cff](https://github.com/QuantBlockchain/quantum-circuit-vision/blob/main/CITATION.cff) — Machine-readable citation metadata
256
+ - [CIRCUIT_CATALOG.md](https://github.com/QuantBlockchain/quantum-circuit-vision/blob/main/CIRCUIT_CATALOG.md) — Full listing of all 132 circuits