Skip to content

Commit

Permalink
Telementry event for noisy simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Vasilevsky committed Oct 30, 2024
1 parent dc2f1cf commit 78ea048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vscode/src/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export enum EventType {
ResourceEstimationEnd = "Qsharp.ResourceEstimationEnd",
TriggerHistogram = "Qsharp.TriggerHistogram",
HistogramStart = "Qsharp.HistogramStart",
NoisySimulation = "Qsharp.NoisySimulation",
HistogramEnd = "Qsharp.HistogramEnd",
FormatStart = "Qsharp.FormatStart",
FormatEnd = "Qsharp.FormatEnd",
Expand Down Expand Up @@ -209,6 +210,10 @@ type EventTypes = {
properties: { associationId: string };
measurements: Empty;
};
[EventType.NoisySimulation]: {
properties: { associationId: string };
measurements: Empty;
};
[EventType.HistogramEnd]: {
properties: { associationId: string };
measurements: { timeToCompleteMs: number };
Expand Down
3 changes: 3 additions & 0 deletions vscode/src/webviewPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ export function registerWebViewCommands(context: ExtensionContext) {
sendTelemetryEvent(EventType.HistogramStart, { associationId }, {});

const noise = getPauliNoiseModel();
if (noise[0] != 0 || noise[1] != 0 || noise[2] != 0) {
sendTelemetryEvent(EventType.NoisySimulation, { associationId }, {});
}
await worker.runWithPauliNoise(
program.programConfig,
"",
Expand Down

0 comments on commit 78ea048

Please sign in to comment.