Skip to content

Commit

Permalink
Fix #1299 for 1.3 (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
billti authored Mar 22, 2024
1 parent 072d85d commit cfc3bc9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vscode/src/debugger/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export function createDebugConsoleEventTarget(out: (message: string) => void) {
return phase.toFixed(4);
}

const dump = evt.detail;
const basisStates = Object.keys(dump);
const stateTable = evt.detail.state;
const basisStates = Object.keys(stateTable);
const basisColumnWidth = Math.max(
basisStates[0]?.length ?? 0,
"Basis".length,
Expand All @@ -46,7 +46,7 @@ export function createDebugConsoleEventTarget(out: (message: string) => void) {
"-------------------------------------------\n";

for (const row of basisStates) {
const [real, imag] = dump.state[row];
const [real, imag] = stateTable[row];
const basis = row.padStart(basisColumnWidth);
const amplitude = formatComplex(real, imag).padStart(16);
const probability = formatProbabilityPercent(real, imag).padStart(11);
Expand Down

0 comments on commit cfc3bc9

Please sign in to comment.