Metadata-Version: 2.4
Name: qcsc-prefect-qiskit
Version: 0.3.1
Summary: Native Qiskit integration utilities for QCSC Prefect workflows
Author: QCSC Prefect Contributors
Maintainer: QCSC Prefect Maintainers
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/qiskit-community/qcsc-prefect
Project-URL: Repository, https://github.com/qiskit-community/qcsc-prefect
Project-URL: Documentation, https://qiskit-community.github.io/qcsc-prefect/
Project-URL: Issues, https://github.com/qiskit-community/qcsc-prefect/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: anyio>=4
Requires-Dist: numpy
Requires-Dist: prefect>=2.19
Requires-Dist: pydantic>=2
Requires-Dist: qiskit-ibm-runtime>=0.46
Provides-Extra: slurm
Requires-Dist: qcsc-prefect-executor==0.3.1; extra == "slurm"

# QCSC Prefect Qiskit

Native Qiskit Runtime integration utilities for QCSC Prefect workflows.

QRMI sampling on IBM Quantum is available as
`qcsc_prefect.integrations.qiskit.qrmi.QrmiRuntime`, with settings that can be
saved as a `QrmiRuntimeBlock`.

- `scheduler="slurm"` (the default) runs in a Slurm job. Install the `slurm` extra
  on the workflow host to include the HPC executor. The compute-node entrypoint is
  `python -m qcsc_prefect.integrations.qiskit.qrmi.worker` or `qcsc-qrmi-sampler`.
- `scheduler="iqp"` runs in the workflow process, without Slurm or a session.
  Install `qrmi[ibm]` on that host.

`qcsc_prefect.integrations.qiskit.sources` gives applications one synchronous
`source.sample(circuit, shots=shots)` call over `RandomSource` (uniform random bits,
no circuit), `QrmiSource` (an existing `QrmiRuntime`) and `QFwSource` (the QFw-SLURM
launcher, with the `QFwResource` block). The reusable `QuantumSourceBlock` saves
source selection and platform settings for any algorithm: change the saved Block
name or its configuration to switch platforms. `QuantumSourceBlock.load_source(name)`
builds a source in the sampling worker. See
[Quantum Sources](../../docs/howto/howto_use_quantum_source.md).

See [QRMI Sampler](../../docs/howto/howto_qrmi_slurm_sampler.md) for configuration,
supported calls, optional compilation hooks, diagnostics and offline tests.
The [Slurm Bell example](../../examples/qrmi_slurm_bell/README.md) provides a minimal
flow and the three required execution blocks; the
[IQP Bell example](../../examples/qrmi_iqp_bell/README.md) needs only a runtime block.
