Skip to content

Commit 14d52e3

Browse files
committed
Fix remaining TypeScript errors - remove unused targetPairs and use Basis enum
1 parent a606bad commit 14d52e3

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/engine/monteCarloSimulationEngine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class MonteCarloSimulationEngine implements ISimulationEngine {
184184
return;
185185
}
186186

187-
const { controlPairs, targetPairs, jointStates } = this.state.pendingPairs;
187+
const { controlPairs, jointStates } = this.state.pendingPairs;
188188

189189
if (!jointStates || jointStates.length === 0) {
190190
console.error("No joint states to measure");

tests/components/DensityMatrixView.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from 'react';
33
import { render, screen } from '@testing-library/react';
44
import DensityMatrixView from '../../src/components/DensityMatrixView';
55
import { DensityMatrix } from '../../src/engine_real_calculations';
6+
import { Basis } from '../../src/engine/types';
67

78
// Mock implementation of DensityMatrix for testing
89
class MockDensityMatrix {
@@ -28,7 +29,7 @@ describe('DensityMatrixView', () => {
2829
Array(4).fill(0).map(() => Array(4).fill({ re: 0, im: 0 }))
2930
) as unknown as DensityMatrix;
3031

31-
render(<DensityMatrixView matrix={zeroMatrix} basis="bell" isWerner={true} />);
32+
render(<DensityMatrixView matrix={zeroMatrix} basis={Basis.Bell} isWerner={true} />);
3233

3334
// Check for title
3435
expect(screen.getByText('Density Matrix (Bell Basis)')).toBeDefined();
@@ -48,7 +49,7 @@ describe('DensityMatrixView', () => {
4849
Array(4).fill(0).map(() => Array(4).fill({ re: 0, im: 0 }))
4950
) as unknown as DensityMatrix;
5051

51-
render(<DensityMatrixView matrix={zeroMatrix} basis="computational" isWerner={true} />);
52+
render(<DensityMatrixView matrix={zeroMatrix} basis={Basis.Computational} isWerner={true} />);
5253

5354
// Check for title
5455
expect(screen.getByText('Density Matrix (Computational Basis)')).toBeDefined();

0 commit comments

Comments
 (0)