memory-aware-build
Compile QDK Chemistry with memory-aware parallelism. Use this skill whenever building the C++ code, Python package, or dependencies, especially on machines with limited RAM or after an out-of-memory compiler failure.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 80
- Forks
- 40
01 前言 Front Matter
- name
- memory-aware-build
- description
- Compile QDK Chemistry with memory-aware parallelism. Use this skill whenever building the C++ code, Python package, or dependencies, especially on machines with limited RAM or after an out-of-memory compiler failure.
03 SKILL.md 正文
Memory-aware builds
QDK Chemistry compilation can require up to 8 GB of RAM per concurrent compile job. Limit build parallelism by both the available memory and the CPU count.
- Determine the number of logical CPUs and the available RAM.
- Reserve 8 GB of available RAM for each compile job.
- Set the job count to the smaller of:
- the logical CPU count;
floor(available RAM in GB / 8).
- Always use at least one job. If available memory cannot be determined, use one job.
- Export the result as
CMAKE_BUILD_PARALLEL_LEVELbefore invoking a build, including builds started indirectly bypip.
For example, a machine with 32 GB of available RAM and 16 logical CPUs should compile with at most four jobs:
export CMAKE_BUILD_PARALLEL_LEVEL=4
cmake --build cpp/build
For a Python package build, apply the same limit:
CMAKE_BUILD_PARALLEL_LEVEL=4 python -m pip install ./python
If a build is killed or reports an out-of-memory error, reduce
CMAKE_BUILD_PARALLEL_LEVEL further, preferably by half, and retry. Never
increase parallelism beyond the 8 GB-per-job memory limit merely to use all
available CPU cores.
04 同仓库更多 Skills
visualization
Describes QDK Chemistry visualization tools, their inputs, and their outputs.
resource-estimation
Explains QDK circuit resource-estimation parameters, result forms, and conceptual construction of custom QRE architecture and ISA studies. Use when estimating a stored circuit, choosing estimate_circuit parameters, interpreting estimates, or generating Python code for a custom qdk.qre analysis.
remote-execution
Describes the QDK Chemistry remote execution API and job lifecycle.
qdk-chemistry-overview
Describes the QDK Chemistry interfaces and the artifact types they read and write.
qdk-chemistry-mcp
Describes the QDK Chemistry MCP tool interface, return envelope, and tool categories.
qdk-chemistry-coding
Describes the Python API for discovering, configuring, and executing QDK Chemistry algorithms.