QCSC Prefect SBD
Shared Python-side SBD Davidson solver integration for qcsc-prefect workflows.
This package provides:
SBDSolverJobas a Prefect block (block type slugsbd_solver_job)SBDResult, the parsed solver outputcreate_sbd_blocks/register_sbd_block_types: create the command, execution-profile, HPC-profile and solver blocks forlocal,slurm,miyabiorfugaku- SBD input/output file handling and scheduler execution through qcsc-prefect blocks
It is intended to be reused by multiple algorithms. Installing this package does not
build, download, vendor, or install the external SBD executable (diag). The executable
must be compiled separately for each target HPC environment.
Source-tree native build helper assets live under:
packages/qcsc-prefect-sbd/native
They are not part of the Python package install. See native/README.md
for the build scripts and how to point sbd_executable at the separately built binary.
Usage Example
from qcsc_prefect_sbd import SBDSolverJob, create_sbd_blocks
create_sbd_blocks(
hpc_target="slurm",
queue="normal",
root_dir="/shared/sbd-jobs",
sbd_executable="/abs/path/to/qcsc-prefect/packages/qcsc-prefect-sbd/native/diag",
num_nodes=2,
mpiprocs=4,
mpi_options=["--mpi=pmix"],
)
# Inside a flow:
solver = await SBDSolverJob.load("sbd-solver")
result = await solver.run(
ci_strings=(alpha_strings, beta_strings),
one_body_tensor=h1,
two_body_tensor=h2,
norb=norb,
nelec=nelec,
)
print(result.energy, result.carryover_bitstrings.shape)
create_sbd_blocks checks the request before it saves any block: local execution takes
no modules or pre_commands, gpus_per_node must fit the target, solver_mode="gpu"
needs resource_class="gpu", and task_comm_size x adet_comm_size x bdet_comm_size must
divide the MPI rank count (num_nodes x mpiprocs). The launcher defaults to single
(local), srun (Slurm), mpiexec.hydra (Miyabi) or mpiexec (Fugaku).
Closed and open shells
SBDSolverJob.run takes the same arguments as DiceSHCISolverJob.run. SBD diagonalizes
in the product of the alpha and beta determinant sets with the restricted integrals, so it
solves closed-shell and restricted open-shell (ROHF, nelec[0] != nelec[1]) problems.
- When the alpha and beta sets are the same, SBD reads
AlphaDets.binfor both spins. - When they differ (always for
nelec[0] != nelec[1]), the beta set goes toBetaDets.bin(--bdetfile), andSBDResult.carryover_bitstrings_bholds the beta carryover. It is None when one set is shared.
run raises ValueError (see check_sbd_input) when:
- the alpha set does not start with its Hartree-Fock determinant,
(1 << nelec[0]) - 1, or the beta set with(1 << nelec[1]) - 1; spin_sqis notNone(SBD has no total spin target).
Each determinant must also have nelec[0] (alpha) or nelec[1] (beta) set bits and a
set must not repeat a determinant. The FCIDUMP has no core energy, so energy is the
electronic energy, as with the DICE solver.
The block refers to a CommandBlock, an ExecutionProfileBlock and an HPCProfileBlock
by name. create_sbd_blocks creates all four. In the open-loop SQD workflow,
sqd-create-blocks --solver sbd (algorithms/open_loop/sqd/sqd_sbd/create_blocks.py)
creates them from sqd_blocks.toml as sqd-sbd-solver, cmd-sqd-sbd-solver,
exec-sqd-sbd-<system> and hpc-<system>-sqd-sbd; see
its README.
algorithms/closed_loop/sqd_de/create_blocks.py creates them for the closed-loop
workflow on Miyabi, Fugaku or Slurm.
Blocks saved before this package existed, when SBDSolverJob was defined in
algorithms/closed_loop/sqd_de, keep working: the block type name (SBD Solver Job) and
slug are unchanged, and carryover_type, which they lack, defaults to 1.
Metadata
Release files for qcsc-prefect-sbd 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qcsc_prefect_sbd-0.3.1.tar.gz | 22.8 kB | With provenance | Details for qcsc_prefect_sbd-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qcsc_prefect_sbd-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for qcsc_prefect_sbd-0.3.1-py3-none-any.whl |
Total release size: 34.4 kB
Release files / qcsc_prefect_sbd-0.3.1.tar.gz
| Download URL | qcsc_prefect_sbd-0.3.1.tar.gz |
|---|---|
| Size | 22.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52cf141ae8eeb3f6e26b2cf282aea7f7bb17126a7aaecd97caa3a116ddb45a9d
|
|
BLAKE2b-256 checksum How to use checksums |
c223bf3e7bde5d061c3dc119358959b27c2fb5760d8f8961f37317e06b5ff303
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logRelease files / qcsc_prefect_sbd-0.3.1-py3-none-any.whl
| Download URL | qcsc_prefect_sbd-0.3.1-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
08e589179bd1966c92dd49ec8afaabbdcb160d985f563a2f405944adece6c622
|
|
BLAKE2b-256 checksum How to use checksums |
a1b534efdc7a2c9c241c56ee1504b7ab26408448b3d99db4ea99ed1b78cbe741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logSecurity for qcsc-prefect-sbd 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for qcsc_prefect_sbd-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.