How do memory boundaries change a simulator batch schedule?
One more checkpoint can remove a whole parallel job
Source research checked . Teaching calculations are ideal models.
Classical simulation resources grow rapidly with the number of represented qubits, but a state-vector size is only the start of memory accounting. Workspaces, snapshots and concurrent jobs compete for the same allocation. A modest extra resident buffer can push a job across a discrete concurrency boundary.
The lab budgets a dense complex128 state, a workspace factor and a declared number of resident checkpoint copies. It then floors available RAM divided by the complete per-job footprint. The number of waves needed to complete a batch can jump even when the footprint changes smoothly. A save-time cost adds a second effect that is kept separate from the lost parallel capacity.
Checkpointing can still be valuable because it protects work against failures. The no-failure schedule here deliberately does not assign that benefit a made-up value. A complete decision would model checkpoint location, restart frequency, save duration and recovery time. The existing state-vector calculator can use this example as an extension from abstract storage growth to a realistic question about which resources must coexist.
Start with the assumptions
- Checkpoints are additional resident full-state copies.
- All jobs take the same time and can run independently.
- No failures occur during this schedule comparison.
Dense complex128 state bytes = 16 × 2^qubits
Resident job GiB = state_GiB × (workspace factor + checkpoint copies)
Concurrency = floor(available_GiB / job_GiB)
Batch time = ceil(jobs/concurrency) × (base runtime + checkpoint-save time)
Compare the input regimes
Each case uses invented inputs. The results follow from this model and do not describe measured hardware.
Baseline regime
Complete inputs
- Simulated qubits
- 24
- Available RAM, GiB
- 64
- Workspace factor
- 1.5
- Checkpoint copies per job
- 1
- Independent jobs
- 24
- Base runtime per job, seconds
- 20
- Save time per checkpoint, seconds
- 2
- Complex128 amplitudes use 16 × 2^24 bytes = 0.25 GiB. A GiB is 2^30 bytes.
- Workspace plus resident checkpoint copies multiply that state footprint by 2.5, giving 0.625 GiB per job. Floor available RAM divided by that footprint.
- The 24 jobs require 1 waves, each taking 22 seconds.
| Calculated quantity | Synthetic result |
|---|---|
| Dense state-vector memory, GiB | 0.25 |
| Memory per checkpointed job, GiB | 0.625 |
| Checkpointed concurrent jobs | 102 |
| Checkpointed batch duration, seconds | 22 |
| No-checkpoint concurrent jobs | 170 |
| No-checkpoint duration, seconds | 20 |
Resident checkpoints can reduce concurrency at a discrete memory boundary, making the batch slower even before save time is counted. They may still be valuable for recovering failed work, but this no-failure schedule does not credit that benefit. Disk checkpoints, shared buffers, distributed simulation and restart probabilities need different accounting.
Comparison regime
Complete inputs
- Simulated qubits
- 26
- Available RAM, GiB
- 128
- Workspace factor
- 1.5
- Checkpoint copies per job
- 3
- Independent jobs
- 24
- Base runtime per job, seconds
- 45
- Save time per checkpoint, seconds
- 4
- Complex128 amplitudes use 16 × 2^26 bytes = 1 GiB. A GiB is 2^30 bytes.
- Workspace plus resident checkpoint copies multiply that state footprint by 4.5, giving 4.5 GiB per job. Floor available RAM divided by that footprint.
- The 24 jobs require 1 waves, each taking 57 seconds.
| Calculated quantity | Synthetic result |
|---|---|
| Dense state-vector memory, GiB | 1 |
| Memory per checkpointed job, GiB | 4.5 |
| Checkpointed concurrent jobs | 28 |
| Checkpointed batch duration, seconds | 57 |
| No-checkpoint concurrent jobs | 85 |
| No-checkpoint duration, seconds | 45 |
Resident checkpoints can reduce concurrency at a discrete memory boundary, making the batch slower even before save time is counted. They may still be valuable for recovering failed work, but this no-failure schedule does not credit that benefit. Disk checkpoints, shared buffers, distributed simulation and restart probabilities need different accounting.
Extended regime
Complete inputs
- Simulated qubits
- 29
- Available RAM, GiB
- 128
- Workspace factor
- 1.5
- Checkpoint copies per job
- 3
- Independent jobs
- 24
- Base runtime per job, seconds
- 75
- Save time per checkpoint, seconds
- 6.4
- Complex128 amplitudes use 16 × 2^29 bytes = 8 GiB. A GiB is 2^30 bytes.
- Workspace plus resident checkpoint copies multiply that state footprint by 4.5, giving 36 GiB per job. Floor available RAM divided by that footprint.
- The 24 jobs require 8 waves, each taking 94.2 seconds.
| Calculated quantity | Synthetic result |
|---|---|
| Dense state-vector memory, GiB | 8 |
| Memory per checkpointed job, GiB | 36 |
| Checkpointed concurrent jobs | 3 |
| Checkpointed batch duration, seconds | 753.6 |
| No-checkpoint concurrent jobs | 10 |
| No-checkpoint duration, seconds | 225 |
Resident checkpoints can reduce concurrency at a discrete memory boundary, making the batch slower even before save time is counted. They may still be valuable for recovering failed work, but this no-failure schedule does not credit that benefit. Disk checkpoints, shared buffers, distributed simulation and restart probabilities need different accounting.
Try the reasoning: At which memory boundary does an additional resident checkpoint remove a concurrent job? What benefit is missing from this no-failure comparison?