Emulation configuration
More experienced users might want to fully configure an emulator to exploit all its possibilities,
such as defining which observables to measure during the emulation, or emulating real hardware modulation effects.
This is done through the EmulationConfig object.
from qoolqit import Drive, Ramp, Register, Constantfrom qoolqit import QuantumProgramfrom qoolqit import MockDevice
register = Register.from_coordinates([(0,1), (0,-1), (2,0)])omega = 0.8delta_i = -2.0 * omegadelta_f = -delta_iT = 25.0wf_amp = Constant(T, omega)wf_det = Ramp(T, delta_i, delta_f)drive = Drive(amplitude = wf_amp, detuning = wf_det)program = QuantumProgram(register, drive)device = MockDevice()program.compile_to(device)from qoolqit.execution import EmulationConfig, LocalEmulator, Occupation
observables = (Occupation(evaluation_times=[0.1, 0.5, 1.0]),)emulation_config = EmulationConfig( observables=observables, with_modulation=True )The configuration is then passed to the emulator at instantiation:
emulator = LocalEmulator(emulation_config=emulation_config)The key parameters of EmulationConfig are:
| Parameter | Description |
|---|---|
observables |
Sequence of observables to compute during emulation. |
default_evaluation_times |
Default relative times (between 0 and 1) at which observables are evaluated, or "Full" for every emulation step. Defaults to (1.0,) (end of simulation only). |
with_modulation |
Whether to emulate finite-bandwidth hardware modulation of the drive. |
initial_state |
Custom initial state (defaults to all qubits in the ground state). |
noise_model |
Optional noise model to apply during emulation. |
