Quantum-Game / quantum-game-2

LEGACY open-source version of Quantum Game 2 (Sept 2019 - Oct 2020)
https://quantumgame.io
MIT License
65 stars 16 forks source link

perf(Simulation) qt 0.4.9 for speed update #221

Closed stared closed 4 years ago

stared commented 4 years ago

I try to use new performance updates from quantum-tensors 0.4.9, see https://github.com/Quantum-Game/quantum-tensors/pull/32.

However, even tests in https://github.com/Quantum-Game/quantum-tensors/blob/master/tests/Photons.test.ts pass (see https://travis-ci.com/github/Quantum-Game/quantum-tensors/builds/181135173) we get errors in the game:

Screenshot 2020-08-25 at 22 57 10

It seems that with each operation, instead of newVec = diffU.mul(oldVec) + oldVec we get newVec = U.mul(oldVec) + oldVec. So that, among other issues:

I look at the errors, and so far it seems that:

this.photons.cachedDiffU in QuantumFrame.ts gives wrong results (instead of only elements, it contains identity). I don't have any idea why.

stared commented 4 years ago

Fixed in https://github.com/Quantum-Game/quantum-tensors/pull/34, now connected by #226.

stared commented 4 years ago

Adding it before #226. For a starter, we want a minimal connection.