Skip to content

Commit

Permalink
Update more import statements from absolute to relative (Strilanc#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
secor authored May 25, 2021
1 parent 85c59b7 commit 294431e
Show file tree
Hide file tree
Showing 48 changed files with 116 additions and 116 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Quirk",
"description": "A drag-and-drop toy for exploring and understanding small quantum circuits.",
"license": "Apache-2.0",
"version": "2.3.1",
"version": "2.3.2",
"homepage": "https://github.com/Strilanc/Quirk",
"bugs": {
"url": "https://github.com/Strilanc/Quirk/issues"
Expand Down
2 changes: 1 addition & 1 deletion src/fallback.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {describe} from "src/base/Describe.js"
import {describe} from "./base/Describe.js"

/**
* @type {!Array.<{regex: !Pattern, handler: !function()}>}
Expand Down
6 changes: 3 additions & 3 deletions src/gates/AmplitudeDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/

import {Config} from "../Config.js"
import {CircuitShaders} from "../circuit//CircuitShaders.js"
import {Gate} from "../circuit//Gate.js"
import {CircuitShaders} from "../circuit/CircuitShaders.js"
import {Gate} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {GateShaders} from "../circuit//GateShaders.js"
import {GateShaders} from "../circuit/GateShaders.js"
import {Format} from "../base/Format.js"
import {MathPainter} from "../draw/MathPainter.js"
import {Matrix, complexVectorToReadableJson, realVectorToReadableJson} from "../math/Matrix.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/ArithmeticGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import {Gate} from "../circuit//Gate.js"
import {Gate} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {WglArg} from "../webgl/WglArg.js"

let ArithmeticGates = {};
Expand Down
4 changes: 2 additions & 2 deletions src/gates/BitCountGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import {Config} from "../Config.js"
import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {Util} from "../base/Util.js"
import {WglArg} from "../webgl/WglArg.js"

Expand Down
2 changes: 1 addition & 1 deletion src/gates/BlochSphereDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import {Config} from "../Config.js"
import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {MathPainter} from "../draw/MathPainter.js"
import {Point} from "../math/Point.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/ComparisonGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {GateBuilder} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js"

let ComparisonGates = {};
Expand Down
6 changes: 3 additions & 3 deletions src/gates/Controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {GateShaders} from "../circuit//GateShaders.js"
import {GateShaders} from "../circuit/GateShaders.js"
import {HalfTurnGates} from "./HalfTurnGates.js"
import {QuarterTurnGates} from "./QuarterTurnGates.js"
import {Config} from "../Config.js"
import {ketArgs, ketShaderPermute} from "../circuit//KetShaderUtil.js";
import {ketArgs, ketShaderPermute} from "../circuit/KetShaderUtil.js";
import {WglArg} from "../webgl/WglArg.js";
import {Util} from "../base/Util.js";

Expand Down
4 changes: 2 additions & 2 deletions src/gates/CountingGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/

import {Config} from "../Config.js"
import {Gate, GateBuilder} from "../circuit//Gate.js"
import {Gate, GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Matrix} from "../math/Matrix.js"
import {Point} from "../math/Point.js"
import {ketArgs} from "../circuit//KetShaderUtil.js"
import {ketArgs} from "../circuit/KetShaderUtil.js"
import {WglArg} from "../webgl/WglArg.js"

import {offsetShader} from "./IncrementGates.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/CycleBitsGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

import {Config} from "../Config.js"
import {Gate} from "../circuit//Gate.js"
import {Gate} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {ketArgs, ketShaderPermute} from "../circuit//KetShaderUtil.js"
import {ketArgs, ketShaderPermute} from "../circuit/KetShaderUtil.js"
import {Matrix} from "../math/Matrix.js"
import {Point} from "../math/Point.js"
import {Util} from "../base/Util.js"
Expand Down
2 changes: 1 addition & 1 deletion src/gates/Debug_ErrorInjectionGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import {DetailedError} from "../base/DetailedError.js"
import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"

let ErrorInjectionGate = new GateBuilder().
Expand Down
6 changes: 3 additions & 3 deletions src/gates/DensityMatrixDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

import {CircuitShaders} from "../circuit//CircuitShaders.js"
import {Gate, GateBuilder} from "../circuit//Gate.js"
import {CircuitShaders} from "../circuit/CircuitShaders.js"
import {Gate, GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {GateShaders} from "../circuit//GateShaders.js"
import {GateShaders} from "../circuit/GateShaders.js"
import {MathPainter} from "../draw/MathPainter.js"
import {Matrix} from "../math/Matrix.js"
import {Shaders} from "../webgl/Shaders.js"
Expand Down
26 changes: 13 additions & 13 deletions src/gates/Detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
* limitations under the License.
*/

import {GateBuilder} from 'src/circuit/Gate.js'
import {amplitudesToProbabilities} from 'src/gates/ProbabilityDisplay.js'
import {WglTexturePool} from 'src/webgl/WglTexturePool.js';
import {WglTextureTrader} from 'src/webgl/WglTextureTrader.js';
import {Shaders} from 'src/webgl/Shaders.js'
import {currentShaderCoder, Inputs} from 'src/webgl/ShaderCoders.js';
import {CircuitShaders} from 'src/circuit/CircuitShaders.js'
import {Controls} from 'src/circuit/Controls.js';
import {WglArg} from 'src/webgl/WglArg.js';
import {Config} from 'src/Config.js'
import {GatePainting} from 'src/draw/GatePainting.js'
import {makePseudoShaderWithInputsAndOutputAndCode, Outputs} from 'src/webgl/ShaderCoders.js';
import {GateBuilder} from "../circuit/Gate.js"
import {amplitudesToProbabilities} from "../gates/ProbabilityDisplay.js"
import {WglTexturePool} from "../webgl/WglTexturePool.js";
import {WglTextureTrader} from "../webgl/WglTextureTrader.js";
import {Shaders} from "../webgl/Shaders.js"
import {currentShaderCoder, Inputs} from "../webgl/ShaderCoders.js";
import {CircuitShaders} from "../circuit/CircuitShaders.js"
import {Controls} from "../circuit/Controls.js";
import {WglArg} from "../webgl/WglArg.js";
import {Config} from "../Config.js"
import {GatePainting} from "../draw/GatePainting.js"
import {makePseudoShaderWithInputsAndOutputAndCode, Outputs} from "../webgl/ShaderCoders.js";
import {Matrix} from "../math/Matrix.js";
import {GateShaders} from "../circuit//GateShaders.js";
import {GateShaders} from "../circuit/GateShaders.js";
import {Point} from "../math/Point.js";
import {DetailedError} from "../base/DetailedError.js";
import {QuarterTurnGates} from "./QuarterTurnGates.js";
Expand Down
2 changes: 1 addition & 1 deletion src/gates/ExponentiatingGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Matrix} from "../math/Matrix.js"

Expand Down
4 changes: 2 additions & 2 deletions src/gates/FourierTransformGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import {Complex} from "../math/Complex.js"
import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPhase} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPhase} from "../circuit/KetShaderUtil.js"
import {Matrix} from "../math/Matrix.js"
import {HalfTurnGates} from "./HalfTurnGates.js"
import {reverseShaderForSize} from "./ReverseBitsGate.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/HalfTurnGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

