Loading...
Loading...
Contributors:
Dataset URI:
10.5281/zenodo.23286514Rights:
No information provided; contact the repository owner
A Molecular Hamiltonian and Quantum-Hardware Shots 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 shots) from two circuit families: LUCJ and SqDRIFT. The shots were measured on IBM Quantum hardware (156-qubit Heron r2 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) fcidump.tar.bz2 (split into .part000-.part003) — one FCIDUMP file per molecule (fcidump/<ID>.fcidump), the electronic structure Hamiltonian in the active space given in molecules_info.csv. lucj.tar.bz2 (split into .part000-.part024) — quantum-hardware measurement shots 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 shots 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 shots file's qubit columns back to orbital order (see "Loading the shots" below). inventory.txt — full file listing of the four archives above. LUCJ circuit parameters Parameter Value n_reps 1 Number of shots 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. shots (per circuit) 1,000 Total shots (per molecule) 1.5M Additional SqDRIFT configurations, 50-molecule subset (measured on ibm_fez) additional_sqdrift_configs_for_subset_sqdrift.tar.bz2 (split into .part000-.part012) additional_sqdrift_configs_for_subset_sqdrift_permutations.tar.bz2 additional_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. shots Total shots 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 shots per molecule. Loading the shots Every shots 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 of bitstrings was measured. count.sum() is the total shot count for that file. Only numpy and the Python standard library are needed to load them. LUCJ LUCJ shots 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_shots = 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_shots 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 shots. import ast import glob import os import re import numpy as np def load_sqdrift_shots(shots_npz_path, permutation_txt_path=None): """Load one SqDRIFT shots 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(shots_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_shots( "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 shots folder, loads and permutes each one via load_sqdrift_shots, 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 shots across randomizations and time points for one molecule into a single sample set. def load_sqdrift_molecule(shots_dir, permutations_dir): """Load and merge all SqDRIFT shots for one molecule. `shots_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 shots_path in sorted(glob.glob(os.path.join(shots_dir, "*_shots.npz"))): stem = re.sub(r"_shots$", "", os.path.splitext(os.path.basename(shots_path))[0]) permutation_path = os.path.join(permutations_dir, f"{stem}_metadata.txt") config_matrix, _, bitstrings = load_sqdrift_shots(shots_path, permutation_path) with np.load(shots_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" )
Keyword(s):
MeSH Term(s):
Grants and Funding:
No Grants or Funding Data Available
Associated Publication(s):
No Associated Publication Data Available
Supplementary Data:
No Supplementary Data Available
Related Dataset(s):
No Related Dataset Data Available
The National Library of Medicine (NLM) provides information about biomedical datasets. Inclusion on an NLM Web page does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health. Learn more: NLM Web Policies (nih.gov)