Skip to content

Commit

Permalink
Rewrite AmplitudeDisplay to compute a quality metric instead of a pas…
Browse files Browse the repository at this point in the history
…s/fail on incoherence

- Pick largest vector component conditioned on other qubits, then dot product it onto all cases and add up the norms
- Add Shaders.sumFoldFloatAdjacents
- Add Shaders.floatData
- Fix arrayPowerSizeOfTexture going below 0 causing all sim output to be lost
- Fix cycleAllBitsFloat using vec2 instead of float when checking texture size
  • Loading branch information
Strilanc committed Mar 24, 2019
1 parent f2e4e8b commit 3ad0ce5
Show file tree
Hide file tree
Showing 7 changed files with 303 additions and 496 deletions.
2 changes: 1 addition & 1 deletion src/circuit/GateShaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const CYCLE_ALL_SHADER_VEC2 = makePseudoShaderWithInputsAndOutputAndCode(
* @returns {!WglConfiguredShader}
*/
GateShaders.cycleAllBitsFloat = (inputTexture, shiftAmount) => {
let size = currentShaderCoder().vec2.arrayPowerSizeOfTexture(inputTexture);
let size = currentShaderCoder().float.arrayPowerSizeOfTexture(inputTexture);
return CYCLE_ALL_SHADER_FLOAT(
inputTexture,
WglArg.float("shiftAmount", 1 << Util.properMod(-shiftAmount, size)));
Expand Down
Loading

0 comments on commit 3ad0ce5

Please sign in to comment.