Python
execute_string
and execute_file
return either a SimulationResult
or a SimulationError
.
These are actually Python classes that work as bindings for accessing C++ code from Python.
They are defined in python/qxelarator/__init__.py
.
class SimulationResult
A simulation result object.
shots_requested:
Always equal to the number of iterations.
shots_done:
Always equal to the number of iterations.
results:
Contains the number of times a given measurement value is captured when running the iterations.
state:
Contains the full quantum state at the end of the very last iteration.
class SimulationError
A simulation error object, containing just an error message.
message:
Error message.