  The simulation of quantum effects requires certain classical resources, and
quantifying them is an important step in order to characterize the difference
between quantum and classical physics. For a simulation of the phenomenon of
state-independent quantum contextuality, we show that the minimal amount of
memory used by the simulation is the critical resource. We derive optimal
simulation strategies for important cases and prove that reproducing the
results of sequential measurements on a two-qubit system requires more memory
than the information carrying capacity of the system.
