Local Simulation
Not every quantum workflow needs to be sent to the cloud. Local simulation provides a fast, cost-effective alternative for prototyping, debugging, and sandboxing quantum workloads.
Divi runs local simulations using Qiskit’s AerSimulator
under the hood, giving you access to a high-performance simulator that supports custom noise models. You can supply your own noise profile or use the noise model of a fake backend to emulate realistic hardware behavior—all without leaving your machine.
This makes it easy to experiment with algorithms, validate logic, or test error mitigation strategies before deploying to actual quantum hardware. When you’re ready, switching to a cloud-based backend is just a configuration change away.
Simulation Modes
Noiseless Simulation
When initializing a local simulator instance, one can provide the number of shots of the simulation, the number of AerSimulator
instances (think of this as the number of quantum backends you have in your cluster), as well as the simulation’s sampling seed.
The following configuration create an exact simulator:
from divi.parallel_simulator import ParallelSimulator
backend = ParallelSimulator(
n_processes = 3,
shots = 5000,
simulation_seed=1997,
)
Noisy Simulation
In the case of noisy simulation, an instance of NoiseModel
from Qiskit can be passed into the constructor through the noise_model
argument. Otherwise, if one would like to pass a device, it can also be passed to the constructor
through the qiskit_backend
argument. One can also pass "auto"
to this argument, which would choose the smallest possible and most recent fake backend available through Qiskit. For example, a 5-qubit circuit would run on the FakeManilaV2
backend,
while a 25-qubit circuit will run on the FakeGeneva
backend.
noise_model
and qiskit_backend
can be passed to the constructor at a time.