import {Gate, GateBuilder} from "../circuit//Gate.js"
import {Gate, GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Matrix} from "../math/Matrix.js"
import {Point} from "../math/Point.js"
import {ketArgs, ketShader, ketShaderPermute} from "../circuit//KetShaderUtil.js"
import {ketArgs, ketShader, ketShaderPermute} from "../circuit/KetShaderUtil.js"

/**
* Gates that correspond to 180 degree rotations around the Bloch sphere, so they're their own inverses.
Expand Down
4 changes: 2 additions & 2 deletions src/gates/Impossible_UniversalNotGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {ketArgs, ketShader} from "../circuit//KetShaderUtil.js"
import {GateBuilder} from "../circuit/Gate.js"
import {ketArgs, ketShader} from "../circuit/KetShaderUtil.js"
import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js"

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gates/IncrementGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {Gate} from "../circuit//Gate.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute} from "../circuit//KetShaderUtil.js"
import {WglArg} from "../webgl/WglArg.js"

Expand Down
2 changes: 1 addition & 1 deletion src/gates/InputGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {Gate, GateBuilder} from "../circuit//Gate.js"
import {Gate, GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {reverseShaderForSize} from "./ReverseBitsGate.js"

Expand Down
4 changes: 2 additions & 2 deletions src/gates/InterleaveBitsGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import {Config} from "../Config.js"
import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute} from "../circuit/KetShaderUtil.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Point} from "../math/Point.js"
import {Seq} from "../base/Seq.js"
Expand Down
2 changes: 1 addition & 1 deletion src/gates/Joke_ImaginaryGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {Matrix} from "../math/Matrix.js"
import {Complex} from "../math/Complex.js"
import {GatePainting} from "../draw/GatePainting.js"
Expand Down
2 changes: 1 addition & 1 deletion src/gates/Joke_MysteryGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import {Complex} from "../math/Complex.js"
import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Matrix} from "../math/Matrix.js"

Expand Down
2 changes: 1 addition & 1 deletion src/gates/Joke_NeGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {Matrix} from "../math/Matrix.js"
import {Point} from "../math/Point.js"
import {GatePainting} from "../draw/GatePainting.js"
Expand Down
2 changes: 1 addition & 1 deletion src/gates/Joke_ZeroGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Matrix} from "../math/Matrix.js"

Expand Down
2 changes: 1 addition & 1 deletion src/gates/MeasurementGate.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import {Config} from "../Config.js"
import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"

/**
Expand Down
4 changes: 2 additions & 2 deletions src/gates/ModularAdditionGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {Util} from "../base/Util.js"
import {WglArg} from "../webgl/WglArg.js"
import {modulusTooBigChecker} from "./ModularIncrementGates.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/ModularIncrementGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {Util} from "../base/Util.js"
import {WglArg} from "../webgl/WglArg.js"

Expand Down
4 changes: 2 additions & 2 deletions src/gates/ModularMultiplicationGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
*/

