Using a Noisy Simulator
Goal
Set up and run a calculation using noisy simulators.
Why Use Noisy Simulation?
When developing quantum chemistry algorithms, it is common to first run on an ideal simulator (perfect, noiseless). This allows you to:
Debug the circuit;
Verify correctness of the results;
Compare against classical references.
However, ideal simulation does not reflect the errors that occur on actual quantum hardware:
Gate errors: Imperfect gate execution;
Decoherence: Loss of quantum state information over time;
Readout errors: Measurement results occasionally flipped in a certain measurement basis.
By using a noisy simulator, you can test:
How robust your algorithm is to realistic noise;
The effectiveness of error mitigation strategies;
Whether circuit optimization actually improves real-hardware performance.
Using Noisy Simulators
Kvantify Qrunch supports several noisy simulators, which replicate the layout and error rates of specific devices. Noisy simulation relies on the following principles:
All backends representing real hardware have device data that can be used for a noisy simulation of that device.
All noisy simulators can take device data for a given hardware device, and simulate that device locally.
Example: Simulating the IQM Emerald device locally on Kvantify’s proprietary memory-restricted simulator:
import qrunch as qc
backend = (
qc.backend_creator()
.iqm_resonance(token=..., device="emerald")
.create()
)
device_data = backend.get_device_data()
sampler = (
qc.sampler_creator()
.backend()
.choose_backend()
.local_amazon_braket(device_to_simulate=device_data)
.create()
)
This uses Amazon Braket’s density matrix simulator to perform noisy simulations using IQM Emerald’s latest calibration data. Your quantum circuits will experience gate and readout errors similar to the actual Emerald device — but without sending jobs to the cloud.
The supported noisy simulators are:
Braket density matrix simulator: Simulates the device with full memory resources using Amazon Braket.
Qiskit Aer density matrix simulator: Simulates the device with full memory resources using Qiskit Aer.
Tips for Working with Noisy Simulators
Increase shots — Noisy simulation benefits from higher shot counts to reduce statistical error.
Test both ideal and noisy runs — Compare performance to identify the noise sensitivity of your ansatz.
Use error mitigation — Some backends support built-in error mitigation; you can also integrate your own routines.
Balance fidelity and speed — Density-matrix simulation is accurate but can be much slower than state vector simulations (which do not include noise).
See Also
Choose a Backend for more details on backend options.
Using Quantum Computers for more details on running jobs on real quantum hardware.