Skip to content
Current section
The Quantum Computing Enthusiast’s Hub
Saved
All sections

All sections

Saved
Simulation and scientific validity

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.

Synthetic decision model

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)

Synthetic one more checkpoint can remove a whole parallel job plot: Resident GiB per job versus Simulated qubits.
Synthetic baseline case. Horizontal axis: Simulated qubits. Vertical axis: Resident GiB per job. Curves show Model. These are computed teaching examples, not measured hardware results.

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
  1. Complex128 amplitudes use 16 × 2^24 bytes = 0.25 GiB. A GiB is 2^30 bytes.
  2. 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.
  3. The 24 jobs require 1 waves, each taking 22 seconds.
Baseline regime · synthetic calculated results
Calculated quantitySynthetic result
Dense state-vector memory, GiB0.25
Memory per checkpointed job, GiB0.625
Checkpointed concurrent jobs102
Checkpointed batch duration, seconds22
No-checkpoint concurrent jobs170
No-checkpoint duration, seconds20

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
  1. Complex128 amplitudes use 16 × 2^26 bytes = 1 GiB. A GiB is 2^30 bytes.
  2. 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.
  3. The 24 jobs require 1 waves, each taking 57 seconds.
Comparison regime · synthetic calculated results
Calculated quantitySynthetic result
Dense state-vector memory, GiB1
Memory per checkpointed job, GiB4.5
Checkpointed concurrent jobs28
Checkpointed batch duration, seconds57
No-checkpoint concurrent jobs85
No-checkpoint duration, seconds45

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
  1. Complex128 amplitudes use 16 × 2^29 bytes = 8 GiB. A GiB is 2^30 bytes.
  2. Workspace plus resident checkpoint copies multiply that state footprint by 4.5, giving 36 GiB per job. Floor available RAM divided by that footprint.
  3. The 24 jobs require 8 waves, each taking 94.2 seconds.
Extended regime · synthetic calculated results
Calculated quantitySynthetic result
Dense state-vector memory, GiB8
Memory per checkpointed job, GiB36
Checkpointed concurrent jobs3
Checkpointed batch duration, seconds753.6
No-checkpoint concurrent jobs10
No-checkpoint duration, seconds225

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?

Back to this lab in the catalog