Skip to content

Commit

Permalink
Change import statements from absolute to relative (Strilanc#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
secor authored May 20, 2021
1 parent e7681f7 commit 09fc00f
Show file tree
Hide file tree
Showing 171 changed files with 965 additions and 965 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.0",
"version": "2.3.1",
"homepage": "https://github.com/Strilanc/Quirk",
"bugs": {
"url": "https://github.com/Strilanc/Quirk/issues"
Expand Down
2 changes: 1 addition & 1 deletion src/base/DetailedError.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

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

let CONSTRUCTOR_CALLS_NESTING = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/base/Obs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {CooldownThrottle} from "src/base/CooldownThrottle.js"
import {CooldownThrottle} from "./CooldownThrottle.js"

/**
* An observable sequence of events.
Expand Down
8 changes: 4 additions & 4 deletions src/base/Revision.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {describe} from "src/base/Describe.js"
import {equate} from "src/base/Equate.js"
import {DetailedError} from "src/base/DetailedError.js"
import {ObservableSource, ObservableValue} from "src/base/Obs.js"
import {describe} from "./Describe.js"
import {equate} from "./Equate.js"
import {DetailedError} from "./DetailedError.js"
import {ObservableSource, ObservableValue} from "./Obs.js"

/**
* A simple linear revision history tracker, for supporting undo and redo functionality.
Expand Down
2 changes: 1 addition & 1 deletion src/base/Seq.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {DetailedError} from "./DetailedError.js"

export const THROW_IF_EMPTY = { if_same_instance_as_this_then_throw: true };

Expand Down
2 changes: 1 addition & 1 deletion src/base/Util.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {DetailedError} from "./DetailedError.js"

/**
* Miscellaneous utility methods.
Expand Down
2 changes: 1 addition & 1 deletion src/browser/EventUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {Observable} from "src/base/Obs.js"
import {Observable} from "../base/Obs.js"

/**
* @param {!HTMLInputElement} textBox
Expand Down
2 changes: 1 addition & 1 deletion src/browser/HistoryPusher.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {DetailedError} from "../base/DetailedError.js"

/**
* Manages interactions with the browser's history as the app's state changes and frequently updates the URL.
Expand Down
2 changes: 1 addition & 1 deletion src/browser/MouseWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {Point} from "src/math/Point.js"
import {Point} from "../math/Point.js"

const ALLOW_REGRAB_WATCHDOG_TIME_MS = 5000;
const MOUSE_ID = "mouse!";
Expand Down
2 changes: 1 addition & 1 deletion src/browser/TouchScrollBlocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {Rect} from "src/math/Rect.js"
import {Rect} from "../math/Rect.js"

class TouchScrollBlocker {
/**
Expand Down
16 changes: 8 additions & 8 deletions src/circuit/CircuitComputeUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {CircuitEvalContext} from "src/circuit/CircuitEvalContext.js"
import {CircuitShaders} from "src/circuit/CircuitShaders.js"
import {DetailedError} from "src/base/DetailedError.js"
import {KetTextureUtil} from "src/circuit/KetTextureUtil.js"
import {Controls} from "src/circuit/Controls.js"
import {GateBuilder} from "src/circuit/Gate.js"
import {Gates} from "src/gates/AllGates.js"
import {Util} from "src/base/Util.js"
import {CircuitEvalContext} from "./CircuitEvalContext.js"
import {CircuitShaders} from "./CircuitShaders.js"
import {DetailedError} from "../base/DetailedError.js"
import {KetTextureUtil} from "./KetTextureUtil.js"
import {Controls} from "./Controls.js"
import {GateBuilder} from "./Gate.js"
import {Gates} from "../gates/AllGates.js"
import {Util} from "../base/Util.js"

/**
* @param {!GateBuilder} builder
Expand Down
26 changes: 13 additions & 13 deletions src/circuit/CircuitDefinition.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {CircuitShaders} from "src/circuit/CircuitShaders.js"
import {Config} from "src/Config.js"
import {Controls} from "src/circuit/Controls.js"
import {CustomGateSet} from "src/circuit/CustomGateSet.js"
import {DetailedError} from "src/base/DetailedError.js"
import {equate_Maps} from "src/base/Equate.js";
import {Gate} from "src/circuit/Gate.js"
import {GateColumn} from "src/circuit/GateColumn.js"
import {GateShaders} from "src/circuit/GateShaders.js"
import {Gates, INITIAL_STATES_TO_GATES} from "src/gates/AllGates.js"
import {Point} from "src/math/Point.js"
import {seq, Seq} from "src/base/Seq.js"
import {Util} from "src/base/Util.js"
import {CircuitShaders} from "./CircuitShaders.js"
import {Config} from "../Config.js"
import {Controls} from "./Controls.js"
import {CustomGateSet} from "./CustomGateSet.js"
import {DetailedError} from "../base/DetailedError.js"
import {equate_Maps} from "../base/Equate.js";
import {Gate} from "./Gate.js"
import {GateColumn} from "./GateColumn.js"
import {GateShaders} from "./GateShaders.js"
import {Gates, INITIAL_STATES_TO_GATES} from "../gates/AllGates.js"
import {Point} from "../math/Point.js"
import {seq, Seq} from "../base/Seq.js"
import {Util} from "../base/Util.js"

/**
* Defines a circuit layout, with wires and columns and gates.
Expand Down
2 changes: 1 addition & 1 deletion src/circuit/CircuitEvalContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js"
import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js"

/**
* Values used by the various gate effects.
Expand Down
16 changes: 8 additions & 8 deletions src/circuit/CircuitShaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {Config} from "src/Config.js"
import {Controls} from "src/circuit/Controls.js"
import {ketArgs, ketShaderPermute} from "src/circuit/KetShaderUtil.js"
import {Shaders} from "src/webgl/Shaders.js"
import {Util} from "src/base/Util.js"
import {WglArg} from "src/webgl/WglArg.js"
import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js"
import {Config} from "../Config.js"
import {Controls} from "./Controls.js"
import {ketArgs, ketShaderPermute} from "./KetShaderUtil.js"
import {Shaders} from "../webgl/Shaders.js"
import {Util} from "../base/Util.js"
import {WglArg} from "../webgl/WglArg.js"
import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js"
import {
currentShaderCoder,
makePseudoShaderWithInputsAndOutputAndCode,
Inputs,
Outputs
} from "src/webgl/ShaderCoders.js"
} from "../webgl/ShaderCoders.js"

/**
* Defines operations used to initialize, advance, and inspect quantum states stored in WebGL textures.
Expand Down
28 changes: 14 additions & 14 deletions src/circuit/CircuitStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {CircuitDefinition} from "src/circuit/CircuitDefinition.js"
import {CircuitEvalContext} from "src/circuit/CircuitEvalContext.js"
import {CircuitShaders} from "src/circuit/CircuitShaders.js"
import {KetTextureUtil} from "src/circuit/KetTextureUtil.js"
import {Controls} from "src/circuit/Controls.js"
import {DetailedError} from "src/base/DetailedError.js"
import {Matrix, complexVectorToReadableJson} from "src/math/Matrix.js"
import {Shaders} from "src/webgl/Shaders.js"
import {Serializer} from "src/circuit/Serializer.js"
import {Util} from "src/base/Util.js"
import {notifyAboutRecoveryFromUnexpectedError} from "src/fallback.js"
import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js"
import {currentShaderCoder} from "src/webgl/ShaderCoders.js"
import {WglTextureTrader} from "src/webgl/WglTextureTrader.js"
import {CircuitDefinition} from "./CircuitDefinition.js"
import {CircuitEvalContext} from "./CircuitEvalContext.js"
import {CircuitShaders} from "./CircuitShaders.js"
import {KetTextureUtil} from "./KetTextureUtil.js"
import {Controls} from "./Controls.js"
import {DetailedError} from "../base/DetailedError.js"
import {Matrix, complexVectorToReadableJson} from "../math/Matrix.js"
import {Shaders} from "../webgl/Shaders.js"
import {Serializer} from "./Serializer.js"
import {Util} from "../base/Util.js"
import {notifyAboutRecoveryFromUnexpectedError} from "../fallback.js"
import {advanceStateWithCircuit} from "./CircuitComputeUtil.js"
import {currentShaderCoder} from "../webgl/ShaderCoders.js"
import {WglTextureTrader} from "../webgl/WglTextureTrader.js"

class CircuitStats {
/**
Expand Down
6 changes: 3 additions & 3 deletions src/circuit/Controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {Seq} from "src/base/Seq.js"
import {Util} from "src/base/Util.js"
import {DetailedError} from "../base/DetailedError.js"
import {Seq} from "../base/Seq.js"
import {Util} from "../base/Util.js"

/**
* Stores a set of requirements that a state's bits must meet.
Expand Down
2 changes: 1 addition & 1 deletion src/circuit/CustomGateSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {DetailedError} from "../base/DetailedError.js"

class CustomGateSet {
/**
Expand Down
8 changes: 4 additions & 4 deletions src/circuit/Gate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {GateDrawParams} from "src/draw/GateDrawParams.js"
import {Complex} from "src/math/Complex.js"
import {Matrix} from "src/math/Matrix.js"
import {DetailedError} from "../base/DetailedError.js"
import {GateDrawParams} from "../draw/GateDrawParams.js"
import {Complex} from "../math/Complex.js"
import {Matrix} from "../math/Matrix.js"

/**
* Describes a quantum operation that may vary with time.
Expand Down
12 changes: 6 additions & 6 deletions src/circuit/GateColumn.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {Gate} from "src/circuit/Gate.js"
import {GateCheckArgs} from "src/circuit/GateCheckArgs.js"
import {Gates} from "src/gates/AllGates.js"
import {seq, Seq} from "src/base/Seq.js"
import {Util} from "src/base/Util.js"
import {DetailedError} from "../base/DetailedError.js"
import {Gate} from "./Gate.js"
import {GateCheckArgs} from "./GateCheckArgs.js"
import {Gates} from "../gates/AllGates.js"
import {seq, Seq} from "../base/Seq.js"
import {Util} from "../base/Util.js"

/**
* A column of gates in a circuit with many qubits.
Expand Down
16 changes: 8 additions & 8 deletions src/circuit/GateShaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {DetailedError} from "src/base/DetailedError.js"
import {ketArgs, ketShader} from "src/circuit/KetShaderUtil.js"
import {Matrix} from "src/math/Matrix.js"
import {Shaders} from "src/webgl/Shaders.js"
import {Util} from "src/base/Util.js"
import {WglArg} from "src/webgl/WglArg.js"
import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js"
import {DetailedError} from "../base/DetailedError.js"
import {ketArgs, ketShader} from "./KetShaderUtil.js"
import {Matrix} from "../math/Matrix.js"
import {Shaders} from "../webgl/Shaders.js"
import {Util} from "../base/Util.js"
import {WglArg} from "../webgl/WglArg.js"
import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js"
import {
Inputs,
Outputs,
currentShaderCoder,
makePseudoShaderWithInputsAndOutputAndCode
} from "src/webgl/ShaderCoders.js"
} from "../webgl/ShaderCoders.js"

/**
* Defines operations used by gates to operate on textures representing superpositions.
Expand Down
4 changes: 2 additions & 2 deletions src/circuit/KetShaderUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {WglArg} from "src/webgl/WglArg.js"
import {makePseudoShaderWithInputsAndOutputAndCode, Inputs, Outputs} from "src/webgl/ShaderCoders.js"
import {WglArg} from "../webgl/WglArg.js"
import {makePseudoShaderWithInputsAndOutputAndCode, Inputs, Outputs} from "../webgl/ShaderCoders.js"

/**
* Creates a shader for a quantum gate based on a minimalist input like `return cmul(inp(0.0), vec2(0.0, 1.0));`.
Expand Down
22 changes: 11 additions & 11 deletions src/circuit/KetTextureUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {CircuitShaders} from "src/circuit/CircuitShaders.js"
import {Controls} from "src/circuit/Controls.js"
import {DetailedError} from "src/base/DetailedError.js"
import {Matrix} from "src/math/Matrix.js"
import {Shaders} from "src/webgl/Shaders.js"
import {Util} from "src/base/Util.js"
import {WglTexture} from "src/webgl/WglTexture.js"
import {seq, Seq} from "src/base/Seq.js"
import {CircuitShaders} from "./CircuitShaders.js"
import {Controls} from "./Controls.js"
import {DetailedError} from "../base/DetailedError.js"
import {Matrix} from "../math/Matrix.js"
import {Shaders} from "../webgl/Shaders.js"
import {Util} from "../base/Util.js"
import {WglTexture} from "../webgl/WglTexture.js"
import {seq, Seq} from "../base/Seq.js"
import {
outputShaderCoder,
currentShaderCoder,
makePseudoShaderWithInputsAndOutputAndCode,
Inputs,
Outputs
} from "src/webgl/ShaderCoders.js"
import {WglTexturePool} from "src/webgl/WglTexturePool.js"
import {WglTextureTrader} from "src/webgl/WglTextureTrader.js"
} from "../webgl/ShaderCoders.js"
import {WglTexturePool} from "../webgl/WglTexturePool.js"
import {WglTextureTrader} from "../webgl/WglTextureTrader.js"

/**
* Utilities related to storing and operation on superpositions and other circuit information in WebGL textures.
Expand Down
32 changes: 16 additions & 16 deletions src/circuit/Serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import {CircuitDefinition} from "src/circuit/CircuitDefinition.js"
import {Complex} from "src/math/Complex.js"
import {Config} from "src/Config.js"
import {CustomGateSet} from "src/circuit/CustomGateSet.js"
import {describe} from "src/base/Describe.js"
import {DetailedError} from "src/base/DetailedError.js"
import {Format} from "src/base/Format.js"
import {Gate, GateBuilder} from "src/circuit/Gate.js"
import {GateColumn} from "src/circuit/GateColumn.js"
import {Gates, INITIAL_STATES_TO_GATES} from "src/gates/AllGates.js"
import {Matrix} from "src/math/Matrix.js"
import {Util} from "src/base/Util.js"
import {notifyAboutRecoveryFromUnexpectedError} from "src/fallback.js"
import {MysteryGateSymbol, MysteryGateMakerWithMatrix} from "src/gates/Joke_MysteryGate.js"
import {seq} from "src/base/Seq.js"
import {setGateBuilderEffectToCircuit} from "src/circuit/CircuitComputeUtil.js"
import {CircuitDefinition} from "./CircuitDefinition.js"
import {Complex} from "../math/Complex.js"
import {Config} from "../Config.js"
import {CustomGateSet} from "./CustomGateSet.js"
import {describe} from "../base/Describe.js"
import {DetailedError} from "../base/DetailedError.js"
import {Format} from "../base/Format.js"
import {Gate, GateBuilder} from "./Gate.js"
import {GateColumn} from "./GateColumn.js"
import {Gates, INITIAL_STATES_TO_GATES} from "../gates/AllGates.js"
import {Matrix} from "../math/Matrix.js"
import {Util} from "../base/Util.js"
import {notifyAboutRecoveryFromUnexpectedError} from "../fallback.js"
import {MysteryGateSymbol, MysteryGateMakerWithMatrix} from "../gates/Joke_MysteryGate.js"
import {seq} from "../base/Seq.js"
import {setGateBuilderEffectToCircuit} from "./CircuitComputeUtil.js"

/** @type {!function(!GateDrawParams)} */
let matrixDrawer = undefined;
Expand Down
Loading

0 comments on commit 09fc00f

Please sign in to comment.