Skip to content

Commit

Permalink
テストをさらに移行
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuhito committed Aug 9, 2023
1 parent 550a5f6 commit b08c335
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
12 changes: 12 additions & 0 deletions packages/simulator/test/simulator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -573,4 +573,16 @@ describe('Simulator', () => {
expect(equate(simulator.measuredBits, {0: 1, 1: 1})).toBeTruthy()
})
})

describe('cswap', () => {
test('|011>.cswap(0, 1, 2) should be |101>', () => {
const simulator = new Simulator('011')
expect(equate(simulator.cswap(0, 1, 2).state, new StateVector('101'))).toBeTruthy()
})

test('|011>.cswap(2, 0, 1) should be |011>', () => {
const simulator = new Simulator('011')
expect(equate(simulator.cswap(2, 0, 1).state, new StateVector('011'))).toBeTruthy()
})
})
})
16 changes: 0 additions & 16 deletions packages/simulator/test/simulator.ts

This file was deleted.

0 comments on commit b08c335

Please sign in to comment.