A Molecular Hamiltonian and Quantum-Hardware Samples Dataset for Sample-based Quantum Diagonalization
Authors/Creators
Description
A Molecular Hamiltonian and Quantum-Hardware Samples Dataset for Sample-based Quantum Diagonalization
A dataset of 760 molecules across 16 chemical classes, with electronic-structure Hamiltonians (FCIDUMP) and quantum-hardware measurement data (bitstring samples) from two circuit families: LUCJ and SqDRIFT. The samples were measured on IBM Quantum hardware (156-qubit Heron r2 and r3 processors), and the dataset is intended to support training and evaluation of AI models, solvers, and algorithmic workflows for Hamiltonian simulation (e.g. sample-based quantum diagonalization, SQD).
License
Community Data License Agreement – Permissive, Version 2.0 (CDLA-Permissive-2.0). See LICENSE.txt.
Contents
README.md
LICENSE.txt
molecules_info.csv
fcidump.tar.bz2.part000 ... part003
lucj.tar.bz2.part000 ... part024
sqdrift.tar.bz2.part000 ... part024
sqdrift_permutations.tar.bz2
inventory.txt
additional_sqdrift_configs_for_subset_sqdrift.tar.bz2.part000 ... part012
additional_sqdrift_configs_for_subset_sqdrift_permutations.tar.bz2
additional_sqdrift_configs_for_subset_inventory.txt
The four largest archives are split into 500MB parts to work around Zenodo's upload size limits; see "Reassembling the split archives" below.
Reassembling the split archives
Each .partNNN file is a 500MB chunk (zero-padded, 3 digits). After downloading all parts of an archive, concatenate them in order to recover the original .tar.bz2:
cat fcidump.tar.bz2.part* > fcidump.tar.bz2
cat lucj.tar.bz2.part* > lucj.tar.bz2
cat sqdrift.tar.bz2.part* > sqdrift.tar.bz2
cat additional_sqdrift_configs_for_subset_sqdrift.tar.bz2.part* > additional_sqdrift_configs_for_subset_sqdrift.tar.bz2
Shell globbing expands part* in the correct numerically-sorted order, so this works as-is in bash, zsh, or sh. The reassembled file can then be extracted as usual, e.g. tar -xjf fcidump.tar.bz2. sqdrift_permutations.tar.bz2 and additional_sqdrift_configs_for_subset_sqdrift_permutations.tar.bz2 are small enough to upload whole and need no reassembly.
molecules_info.csv
One row per molecule (760 rows), with columns:
| Column | Description |
|---|---|
ID |
3-digit molecule ID (001-760), matching the ID used in all file names and archive paths below |
Name |
Molecule name |
Formula |
Molecular formula |
SMILES |
SMILES string |
Molecule class |
One of 16 chemical classes (e.g. Alkanes and cycloalkanes, Esters and lactones, Transition metal complexes, ...) |
Active space |
Active space used for the electronic structure calculation, as (n_electrons e, n_orbitals o) |
For the 10 transition-metal complexes (IDs 751-760) the name is a descriptive label (e.g. "Transition metal complex 1").
Core data (all 760 molecules, measured on ibm_aachen, a Heron r3 processor)
fcidump.tar.bz2(split into.part000-.part003) — one FCIDUMP file per molecule (fcidump/<ID>.fcidump), the electronic structure Hamiltonian in the active space given inmolecules_info.csv.lucj.tar.bz2(split into.part000-.part024) — quantum-hardware measurement samples from LUCJ circuits, one file per molecule (shots/lucj/<ID>_shots.npz). See the LUCJ parameters below.sqdrift.tar.bz2(split into.part000-.part024) — quantum-hardware measurement samples from SqDRIFT circuits, 1,500 files per molecule (shots/sqdrift/<ID>/*.npz). See the SqDRIFT parameters below.sqdrift_permutations.tar.bz2— the qubit permutation used by each SqDRIFT circuit (shots/sqdrift_permutations/<ID>/<circuit>_metadata.txt, one line per file), required to correctly map each SqDRIFT sample file's qubit columns back to orbital order (see "Loading the samples" below).inventory.txt— full file listing of the four archives above.
LUCJ circuit parameters
| Parameter | Value |
|---|---|
n_reps |
1 |
| Number of samples | 1.5M |
SqDRIFT circuit parameters
| Parameter | Value |
|---|---|
| Num. groups | 15 |
| num_rand (randomizations per time value) | 500 |
| m, time points (Δt = 1) | [1.0, 2.0, 3.0] |
| Num. samples (per circuit) | 1,000 |
| Total samples (per molecule) | 1.5M |
Additional SqDRIFT configurations, 50-molecule subset (measured on ibm_fez, a Heron r2 processor)
additional_sqdrift_configs_for_subset_sqdrift.tar.bz2(split into.part000-.part012)additional_sqdrift_configs_for_subset_sqdrift_permutations.tar.bz2additional_sqdrift_configs_for_subset_inventory.txt
Additional SqDRIFT runs exploring alternative circuit configurations (number of groups, number of randomizations, number of time points) for a subset of 50 molecule IDs. These use the same file layout as the core SqDRIFT archives, with an extra <config> path component identifying which configuration a file belongs to:
shots/sqdrift/<ID>/<config>/*.npz
shots/sqdrift_permutations/<ID>/<config>/*_metadata.txt
Coverage of the 50 molecule IDs is not perfectly uniform across the 12 configurations; see additional_sqdrift_configs_for_subset_inventory.txt for the exact file listing.
SqDRIFT configuration grid
| Config | Num. groups | num_rand | m (Δt = 1) | Num. samples | Total samples |
|---|---|---|---|---|---|
| A1 | 15 | 1000 | [1.0, 2.0, 3.0] | 500 | 1.5M |
| A2 | 15 | 1000 | [1.0, 2.0, 3.0, 4.0] | 375 | 1.5M |
| A3 | 20 | 1000 | [1.0, 2.0, 3.0] | 500 | 1.5M |
| A4 | 20 | 1000 | [1.0, 2.0, 3.0, 4.0] | 375 | 1.5M |
| B1 | 15 | 100 | [1.0, 2.0, 3.0] | 5000 | 1.5M |
| B2 | 15 | 100 | [1.0, 2.0, 3.0, 4.0] | 3750 | 1.5M |
| B3 | 20 | 100 | [1.0, 2.0, 3.0] | 5000 | 1.5M |
| B4 | 20 | 100 | [1.0, 2.0, 3.0, 4.0] | 3750 | 1.5M |
| C1 | 15 | 500 | [1.0, 2.0, 3.0] | 1000 | 1.5M |
| C2 | 15 | 500 | [1.0, 2.0, 3.0, 4.0] | 750 | 1.5M |
| C3 | 20 | 500 | [1.0, 2.0, 3.0] | 1000 | 1.5M |
| C4 | 20 | 500 | [1.0, 2.0, 3.0, 4.0] | 750 | 1.5M |
Every configuration targets 1.5M total samples per molecule.
Loading the samples
Every sample file is a .npz with two arrays:
bitstrings: 1D array of fixed-width strings, one character ('0'/'1') per qubit, in little-endian qubit order (as returned directly by the hardware).count: 1D array of integers, the number of times each row ofbitstringswas measured.count.sum()is the total sample count for that file.
Only numpy and the Python standard library are needed to load them.
LUCJ
LUCJ samples need no further transformation: the qubit order already matches orbital order, so the bitstrings can be loaded and turned into a boolean configuration matrix directly.
import numpy as np
with np.load("shots/lucj/001_shots.npz") as data:
bitstrings = data["bitstrings"] # shape (num_unique,), dtype '<U{num_qubits}'
counts = data["count"] # shape (num_unique,), dtype int64
num_qubits = len(bitstrings[0])
num_samples = int(counts.sum())
# Boolean configuration matrix: rows are unique measured configurations,
# columns are qubits in little-endian order; shape (num_unique, num_qubits).
config_matrix = np.array([[c == "1" for c in bs] for bs in bitstrings], dtype=bool)
probabilities = counts / num_samples
SqDRIFT
Each SqDRIFT circuit may measure qubits in a randomized order, recorded as a permutation list in the matching *_metadata.txt file under sqdrift_permutations/. The bitstring columns must be reordered through this permutation before they can be interpreted in a fixed orbital order (e.g. to be merged across different randomizations/time points, or compared with the FCIDUMP active space).
Not every circuit has a permutation file: qubit randomization is only applied when the mode-rebalancing step used to optimize circuit depth succeeds, so some circuits keep the identity ordering and have no corresponding *_metadata.txt file. Treat a missing permutation file as the identity permutation (list(range(num_qubits))) — this is the same fallback used internally to post-process these samples.
import ast
import glob
import os
import re
import numpy as np
def load_sqdrift_samples(sample_npz_path, permutation_txt_path=None):
"""Load one SqDRIFT sample file and permute its columns to orbital order.
`permutation_txt_path` may point to a file that doesn't exist (or be
None): a circuit with no mode-rebalancing has no permutation file, which
is equivalent to the identity permutation.
"""
with np.load(sample_npz_path) as data:
bitstrings = data["bitstrings"]
counts = data["count"].astype(np.int64)
num_qubits = len(bitstrings[0])
if permutation_txt_path is not None and os.path.exists(permutation_txt_path):
with open(permutation_txt_path) as f:
permutation = ast.literal_eval(f.read().strip())
else:
permutation = list(range(num_qubits))
# The stored bitstrings are little-endian; convert the (big-endian)
# permutation to the equivalent little-endian column order.
permutation = np.asarray(permutation)
permutation_little_endian = (num_qubits - 1) - permutation[::-1]
# View each fixed-width string as an array of per-character codes, permute
# the columns, then view back as strings.
n = len(bitstrings)
codes = bitstrings.view(np.uint32).reshape(n, num_qubits)
permuted_codes = np.take(codes, permutation_little_endian, axis=1)
permuted_bitstrings = permuted_codes.view(f"<U{num_qubits}").ravel()
config_matrix = permuted_codes == ord("1") # shape (num_unique, num_qubits)
probabilities = counts / counts.sum()
return config_matrix, probabilities, permuted_bitstrings
config_matrix, probabilities, bitstrings = load_sqdrift_samples(
"shots/sqdrift/001/sqdrift_circuits__id_001__time_1.0__ngroups_15_randomization_0_shots.npz",
"shots/sqdrift_permutations/001/sqdrift_circuits__id_001__time_1.0__ngroups_15_randomization_0_metadata.txt",
)
Loading every circuit for a molecule
The helper below globs every *_shots.npz file in a molecule's SqDRIFT samples folder, loads and permutes each one via load_sqdrift_samples, and merges them into a single configuration matrix with summed counts (duplicate configurations, including ones only distinguished before permutation, collapse into one row with the combined count). This pools samples across randomizations and time points for one molecule into a single sample set.
def load_sqdrift_molecule(samples_dir, permutations_dir):
"""Load and merge all SqDRIFT samples for one molecule.
`samples_dir` is e.g. "shots/sqdrift/001" (or ".../001/<config>" for the
additional_sqdrift_configs_for_subset layout); `permutations_dir` is the
matching "shots/sqdrift_permutations/001[/<config>]" folder.
"""
all_bitstrings = []
all_counts = []
num_qubits = None
for sample_path in sorted(glob.glob(os.path.join(samples_dir, "*_shots.npz"))):
stem = re.sub(r"_shots$", "", os.path.splitext(os.path.basename(sample_path))[0])
permutation_path = os.path.join(permutations_dir, f"{stem}_metadata.txt")
config_matrix, _, bitstrings = load_sqdrift_samples(sample_path, permutation_path)
with np.load(sample_path) as data:
counts = data["count"].astype(np.int64)
if num_qubits is None:
num_qubits = config_matrix.shape[1]
all_bitstrings.append(bitstrings)
all_counts.append(counts)
bitstrings = np.concatenate(all_bitstrings)
counts = np.concatenate(all_counts)
# Merge duplicate configurations (post-permutation) by summing their counts.
unique_bitstrings, inverse = np.unique(bitstrings, return_inverse=True)
merged_counts = np.zeros(len(unique_bitstrings), dtype=np.int64)
np.add.at(merged_counts, inverse, counts)
config_matrix = np.array(
[[c == "1" for c in bs] for bs in unique_bitstrings], dtype=bool
)
probabilities = merged_counts / merged_counts.sum()
return config_matrix, probabilities, unique_bitstrings
config_matrix, probabilities, bitstrings = load_sqdrift_molecule(
"shots/sqdrift/001", "shots/sqdrift_permutations/001"
)
Files
additional_sqdrift_configs_for_subset_inventory.txt
Files
(34.4 GB)
| Name | Size | |
|---|---|---|
|
md5:0fe54634beca0cea97d350466a3ca8c0
|
227.4 MB | Preview Download |
|
md5:fd08fdc66d2198375b51f6b5f1fe8464
|
524.3 MB | Download |
|
md5:64206c944676d3ce9bc8c947aea7f724
|
524.3 MB | Download |
|
md5:9ae16e31bc9e5f1393dfff017104f49c
|
524.3 MB | Download |
|
md5:b4d3eea8794a5758aea8913eef581b5d
|
524.3 MB | Download |
|
md5:cb016fa52ca280f707046277cdc84a79
|
524.3 MB | Download |
|
md5:b183bd54d27832385fe731ea92457e73
|
524.3 MB | Download |
|
md5:271f491ab56ca27133f1debba78d904a
|
524.3 MB | Download |
|
md5:6e5bbb53215feadbe6bb20f71cef3d44
|
524.3 MB | Download |
|
md5:7f7e07f3f75823c7724c40ab9afaa17d
|
524.3 MB | Download |
|
md5:ec24d31f479e717197663339b7eec35d
|
524.3 MB | Download |
|
md5:ff2370e41bd19c34f2e51136aa3d21b5
|
524.3 MB | Download |
|
md5:89ad0a40150771614af624185bd1ee22
|
524.3 MB | Download |
|
md5:38f4eb8bbffae27390734237cd9f9459
|
208.4 MB | Download |
|
md5:6a284ed480d603707d6d42f4bb3995cd
|
33.7 MB | Download |
|
md5:106349beda1eee43e0b60f11ee26ada5
|
524.3 MB | Download |
|
md5:01aa0533ea16810dba8634be7ef4a07f
|
524.3 MB | Download |
|
md5:d8a93d291fd284b502d12292f0b42181
|
524.3 MB | Download |
|
md5:10c3385889e5162793c4ea9eda945bfc
|
512.5 MB | Download |
|
md5:c026f65377ff3547aa1b96a32341bc29
|
229.0 MB | Preview Download |
|
md5:c9fd4fc0f8d1507270a46df37af8e8e4
|
2.4 kB | Preview Download |
|
md5:ac9eb2200b227d82a3ed5595429915ee
|
524.3 MB | Download |
|
md5:10e0e79b41aaa8d133ccc013450e7271
|
524.3 MB | Download |
|
md5:40a8c0460beb30125b6410549b61977c
|
524.3 MB | Download |
|
md5:5d93b2d6df9b6296a64b65abbd67901e
|
524.3 MB | Download |
|
md5:fb0b7c4777c4c1f169533d2dd6596830
|
524.3 MB | Download |
|
md5:bf09f9c9dc5ce680f261293b3ba69ead
|
524.3 MB | Download |
|
md5:52d87d7ff18cd20deb8164c8d0e36a23
|
524.3 MB | Download |
|
md5:6d82a695f8961bd5947a01329d446cf7
|
524.3 MB | Download |
|
md5:656db1812cc6b65a531fadff6764a20d
|
524.3 MB | Download |
|
md5:a14f1f2d4538cab549ef7f65fb2cf874
|
524.3 MB | Download |
|
md5:014d1d0b1f92895bb5bdb0371d66e19b
|
524.3 MB | Download |
|
md5:7b5f0103263ef60aa248e3703ee6c115
|
524.3 MB | Download |
|
md5:7539fc44cda269862b9b99fab8b7b0c8
|
524.3 MB | Download |
|
md5:b357ebdda52e0ca07d78e9a22574eda4
|
524.3 MB | Download |
|
md5:60ea1ab59881558854c109cb6ed3c3ef
|
524.3 MB | Download |
|
md5:58029478312dd6a390e76b8709d99af7
|
524.3 MB | Download |
|
md5:82a2632ee507a9c6bf2b4fc5c0953289
|
524.3 MB | Download |
|
md5:4e21097fb70600f0514dcb316a0a2e97
|
524.3 MB | Download |
|
md5:26c33f1abaf6bd014e7a004a07a74971
|
524.3 MB | Download |
|
md5:a33d7d4ef3bafe7ca5393977fd00563d
|
524.3 MB | Download |
|
md5:15ec0cdddcf630eb73e478c7395db8d9
|
524.3 MB | Download |
|
md5:cf1377d37e97eb4bfed54b7d8d717758
|
524.3 MB | Download |
|
md5:ef343fc8940cfb0faa4cb1e8a5090fec
|
524.3 MB | Download |
|
md5:4d91091b4f21d870224ebd24e1959ab2
|
524.3 MB | Download |
|
md5:4743a029c4d106977c519f576b2edaaa
|
84.8 MB | Download |
|
md5:5e49d2196e8f77c90bb616b473a8cb5d
|
57.8 kB | Preview Download |
|
md5:fb4508916d8841dc17534c075c80c0dc
|
12.2 kB | Preview Download |
|
md5:c0ff86bb60287376b3e87bd806623fa5
|
524.3 MB | Download |
|
md5:66af134158b19ff7b30895ab1e54edf2
|
524.3 MB | Download |
|
md5:877bfa87493ae53c888685074b254c7a
|
524.3 MB | Download |
|
md5:febf003b8aaf20ea0a3a731533a9241e
|
524.3 MB | Download |
|
md5:22e5e7bdac257494a19bab846258d112
|
524.3 MB | Download |
|
md5:dd4b648016fc09a558fafbfef0b35771
|
524.3 MB | Download |
|
md5:0a274f7200b1fc6ebf8efca73fb2b59f
|
524.3 MB | Download |
|
md5:57aa4bbdd33c0e21d02d29ff6266f1ea
|
524.3 MB | Download |
|
md5:56f78c16f87654c4456db03741b6e80f
|
524.3 MB | Download |
|
md5:c5daa25c00e0511a186d377a911305f2
|
524.3 MB | Download |
|
md5:03205abdb94fd44d28345725dbd828e0
|
524.3 MB | Download |
|
md5:cb89d4bf995efe0b29bc525dc3e5092d
|
524.3 MB | Download |
|
md5:acf02b9a56a69bc2a1df39e7bd8a7cf7
|
524.3 MB | Download |
|
md5:8c0488183e0d15e8414e0a1affa623ee
|
524.3 MB | Download |
|
md5:cb4d97be7eb9ba596322c5816124e4c9
|
524.3 MB | Download |
|
md5:df4fbd23c3672ac7237d9194925aa16c
|
524.3 MB | Download |
|
md5:9a4fd10c01f0ab2a112764ff800534fa
|
524.3 MB | Download |
|
md5:32b10618eb3b749fb6712662a28a95b8
|
524.3 MB | Download |
|
md5:850cb010a1ab05bc199995f884b3bbfe
|
524.3 MB | Download |
|
md5:0e81dcf2a2aa963157a984ca43369336
|
524.3 MB | Download |
|
md5:ddd67b7684a25dfd3512aaa886145d42
|
524.3 MB | Download |
|
md5:82234b19636d7726cd2cb002cfd589ea
|
524.3 MB | Download |
|
md5:81a336407012fd07d485e83780cdf3c4
|
524.3 MB | Download |
|
md5:11fbd501c23601a33709e9dec5852bee
|
524.3 MB | Download |
|
md5:d8f2ebd69d5c20f56711a0527723f2ae
|
75.7 MB | Download |
|
md5:7a971b6966c91b54b2f56e8c2368d334
|
46.3 MB | Download |