import {Config} from "../Config.js";
import {Gate} from "../circuit//Gate.js"
import {Gate} from "../circuit/Gate.js"
import {
ketArgs,
ketShaderPermute,
ketInputGateShaderCode
} from "../circuit//KetShaderUtil.js"
} from "../circuit/KetShaderUtil.js"
import {modulusTooBigChecker} from "./ModularIncrementGates.js"
import {BIG_MUL_MOD_SHADER_CODE} from "./MultiplyAccumulateGates.js"
import {Util} from "../base/Util.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/ModularMultiplyAccumulateGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/

import {BIG_MUL_MOD_SHADER_CODE} from "./MultiplyAccumulateGates.js"
import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {modulusTooBigChecker} from "./ModularIncrementGates.js"
import {Util} from "../base/Util.js"
import {WglArg} from "../webgl/WglArg.js"
Expand Down
4 changes: 2 additions & 2 deletions src/gates/MultiplicationGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

import {Gate} from "../circuit//Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {Gate} from "../circuit/Gate.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {
modularMultiply,
modularUnmultiply,
Expand Down
4 changes: 2 additions & 2 deletions src/gates/MultiplyAccumulateGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

import {Config} from "../Config.js";
import {Gate} from "../circuit//Gate.js"
import {Gate} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {WglArg} from "../webgl/WglArg.js"

let MultiplyAccumulateGates = {};
Expand Down
4 changes: 2 additions & 2 deletions src/gates/ParametrizedRotationGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*/

import {GateBuilder} from "../circuit//Gate.js"
import {GateBuilder} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {Complex, PARSE_COMPLEX_TOKEN_MAP_RAD} from "../math/Complex.js"
import {Matrix} from "../math/Matrix.js"
import {ketArgs, ketShader, ketShaderPhase, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js"
import {ketArgs, ketShader, ketShaderPhase, ketInputGateShaderCode} from "../circuit/KetShaderUtil.js"
import {WglArg} from "../webgl/WglArg.js"
import {Util} from "../base/Util.js";
import {parseFormula} from "../math/FormulaParser.js";
Expand Down
4 changes: 2 additions & 2 deletions src/gates/PhaseGradientGates.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

import {Config} from "../Config.js";
import {Gate} from "../circuit//Gate.js"
import {Gate} from "../circuit/Gate.js"
import {GatePainting} from "../draw/GatePainting.js"
import {ketArgs, ketShaderPhase} from "../circuit//KetShaderUtil.js"
import {ketArgs, ketShaderPhase} from "../circuit/KetShaderUtil.js"
import {MUL_STEP} from "./MultiplyAccumulateGates.js"
import {WglArg} from "../webgl/WglArg.js"
import {Matrix} from "../math/Matrix.js";
Expand Down
Loading

0 comments on commit 294431e

Please sign in to comment.