Reproducibility
DQCsim provides various mechanisms that can be used to reproduce a previously performed simulation. This is intended primarily for debugging. Say, for instance, that the simulation returns a result that you were not expecting, while you did'nt have the logging verbosity set high enough to debug it. Without a way to precisely reproduce the simulation run, you may never get the same result again if it was due to random chance!
Random seed
DQCsim provides each plugin with a pseudorandom number generator that is guaranteed to return the same results every time for a specific random seed. By default, the random seed is randomly generated using entropy from the system clock, but you can also specify it manually to get deterministic simulations.
Reproduction files
More powerful than simply setting a random seed are reproduction files. A reproduction file is a YAML description of a previously performed simulation, containing all information needed to reproduce the simulation under normal circumstances. Sometimes DQCsim may need some help from the user, for instance when the simulation is to be reproduced on another computer, but in general it should work out of the box.
The command-line interface allows you to reproduce a simulation either exactly or as if you were reproducing a physical experiment. The seed specified in the reproduction file is ignored in the latter case.
When you run a simulation using the command-line interface, a reproduction file will be generated by default. In this case, the reproduction file is ultimately little more than the options you specified on the command. However, it is usually also possible to generate a reproduction file when a host program is involved. In this case, DQCsim will record the functions it calls on the host interface into the reproduction file, such that the command-line interface can reproduce the simulation later. This takes any non-deterministic behavior of the host program out of the equation.