/// <summary> /// Execute the given <code>qasmExe.code</code> launching <code>qasmExe.shots</code> executions. /// When the result is ready, the <code>onExecuted</code> callback will be called. /// The <see cref="OnExecuted"/> will recieve <see cref="QASMExecutionResult"/> /// with the per shot results as rawResult. /// If the backends does not supports memory feature, the raw result will be simulated with /// accumulated results. /// </summary> /// <param name="qasmExe">Executable configuration</param> /// <param name="onExecuted">The callback called when execution ends</param> public void ExecuteCodeRawResult(QASMExecutable qasmExe, OnExecuted onExecuted) { RequestBackendConfig((_) => { GenericExecution(qasmExe, useMemory: _backendConfig.supportsMemory, (jsonResult) => { if (_backendConfig.supportsMemory) { onExecuted(ReadRawDataJSON(jsonResult)); } else { QASMExecutionResult result = ReadCountJSON(jsonResult); result.SimulateRawResult(); onExecuted(result); } }); }); }