Simulator API¶
qm.simulate.interface.SimulationConfig
¶
Creates a configuration object to pass to qm.quantum_machines_manager.QuantumMachinesManager.simulate
PARAMETER | DESCRIPTION |
---|---|
duration |
The duration to run the simulation for, in clock cycles
TYPE:
|
include_analog_waveforms |
True to collect simulated analog waveform names
TYPE:
|
include_digital_waveforms |
True to collect simulated digital waveform names
TYPE:
|
simulation_interface |
Interface for to simulator. Currently supported interfaces
-
TYPE:
|
controller_connections |
A list of connections between the controllers in the config
TYPE:
|
extraProcessingTimeoutInMs |
timeout in ms to wait for stream processing to finish. Default is -1, which is disables the timeout
TYPE:
|
qm.simulate.loopback.LoopbackInterface
¶
Creates a loopback interface for use in qm.simulate.interface.SimulationConfig. A loopback connects the output of the OPX into it's input. This can be defined directly using the ports or through the elements.
PARAMETER | DESCRIPTION |
---|---|
connections |
List of tuples with loopback connections. Each tuple should represent physical connection between ports:
TYPE:
|
latency |
The latency between the OPX outputs and its input.
TYPE:
|
noisePower |
How much noise to add to the input.
TYPE:
|
latency |
The latency between the OPX outputs and its input.
TYPE:
|
noisePower |
How much noise to add to the input.
TYPE:
|
Example::
job = qmm.simulate(config, prog, SimulationConfig( duration=20000, # loopback from output 1 to input 2 of controller 1: simulation_interface=LoopbackInterface([("con1", 1, "con1", 2)])
qm.simulate.raw.RawInterface
¶
Creates a raw interface for use in qm.simulate.interface.SimulationConfig. A raw interface defines samples that will be inputted into the OPX inputs.
PARAMETER | DESCRIPTION |
---|---|
connections |
List of tuples with the connection. Each tuple should be:
TYPE:
|
noisePower |
How much noise to add to the input.
TYPE:
|
Example
qm.results.simulator_samples.SimulatorControllerSamples
¶
plot
¶
Plots the simulated output of the OPX in the given ports. If no ports are given, all active ports are plotted.
PARAMETER | DESCRIPTION |
---|---|
analog_ports |
Union[None, str, list[str]]
TYPE:
|
digital_ports |
Union[None, str, list[str]]
TYPE:
|