From 09fc00fa080b6a93e4f9a37b3ace30c2d5f31dc6 Mon Sep 17 00:00:00 2001 From: Justin Secor Date: Thu, 20 May 2021 14:51:38 -0400 Subject: [PATCH] Change import statements from absolute to relative (#477) --- package.json | 2 +- src/base/DetailedError.js | 2 +- src/base/Obs.js | 2 +- src/base/Revision.js | 8 +- src/base/Seq.js | 2 +- src/base/Util.js | 2 +- src/browser/EventUtil.js | 2 +- src/browser/HistoryPusher.js | 2 +- src/browser/MouseWatcher.js | 2 +- src/browser/TouchScrollBlocker.js | 2 +- src/circuit/CircuitComputeUtil.js | 16 ++-- src/circuit/CircuitDefinition.js | 26 +++--- src/circuit/CircuitEvalContext.js | 2 +- src/circuit/CircuitShaders.js | 16 ++-- src/circuit/CircuitStats.js | 28 +++--- src/circuit/Controls.js | 6 +- src/circuit/CustomGateSet.js | 2 +- src/circuit/Gate.js | 8 +- src/circuit/GateColumn.js | 12 +-- src/circuit/GateShaders.js | 16 ++-- src/circuit/KetShaderUtil.js | 4 +- src/circuit/KetTextureUtil.js | 22 ++--- src/circuit/Serializer.js | 32 +++---- src/draw/CachablePainting.js | 4 +- src/draw/GatePainting.js | 12 +-- src/draw/MathPainter.js | 18 ++-- src/draw/Painter.js | 12 +-- src/draw/WidgetPainter.js | 24 ++--- src/gates/AllGates.js | 88 +++++++++---------- src/gates/AmplitudeDisplay.js | 32 +++---- src/gates/ArithmeticGates.js | 8 +- src/gates/BitCountGates.js | 10 +-- src/gates/BlochSphereDisplay.js | 10 +-- src/gates/ComparisonGates.js | 6 +- src/gates/Controls.js | 18 ++-- src/gates/CountingGates.js | 20 ++--- src/gates/CycleBitsGates.js | 18 ++-- src/gates/Debug_ErrorInjectionGate.js | 6 +- src/gates/DensityMatrixDisplay.js | 26 +++--- src/gates/Detector.js | 12 +-- src/gates/ExponentiatingGates.js | 6 +- src/gates/FourierTransformGates.js | 14 +-- src/gates/HalfTurnGates.js | 10 +-- src/gates/Impossible_UniversalNotGate.js | 6 +- src/gates/IncrementGates.js | 6 +- src/gates/InputGates.js | 6 +- src/gates/InterleaveBitsGates.js | 12 +-- src/gates/Joke_ImaginaryGate.js | 8 +- src/gates/Joke_MysteryGate.js | 8 +- src/gates/Joke_NeGate.js | 8 +- src/gates/Joke_ZeroGate.js | 6 +- src/gates/MeasurementGate.js | 6 +- src/gates/ModularAdditionGates.js | 10 +-- src/gates/ModularIncrementGates.js | 8 +- src/gates/ModularMultiplicationGates.js | 14 +-- src/gates/ModularMultiplyAccumulateGates.js | 12 +-- src/gates/MultiplicationGates.js | 6 +- src/gates/MultiplyAccumulateGates.js | 10 +-- src/gates/ParametrizedRotationGates.js | 20 ++--- src/gates/PhaseGradientGates.js | 16 ++-- src/gates/PostSelectionGates.js | 8 +- src/gates/PoweringGates.js | 6 +- src/gates/ProbabilityDisplay.js | 32 +++---- src/gates/QuarterTurnGates.js | 4 +- src/gates/ReverseBitsGate.js | 8 +- src/gates/SampleDisplay.js | 16 ++-- src/gates/SpacerGate.js | 8 +- src/gates/SwapGateHalf.js | 10 +-- src/gates/VariousXGates.js | 4 +- src/gates/VariousYGates.js | 4 +- src/gates/VariousZGates.js | 4 +- src/gates/XorGates.js | 6 +- src/math/Axis.js | 6 +- src/math/Complex.js | 8 +- src/math/FormulaParser.js | 4 +- src/math/Matrix.js | 10 +-- src/math/Rect.js | 2 +- src/ui/DisplayedCircuit.js | 36 ++++---- src/ui/DisplayedInspector.js | 24 ++--- src/ui/DisplayedToolbox.js | 24 ++--- src/ui/Hand.js | 12 +-- src/ui/exports.js | 12 +-- src/ui/forge.js | 42 ++++----- src/ui/menu.js | 2 +- src/ui/sim.js | 6 +- src/ui/title.js | 4 +- src/ui/url.js | 10 +-- src/webgl/ShaderCoders.js | 16 ++-- src/webgl/ShaderCoders_Base.js | 2 +- src/webgl/ShaderCoders_intoBytes.js | 8 +- src/webgl/ShaderCoders_intoFloats.js | 6 +- src/webgl/Shaders.js | 12 +-- src/webgl/WglConfiguredShader.js | 4 +- src/webgl/WglContext.js | 2 +- src/webgl/WglShader.js | 16 ++-- src/webgl/WglTexture.js | 10 +-- src/webgl/WglTexturePool.js | 8 +- src/webgl/WglTextureTrader.js | 6 +- src/webgl/WglUtil.js | 2 +- test/CircuitOperationTestUtil.js | 30 +++---- test/KarmaTestRunner.test.js | 2 +- test/TestUtil.js | 18 ++-- test/base/Describe.test.js | 4 +- test/base/DetailedError.test.js | 4 +- test/base/Equate.test.js | 6 +- test/base/Format.test.js | 4 +- test/base/Obs.test.js | 4 +- test/base/RestartableRng.test.js | 4 +- test/base/Revision.test.js | 4 +- test/base/Seq.test.js | 4 +- test/base/Util.test.js | 4 +- test/circuit/CircuitComputeUtil.test.js | 16 ++-- test/circuit/CircuitDefinition.test.js | 28 +++--- test/circuit/CircuitShaders.test.js | 18 ++-- test/circuit/CircuitStats.test.js | 18 ++-- test/circuit/Controls.test.js | 4 +- test/circuit/Gate.test.js | 6 +- test/circuit/GateColumn.test.js | 6 +- test/circuit/GateShaders.test.js | 14 +-- test/circuit/KetShaderUtil.test.js | 12 +-- test/circuit/Serializer.test.js | 28 +++--- test/gates/AllGates.test.js | 24 ++--- test/gates/AmplitudeDisplay.test.js | 24 ++--- test/gates/ArithmeticGates.test.js | 16 ++-- test/gates/BitCountGates.test.js | 16 ++-- test/gates/ComparisonGates.test.js | 14 +-- test/gates/Controls.test.js | 24 ++--- test/gates/CycleBitsGates.test.js | 8 +- test/gates/DensityMatrixDisplay.test.js | 6 +- test/gates/Detector.test.js | 10 +-- test/gates/ExponentiatingGates.test.js | 8 +- test/gates/FourierTransformGates.test.js | 16 ++-- .../gates/Impossible_UniversalNotGate.test.js | 14 +-- test/gates/IncrementGates.test.js | 10 +-- test/gates/InputGates.test.js | 12 +-- test/gates/InterleaveBitsGates.test.js | 4 +- test/gates/ModularAdditionGates.test.js | 12 +-- test/gates/ModularIncrementGates.test.js | 12 +-- test/gates/ModularMultiplicationGates.test.js | 24 ++--- .../ModularMultiplyAccumulateGates.test.js | 8 +- test/gates/MultiplicationGates.test.js | 10 +-- test/gates/MultiplyAccumulateGates.test.js | 16 ++-- test/gates/ParametrizedRotationGates.test.js | 12 +-- test/gates/PhaseGradientGates.test.js | 14 +-- test/gates/PivotFlipGates.test.js | 10 +-- test/gates/ProbabilityDisplay.test.js | 10 +-- test/gates/SampleDisplay.test.js | 8 +- test/gates/XorGates.test.js | 16 ++-- test/math/Axis.test.js | 4 +- test/math/Complex.test.js | 6 +- test/math/Matrix.test.js | 12 +-- test/math/Point.test.js | 4 +- test/math/Rect.test.js | 6 +- test/ui/DisplayedCircuit.test.js | 18 ++-- test/ui/MathPainter.test.js | 4 +- test/ui/Painter.test.js | 8 +- test/ui/WidgetPainter.test.js | 8 +- test/ui/forge.test.js | 8 +- test/webgl/ShaderCoders.test.js | 8 +- test/webgl/ShaderCoders_Base.test.js | 8 +- test/webgl/ShaderCoders_intoBytes.test.js | 16 ++-- test/webgl/ShaderCoders_intoFloats.test.js | 6 +- test/webgl/Shaders.test.js | 12 +-- test/webgl/WglArg.test.js | 8 +- test/webgl/WglShader.test.js | 10 +-- test/webgl/WglTexture.test.js | 8 +- test/webgl/WglTexturePool.test.js | 6 +- test_perf/CircuitStats.perf.js | 12 +-- test_perf/DisplayedInspector.perf.js | 22 ++--- test_perf/KarmaTestRunner.perf.js | 2 +- test_perf/TestPerfUtil.js | 2 +- 171 files changed, 965 insertions(+), 965 deletions(-) diff --git a/package.json b/package.json index 07580244..7a357921 100644 --- a/package.json +++ b/package.json @@ -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" diff --git a/src/base/DetailedError.js b/src/base/DetailedError.js index 5201f5c7..d7a92b5d 100644 --- a/src/base/DetailedError.js +++ b/src/base/DetailedError.js @@ -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; diff --git a/src/base/Obs.js b/src/base/Obs.js index 12b984dc..5c3acfc2 100644 --- a/src/base/Obs.js +++ b/src/base/Obs.js @@ -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. diff --git a/src/base/Revision.js b/src/base/Revision.js index 08d47d94..e0a90fc1 100644 --- a/src/base/Revision.js +++ b/src/base/Revision.js @@ -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. diff --git a/src/base/Seq.js b/src/base/Seq.js index 720e4659..344d9383 100644 --- a/src/base/Seq.js +++ b/src/base/Seq.js @@ -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 }; diff --git a/src/base/Util.js b/src/base/Util.js index 4c0f6f62..a33397ec 100644 --- a/src/base/Util.js +++ b/src/base/Util.js @@ -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. diff --git a/src/browser/EventUtil.js b/src/browser/EventUtil.js index ab7c843f..ec64ea2a 100644 --- a/src/browser/EventUtil.js +++ b/src/browser/EventUtil.js @@ -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 diff --git a/src/browser/HistoryPusher.js b/src/browser/HistoryPusher.js index 8b699175..95c760c5 100644 --- a/src/browser/HistoryPusher.js +++ b/src/browser/HistoryPusher.js @@ -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. diff --git a/src/browser/MouseWatcher.js b/src/browser/MouseWatcher.js index 5e2fe8a8..064e8eb0 100644 --- a/src/browser/MouseWatcher.js +++ b/src/browser/MouseWatcher.js @@ -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!"; diff --git a/src/browser/TouchScrollBlocker.js b/src/browser/TouchScrollBlocker.js index f12ff52c..b4eee233 100644 --- a/src/browser/TouchScrollBlocker.js +++ b/src/browser/TouchScrollBlocker.js @@ -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 { /** diff --git a/src/circuit/CircuitComputeUtil.js b/src/circuit/CircuitComputeUtil.js index b93af72a..ba57a630 100644 --- a/src/circuit/CircuitComputeUtil.js +++ b/src/circuit/CircuitComputeUtil.js @@ -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 diff --git a/src/circuit/CircuitDefinition.js b/src/circuit/CircuitDefinition.js index 085a0064..752c95b9 100644 --- a/src/circuit/CircuitDefinition.js +++ b/src/circuit/CircuitDefinition.js @@ -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. diff --git a/src/circuit/CircuitEvalContext.js b/src/circuit/CircuitEvalContext.js index 7583e5f1..15d942e1 100644 --- a/src/circuit/CircuitEvalContext.js +++ b/src/circuit/CircuitEvalContext.js @@ -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. diff --git a/src/circuit/CircuitShaders.js b/src/circuit/CircuitShaders.js index a5031e3f..79b4981f 100644 --- a/src/circuit/CircuitShaders.js +++ b/src/circuit/CircuitShaders.js @@ -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. diff --git a/src/circuit/CircuitStats.js b/src/circuit/CircuitStats.js index a886feff..645f4f68 100644 --- a/src/circuit/CircuitStats.js +++ b/src/circuit/CircuitStats.js @@ -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 { /** diff --git a/src/circuit/Controls.js b/src/circuit/Controls.js index aad76e26..cb202f13 100644 --- a/src/circuit/Controls.js +++ b/src/circuit/Controls.js @@ -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. diff --git a/src/circuit/CustomGateSet.js b/src/circuit/CustomGateSet.js index 0b82704d..3be72d2b 100644 --- a/src/circuit/CustomGateSet.js +++ b/src/circuit/CustomGateSet.js @@ -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 { /** diff --git a/src/circuit/Gate.js b/src/circuit/Gate.js index 526cc474..04734612 100644 --- a/src/circuit/Gate.js +++ b/src/circuit/Gate.js @@ -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. diff --git a/src/circuit/GateColumn.js b/src/circuit/GateColumn.js index d7ecf18e..3954368c 100644 --- a/src/circuit/GateColumn.js +++ b/src/circuit/GateColumn.js @@ -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. diff --git a/src/circuit/GateShaders.js b/src/circuit/GateShaders.js index 9835acf9..0d03980e 100644 --- a/src/circuit/GateShaders.js +++ b/src/circuit/GateShaders.js @@ -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. diff --git a/src/circuit/KetShaderUtil.js b/src/circuit/KetShaderUtil.js index 2bd0d981..80d689a5 100644 --- a/src/circuit/KetShaderUtil.js +++ b/src/circuit/KetShaderUtil.js @@ -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));`. diff --git a/src/circuit/KetTextureUtil.js b/src/circuit/KetTextureUtil.js index b11ec149..eb6eefe4 100644 --- a/src/circuit/KetTextureUtil.js +++ b/src/circuit/KetTextureUtil.js @@ -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. diff --git a/src/circuit/Serializer.js b/src/circuit/Serializer.js index e9d0e3f5..89e58efd 100644 --- a/src/circuit/Serializer.js +++ b/src/circuit/Serializer.js @@ -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; diff --git a/src/draw/CachablePainting.js b/src/draw/CachablePainting.js index 929741e8..4f49de52 100644 --- a/src/draw/CachablePainting.js +++ b/src/draw/CachablePainting.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Painter} from "src/draw/Painter.js" -import {RestartableRng} from "src/base/RestartableRng.js" +import {Painter} from "./Painter.js" +import {RestartableRng} from "../base/RestartableRng.js" const fixedRng = new RestartableRng(); diff --git a/src/draw/GatePainting.js b/src/draw/GatePainting.js index 9f1d07cd..c047520c 100644 --- a/src/draw/GatePainting.js +++ b/src/draw/GatePainting.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {GateDrawParams} from "src/draw/GateDrawParams.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {Util} from "src/base/Util.js" +import {Config} from "../Config.js" +import {GateDrawParams} from "./GateDrawParams.js" +import {MathPainter} from "./MathPainter.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {Util} from "../base/Util.js" /** * A described and possibly time-varying quantum operation. diff --git a/src/draw/MathPainter.js b/src/draw/MathPainter.js index 54823876..62bfaebd 100644 --- a/src/draw/MathPainter.js +++ b/src/draw/MathPainter.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Painter} from "src/draw/Painter.js" -import {Format} from "src/base/Format.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {seq, Seq} from "src/base/Seq.js" -import {Util} from "src/base/Util.js" -import {Config} from "src/Config.js" -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" +import {Painter} from "./Painter.js" +import {Format} from "../base/Format.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {seq, Seq} from "../base/Seq.js" +import {Util} from "../base/Util.js" +import {Config} from "../Config.js" +import {Complex} from "../math/Complex.js" +import {Matrix} from "../math/Matrix.js" class MathPainter { static describeProbability(p, fractionalDigits) { diff --git a/src/draw/Painter.js b/src/draw/Painter.js index dded626c..0b68d4df 100644 --- a/src/draw/Painter.js +++ b/src/draw/Painter.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {RestartableRng} from "src/base/RestartableRng.js" -import {seq, Seq} from "src/base/Seq.js" -import {Util} from "src/base/Util.js" +import {Config} from "../Config.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {RestartableRng} from "../base/RestartableRng.js" +import {seq, Seq} from "../base/Seq.js" +import {Util} from "../base/Util.js" class Painter { /** diff --git a/src/draw/WidgetPainter.js b/src/draw/WidgetPainter.js index ba587e4c..8baec3a1 100644 --- a/src/draw/WidgetPainter.js +++ b/src/draw/WidgetPainter.js @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Complex} from "src/math/Complex.js" -import {Config} from "src/Config.js" -import {Format} from "src/base/Format.js" -import {Gate} from "src/circuit/Gate.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Matrix} from "src/math/Matrix.js" -import {Painter} from "src/draw/Painter.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {Seq} from "src/base/Seq.js" -import {drawCircuitTooltip} from "src/ui/DisplayedCircuit.js" -import {Util} from "src/base/Util.js" +import {Complex} from "../math/Complex.js" +import {Config} from "../Config.js" +import {Format} from "../base/Format.js" +import {Gate} from "../circuit/Gate.js" +import {MathPainter} from "./MathPainter.js" +import {Matrix} from "../math/Matrix.js" +import {Painter} from "./Painter.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {Seq} from "../base/Seq.js" +import {drawCircuitTooltip} from "../ui/DisplayedCircuit.js" +import {Util} from "../base/Util.js" class WidgetPainter { diff --git a/src/gates/AllGates.js b/src/gates/AllGates.js index 563758ca..3568c8f6 100644 --- a/src/gates/AllGates.js +++ b/src/gates/AllGates.js @@ -12,55 +12,55 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {ArithmeticGates} from "src/gates/ArithmeticGates.js" -import {AmplitudeDisplayFamily} from "src/gates/AmplitudeDisplay.js" -import {BitCountGates} from "src/gates/BitCountGates.js" -import {BlochSphereDisplay} from "src/gates/BlochSphereDisplay.js" -import {ComparisonGates} from "src/gates/ComparisonGates.js" -import {Controls} from "src/gates/Controls.js" -import {CountingGates} from "src/gates/CountingGates.js" -import {CycleBitsGates} from "src/gates/CycleBitsGates.js" -import {DensityMatrixDisplayFamily} from "src/gates/DensityMatrixDisplay.js" -import {ErrorInjectionGate} from "src/gates/Debug_ErrorInjectionGate.js" -import {ExponentiatingGates} from "src/gates/ExponentiatingGates.js" -import {FourierTransformGates} from "src/gates/FourierTransformGates.js" -import {HalfTurnGates} from "src/gates/HalfTurnGates.js" +import {ArithmeticGates} from "./ArithmeticGates.js" +import {AmplitudeDisplayFamily} from "./AmplitudeDisplay.js" +import {BitCountGates} from "./BitCountGates.js" +import {BlochSphereDisplay} from "./BlochSphereDisplay.js" +import {ComparisonGates} from "./ComparisonGates.js" +import {Controls} from "./Controls.js" +import {CountingGates} from "./CountingGates.js" +import {CycleBitsGates} from "./CycleBitsGates.js" +import {DensityMatrixDisplayFamily} from "./DensityMatrixDisplay.js" +import {ErrorInjectionGate} from "./Debug_ErrorInjectionGate.js" +import {ExponentiatingGates} from "./ExponentiatingGates.js" +import {FourierTransformGates} from "./FourierTransformGates.js" +import {HalfTurnGates} from "./HalfTurnGates.js" import { ImaginaryGate, AntiImaginaryGate, SqrtImaginaryGate, AntiSqrtImaginaryGate -} from "src/gates/Joke_ImaginaryGate.js" -import {IncrementGates} from "src/gates/IncrementGates.js" -import {InputGates} from "src/gates/InputGates.js" -import {InterleaveBitsGates} from "src/gates/InterleaveBitsGates.js" -import {MeasurementGate} from "src/gates/MeasurementGate.js" -import {ModularIncrementGates} from "src/gates/ModularIncrementGates.js" -import {ModularAdditionGates} from "src/gates/ModularAdditionGates.js" -import {ModularMultiplicationGates} from "src/gates/ModularMultiplicationGates.js" -import {ModularMultiplyAccumulateGates} from "src/gates/ModularMultiplyAccumulateGates.js" -import {MultiplicationGates} from "src/gates/MultiplicationGates.js" -import {MultiplyAccumulateGates} from "src/gates/MultiplyAccumulateGates.js" -import {NeGate} from "src/gates/Joke_NeGate.js" -import {ParametrizedRotationGates} from "src/gates/ParametrizedRotationGates.js" -import {PhaseGradientGates} from "src/gates/PhaseGradientGates.js" -import {PivotFlipGates} from "src/gates/PivotFlipGates.js" -import {PostSelectionGates} from "src/gates/PostSelectionGates.js" -import {PoweringGates} from "src/gates/PoweringGates.js" -import {ProbabilityDisplayFamily} from "src/gates/ProbabilityDisplay.js" -import {QuarterTurnGates} from "src/gates/QuarterTurnGates.js" -import {ReverseBitsGateFamily} from "src/gates/ReverseBitsGate.js" -import {SampleDisplayFamily} from "src/gates/SampleDisplay.js" -import {Detectors} from "src/gates/Detector.js" -import {SpacerGate} from "src/gates/SpacerGate.js" -import {SwapGateHalf} from "src/gates/SwapGateHalf.js" -import {UniversalNotGate} from "src/gates/Impossible_UniversalNotGate.js" -import {VariousXGates} from "src/gates/VariousXGates.js" -import {VariousYGates} from "src/gates/VariousYGates.js" -import {VariousZGates} from "src/gates/VariousZGates.js" -import {XorGates} from "src/gates/XorGates.js" -import {ZeroGate} from "src/gates/Joke_ZeroGate.js" -import {seq} from "src/base/Seq.js" +} from "./Joke_ImaginaryGate.js" +import {IncrementGates} from "./IncrementGates.js" +import {InputGates} from "./InputGates.js" +import {InterleaveBitsGates} from "./InterleaveBitsGates.js" +import {MeasurementGate} from "./MeasurementGate.js" +import {ModularIncrementGates} from "./ModularIncrementGates.js" +import {ModularAdditionGates} from "./ModularAdditionGates.js" +import {ModularMultiplicationGates} from "./ModularMultiplicationGates.js" +import {ModularMultiplyAccumulateGates} from "./ModularMultiplyAccumulateGates.js" +import {MultiplicationGates} from "./MultiplicationGates.js" +import {MultiplyAccumulateGates} from "./MultiplyAccumulateGates.js" +import {NeGate} from "./Joke_NeGate.js" +import {ParametrizedRotationGates} from "./ParametrizedRotationGates.js" +import {PhaseGradientGates} from "./PhaseGradientGates.js" +import {PivotFlipGates} from "./PivotFlipGates.js" +import {PostSelectionGates} from "./PostSelectionGates.js" +import {PoweringGates} from "./PoweringGates.js" +import {ProbabilityDisplayFamily} from "./ProbabilityDisplay.js" +import {QuarterTurnGates} from "./QuarterTurnGates.js" +import {ReverseBitsGateFamily} from "./ReverseBitsGate.js" +import {SampleDisplayFamily} from "./SampleDisplay.js" +import {Detectors} from "./Detector.js" +import {SpacerGate} from "./SpacerGate.js" +import {SwapGateHalf} from "./SwapGateHalf.js" +import {UniversalNotGate} from "./Impossible_UniversalNotGate.js" +import {VariousXGates} from "./VariousXGates.js" +import {VariousYGates} from "./VariousYGates.js" +import {VariousZGates} from "./VariousZGates.js" +import {XorGates} from "./XorGates.js" +import {ZeroGate} from "./Joke_ZeroGate.js" +import {seq} from "../base/Seq.js" let Gates = {}; diff --git a/src/gates/AmplitudeDisplay.js b/src/gates/AmplitudeDisplay.js index 862166c9..bcf57de1 100644 --- a/src/gates/AmplitudeDisplay.js +++ b/src/gates/AmplitudeDisplay.js @@ -12,27 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {GateShaders} from "src/circuit/GateShaders.js" -import {Format} from "src/base/Format.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Matrix, complexVectorToReadableJson, realVectorToReadableJson} from "src/math/Matrix.js" -import {probabilityStatTexture} from "src/gates/ProbabilityDisplay.js" -import {Point} from "src/math/Point.js" -import {Util} from "src/base/Util.js" -import {Shaders} from "src/webgl/Shaders.js" -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {Config} from "../Config.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 {Format} from "../base/Format.js" +import {MathPainter} from "../draw/MathPainter.js" +import {Matrix, complexVectorToReadableJson, realVectorToReadableJson} from "../math/Matrix.js" +import {probabilityStatTexture} from "./ProbabilityDisplay.js" +import {Point} from "../math/Point.js" +import {Util} from "../base/Util.js" +import {Shaders} from "../webgl/Shaders.js" +import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js" import { Inputs, Outputs, currentShaderCoder, makePseudoShaderWithInputsAndOutputAndCode -} 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" /** * @param {!WglTexture} stateKet diff --git a/src/gates/ArithmeticGates.js b/src/gates/ArithmeticGates.js index e301f477..a05206ca 100644 --- a/src/gates/ArithmeticGates.js +++ b/src/gates/ArithmeticGates.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Gate} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js" +import {WglArg} from "../webgl/WglArg.js" let ArithmeticGates = {}; diff --git a/src/gates/BitCountGates.js b/src/gates/BitCountGates.js index d378e716..0aa604ce 100644 --- a/src/gates/BitCountGates.js +++ b/src/gates/BitCountGates.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {Util} from "src/base/Util.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Config} from "../Config.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" let BitCountGates = {}; diff --git a/src/gates/BlochSphereDisplay.js b/src/gates/BlochSphereDisplay.js index 402f2591..b98dd038 100644 --- a/src/gates/BlochSphereDisplay.js +++ b/src/gates/BlochSphereDisplay.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Point} from "src/math/Point.js" +import {Config} from "../Config.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" /** * @param {!Painter} painter diff --git a/src/gates/ComparisonGates.js b/src/gates/ComparisonGates.js index 111755ff..0855d7e2 100644 --- a/src/gates/ComparisonGates.js +++ b/src/gates/ComparisonGates.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {GateBuilder} from "../circuit//Gate.js" +import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js" +import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js" let ComparisonGates = {}; diff --git a/src/gates/Controls.js b/src/gates/Controls.js index 3c4539f0..17dfe2e3 100644 --- a/src/gates/Controls.js +++ b/src/gates/Controls.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {GateShaders} from "src/circuit/GateShaders.js" -import {HalfTurnGates} from "src/gates/HalfTurnGates.js" -import {QuarterTurnGates} from "src/gates/QuarterTurnGates.js" -import {Config} from "src/Config.js" -import {ketArgs, ketShaderPermute} from "src/circuit/KetShaderUtil.js"; -import {WglArg} from "src/webgl/WglArg.js"; -import {Util} from "src/base/Util.js"; +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.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 {WglArg} from "../webgl/WglArg.js"; +import {Util} from "../base/Util.js"; let Controls = {}; diff --git a/src/gates/CountingGates.js b/src/gates/CountingGates.js index b1c339e8..bbbda8a8 100644 --- a/src/gates/CountingGates.js +++ b/src/gates/CountingGates.js @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" -import {Point} from "src/math/Point.js" -import {ketArgs} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" - -import {offsetShader} from "src/gates/IncrementGates.js" -import {makeCycleBitsPermutation, cycleBitsShader} from "src/gates/CycleBitsGates.js" +import {Config} from "../Config.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 {WglArg} from "../webgl/WglArg.js" + +import {offsetShader} from "./IncrementGates.js" +import {makeCycleBitsPermutation, cycleBitsShader} from "./CycleBitsGates.js" let CountingGates = {}; diff --git a/src/gates/CycleBitsGates.js b/src/gates/CycleBitsGates.js index a44fe2d9..3369cbb9 100644 --- a/src/gates/CycleBitsGates.js +++ b/src/gates/CycleBitsGates.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {ketArgs, ketShaderPermute} from "src/circuit/KetShaderUtil.js" -import {Matrix} from "src/math/Matrix.js" -import {Point} from "src/math/Point.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 {Gate} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.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" +import {WglArg} from "../webgl/WglArg.js" +import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js" let CycleBitsGates = {}; diff --git a/src/gates/Debug_ErrorInjectionGate.js b/src/gates/Debug_ErrorInjectionGate.js index 794fcecd..bf9fa03a 100644 --- a/src/gates/Debug_ErrorInjectionGate.js +++ b/src/gates/Debug_ErrorInjectionGate.js @@ -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 {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" +import {DetailedError} from "../base/DetailedError.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" let ErrorInjectionGate = new GateBuilder(). setSerializedId("__error__"). diff --git a/src/gates/DensityMatrixDisplay.js b/src/gates/DensityMatrixDisplay.js index 78ffb2c3..992d5182 100644 --- a/src/gates/DensityMatrixDisplay.js +++ b/src/gates/DensityMatrixDisplay.js @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {GateShaders} from "src/circuit/GateShaders.js" -import {MathPainter} from "src/draw/MathPainter.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 {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 {MathPainter} from "../draw/MathPainter.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" -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" /** * @param {!WglTexture} inp diff --git a/src/gates/Detector.js b/src/gates/Detector.js index 53fa70eb..799a6c1c 100644 --- a/src/gates/Detector.js +++ b/src/gates/Detector.js @@ -24,12 +24,12 @@ 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 {Matrix} from "src/math/Matrix.js"; -import {GateShaders} from "src/circuit/GateShaders.js"; -import {Point} from "src/math/Point.js"; -import {DetailedError} from "src/base/DetailedError.js"; -import {QuarterTurnGates} from "src/gates/QuarterTurnGates.js"; -import {HalfTurnGates} from "src/gates/HalfTurnGates.js"; +import {Matrix} from "../math/Matrix.js"; +import {GateShaders} from "../circuit//GateShaders.js"; +import {Point} from "../math/Point.js"; +import {DetailedError} from "../base/DetailedError.js"; +import {QuarterTurnGates} from "./QuarterTurnGates.js"; +import {HalfTurnGates} from "./HalfTurnGates.js"; /** * @param {!CircuitEvalContext} ctx diff --git a/src/gates/ExponentiatingGates.js b/src/gates/ExponentiatingGates.js index 12b5f425..9f7e0760 100644 --- a/src/gates/ExponentiatingGates.js +++ b/src/gates/ExponentiatingGates.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Matrix} from "../math/Matrix.js" let ExponentiatingGates = {}; diff --git a/src/gates/FourierTransformGates.js b/src/gates/FourierTransformGates.js index ab8af4be..3e163b77 100644 --- a/src/gates/FourierTransformGates.js +++ b/src/gates/FourierTransformGates.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Complex} from "src/math/Complex.js" -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPhase} from "src/circuit/KetShaderUtil.js" -import {Matrix} from "src/math/Matrix.js" -import {HalfTurnGates} from "src/gates/HalfTurnGates.js" -import {reverseShaderForSize} from "src/gates/ReverseBitsGate.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Complex} from "../math/Complex.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" +import {WglArg} from "../webgl/WglArg.js" /** * @param {!CircuitEvalContext} ctx diff --git a/src/gates/HalfTurnGates.js b/src/gates/HalfTurnGates.js index 43e57ca3..991f5d40 100644 --- a/src/gates/HalfTurnGates.js +++ b/src/gates/HalfTurnGates.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" -import {Point} from "src/math/Point.js" -import {ketArgs, ketShader, ketShaderPermute} from "src/circuit/KetShaderUtil.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" /** * Gates that correspond to 180 degree rotations around the Bloch sphere, so they're their own inverses. diff --git a/src/gates/Impossible_UniversalNotGate.js b/src/gates/Impossible_UniversalNotGate.js index 490ce905..84d08c48 100644 --- a/src/gates/Impossible_UniversalNotGate.js +++ b/src/gates/Impossible_UniversalNotGate.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {ketArgs, ketShader} from "src/circuit/KetShaderUtil.js" -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {GateBuilder} from "../circuit//Gate.js" +import {ketArgs, ketShader} from "../circuit//KetShaderUtil.js" +import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js" /** * @param {!CircuitEvalContext} ctx diff --git a/src/gates/IncrementGates.js b/src/gates/IncrementGates.js index b1bba2c3..f0b92385 100644 --- a/src/gates/IncrementGates.js +++ b/src/gates/IncrementGates.js @@ -1,6 +1,6 @@ -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Gate} from "../circuit//Gate.js" +import {ketArgs, ketShaderPermute} from "../circuit//KetShaderUtil.js" +import {WglArg} from "../webgl/WglArg.js" let IncrementGates = {}; diff --git a/src/gates/InputGates.js b/src/gates/InputGates.js index 7a097d20..98e7f2cf 100644 --- a/src/gates/InputGates.js +++ b/src/gates/InputGates.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {reverseShaderForSize} from "src/gates/ReverseBitsGate.js" +import {Gate, GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {reverseShaderForSize} from "./ReverseBitsGate.js" let InputGates = {}; diff --git a/src/gates/InterleaveBitsGates.js b/src/gates/InterleaveBitsGates.js index 5d006d0a..a4921d2c 100644 --- a/src/gates/InterleaveBitsGates.js +++ b/src/gates/InterleaveBitsGates.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute} from "src/circuit/KetShaderUtil.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Point} from "src/math/Point.js" -import {Seq} from "src/base/Seq.js" +import {Config} from "../Config.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" let InterleaveBitsGates = {}; diff --git a/src/gates/Joke_ImaginaryGate.js b/src/gates/Joke_ImaginaryGate.js index 37f5c26d..893e1314 100644 --- a/src/gates/Joke_ImaginaryGate.js +++ b/src/gates/Joke_ImaginaryGate.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" -import {Complex} from "src/math/Complex.js" -import {GatePainting} from "src/draw/GatePainting.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" const ImaginaryGate = new GateBuilder(). setSerializedIdAndSymbol("i"). diff --git a/src/gates/Joke_MysteryGate.js b/src/gates/Joke_MysteryGate.js index fc68003a..012cdaa6 100644 --- a/src/gates/Joke_MysteryGate.js +++ b/src/gates/Joke_MysteryGate.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Complex} from "src/math/Complex.js" -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" +import {Complex} from "../math/Complex.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Matrix} from "../math/Matrix.js" let MysteryGateSymbol = "?"; diff --git a/src/gates/Joke_NeGate.js b/src/gates/Joke_NeGate.js index 308c444a..c5b4aaf1 100644 --- a/src/gates/Joke_NeGate.js +++ b/src/gates/Joke_NeGate.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" -import {Point} from "src/math/Point.js" -import {GatePainting} from "src/draw/GatePainting.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" const NeGate = new GateBuilder(). setSerializedId("NeGate"). diff --git a/src/gates/Joke_ZeroGate.js b/src/gates/Joke_ZeroGate.js index e5b47bb0..514c174e 100644 --- a/src/gates/Joke_ZeroGate.js +++ b/src/gates/Joke_ZeroGate.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Matrix} from "../math/Matrix.js" /** @type {!Gate} */ const ZeroGate = new GateBuilder(). diff --git a/src/gates/MeasurementGate.js b/src/gates/MeasurementGate.js index 318aa016..01b3d553 100644 --- a/src/gates/MeasurementGate.js +++ b/src/gates/MeasurementGate.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" +import {Config} from "../Config.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" /** * @param {!GateDrawParams} args diff --git a/src/gates/ModularAdditionGates.js b/src/gates/ModularAdditionGates.js index 1b7a998a..5e32e69e 100644 --- a/src/gates/ModularAdditionGates.js +++ b/src/gates/ModularAdditionGates.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {Util} from "src/base/Util.js" -import {WglArg} from "src/webgl/WglArg.js" -import {modulusTooBigChecker} from "src/gates/ModularIncrementGates.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" let ModularAdditionGates = {}; diff --git a/src/gates/ModularIncrementGates.js b/src/gates/ModularIncrementGates.js index d0d40888..6f66fb50 100644 --- a/src/gates/ModularIncrementGates.js +++ b/src/gates/ModularIncrementGates.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {Util} from "src/base/Util.js" -import {WglArg} from "src/webgl/WglArg.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" let ModularIncrementGates = {}; diff --git a/src/gates/ModularMultiplicationGates.js b/src/gates/ModularMultiplicationGates.js index f4c6baf5..7193460e 100644 --- a/src/gates/ModularMultiplicationGates.js +++ b/src/gates/ModularMultiplicationGates.js @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js"; -import {Gate} from "src/circuit/Gate.js" +import {Config} from "../Config.js"; +import {Gate} from "../circuit//Gate.js" import { ketArgs, ketShaderPermute, ketInputGateShaderCode -} from "src/circuit/KetShaderUtil.js" -import {modulusTooBigChecker} from "src/gates/ModularIncrementGates.js" -import {BIG_MUL_MOD_SHADER_CODE} from "src/gates/MultiplyAccumulateGates.js" -import {Util} from "src/base/Util.js" -import {WglArg} from "src/webgl/WglArg.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" +import {WglArg} from "../webgl/WglArg.js" let ModularMultiplicationGates = {}; diff --git a/src/gates/ModularMultiplyAccumulateGates.js b/src/gates/ModularMultiplyAccumulateGates.js index 2c9d4c2f..fe77f962 100644 --- a/src/gates/ModularMultiplyAccumulateGates.js +++ b/src/gates/ModularMultiplyAccumulateGates.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {BIG_MUL_MOD_SHADER_CODE} from "src/gates/MultiplyAccumulateGates.js" -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {modulusTooBigChecker} from "src/gates/ModularIncrementGates.js" -import {Util} from "src/base/Util.js" -import {WglArg} from "src/webgl/WglArg.js" +import {BIG_MUL_MOD_SHADER_CODE} from "./MultiplyAccumulateGates.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" let ModularMultiplyAccumulateGates = {}; diff --git a/src/gates/MultiplicationGates.js b/src/gates/MultiplicationGates.js index 6406bb52..2e74e771 100644 --- a/src/gates/MultiplicationGates.js +++ b/src/gates/MultiplicationGates.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" +import {Gate} from "../circuit//Gate.js" +import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js" import { modularMultiply, modularUnmultiply, MODULAR_INVERSE_SHADER_CODE -} from "src/gates/ModularMultiplicationGates.js" +} from "./ModularMultiplicationGates.js" let MultiplicationGates = {}; diff --git a/src/gates/MultiplyAccumulateGates.js b/src/gates/MultiplyAccumulateGates.js index 51c5c1c1..908ee185 100644 --- a/src/gates/MultiplyAccumulateGates.js +++ b/src/gates/MultiplyAccumulateGates.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js"; -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Config} from "../Config.js"; +import {Gate} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js" +import {WglArg} from "../webgl/WglArg.js" let MultiplyAccumulateGates = {}; diff --git a/src/gates/ParametrizedRotationGates.js b/src/gates/ParametrizedRotationGates.js index 9c2eddbb..03d5befb 100644 --- a/src/gates/ParametrizedRotationGates.js +++ b/src/gates/ParametrizedRotationGates.js @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Complex, PARSE_COMPLEX_TOKEN_MAP_RAD} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" -import {ketArgs, ketShader, ketShaderPhase, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" -import {Util} from "src/base/Util.js"; -import {parseFormula} from "src/math/FormulaParser.js"; -import {XExp, YExp, ZExp} from "src/gates/ExponentiatingGates.js"; -import {Config} from "src/Config.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 {WglArg} from "../webgl/WglArg.js" +import {Util} from "../base/Util.js"; +import {parseFormula} from "../math/FormulaParser.js"; +import {XExp, YExp, ZExp} from "./ExponentiatingGates.js"; +import {Config} from "../Config.js"; let ParametrizedRotationGates = {}; diff --git a/src/gates/PhaseGradientGates.js b/src/gates/PhaseGradientGates.js index 9a903d20..eb78c4ff 100644 --- a/src/gates/PhaseGradientGates.js +++ b/src/gates/PhaseGradientGates.js @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js"; -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {ketArgs, ketShaderPhase} from "src/circuit/KetShaderUtil.js" -import {MUL_STEP} from "src/gates/MultiplyAccumulateGates.js" -import {WglArg} from "src/webgl/WglArg.js" -import {Matrix} from "src/math/Matrix.js"; -import {Complex} from "src/math/Complex.js"; +import {Config} from "../Config.js"; +import {Gate} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.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"; +import {Complex} from "../math/Complex.js"; const PHASE_GRADIENT_SHADER = ketShaderPhase( ` diff --git a/src/gates/PostSelectionGates.js b/src/gates/PostSelectionGates.js index e8061753..66f18401 100644 --- a/src/gates/PostSelectionGates.js +++ b/src/gates/PostSelectionGates.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Complex} from "src/math/Complex.js" -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" +import {Complex} from "../math/Complex.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Matrix} from "../math/Matrix.js" let PostSelectionGates = {}; diff --git a/src/gates/PoweringGates.js b/src/gates/PoweringGates.js index 2c39593d..86dfff09 100644 --- a/src/gates/PoweringGates.js +++ b/src/gates/PoweringGates.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Matrix} from "../math/Matrix.js" let PoweringGates = {}; diff --git a/src/gates/ProbabilityDisplay.js b/src/gates/ProbabilityDisplay.js index cc47b9cb..61131d0f 100644 --- a/src/gates/ProbabilityDisplay.js +++ b/src/gates/ProbabilityDisplay.js @@ -12,27 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Complex} from "src/math/Complex.js" -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {GateShaders} from "src/circuit/GateShaders.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Matrix} from "src/math/Matrix.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {Seq} from "src/base/Seq.js" -import {Shaders} from "src/webgl/Shaders.js" -import {Util} from "src/base/Util.js" -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {Complex} from "../math/Complex.js" +import {Config} from "../Config.js" +import {Gate} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {GateShaders} from "../circuit//GateShaders.js" +import {MathPainter} from "../draw/MathPainter.js" +import {Matrix} from "../math/Matrix.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {Seq} from "../base/Seq.js" +import {Shaders} from "../webgl/Shaders.js" +import {Util} from "../base/Util.js" +import {WglConfiguredShader} from "../webgl/WglConfiguredShader.js" import { Inputs, Outputs, currentShaderCoder, makePseudoShaderWithInputsAndOutputAndCode -} 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" /** * Derives conditional computational basis measurement probabilities from the state vector. diff --git a/src/gates/QuarterTurnGates.js b/src/gates/QuarterTurnGates.js index c076ce56..58ae1d97 100644 --- a/src/gates/QuarterTurnGates.js +++ b/src/gates/QuarterTurnGates.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" +import {Gate, GateBuilder} from "../circuit//Gate.js" +import {Matrix} from "../math/Matrix.js" let QuarterTurnGates = {}; diff --git a/src/gates/ReverseBitsGate.js b/src/gates/ReverseBitsGate.js index fee1eafa..de369e6b 100644 --- a/src/gates/ReverseBitsGate.js +++ b/src/gates/ReverseBitsGate.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute} from "src/circuit/KetShaderUtil.js" -import {Seq} from "src/base/Seq.js" +import {Config} from "../Config.js" +import {Gate} from "../circuit//Gate.js" +import {ketArgs, ketShaderPermute} from "../circuit//KetShaderUtil.js" +import {Seq} from "../base/Seq.js" let _generateReverseShaderForSize = span => span < 2 ? undefined : ketShaderPermute( '', diff --git a/src/gates/SampleDisplay.js b/src/gates/SampleDisplay.js index d18ab4d4..ecf61bf0 100644 --- a/src/gates/SampleDisplay.js +++ b/src/gates/SampleDisplay.js @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {Util} from "src/base/Util.js" +import {Config} from "../Config.js" +import {Gate} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {MathPainter} from "../draw/MathPainter.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {Util} from "../base/Util.js" import { probabilityStatTexture, probabilityPixelsToColumnVector, probabilityDataToJson -} from "src/gates/ProbabilityDisplay.js" +} from "./ProbabilityDisplay.js" /** * Looks up the simulated probability distribution and samples from it using the current graphics PRNG. diff --git a/src/gates/SpacerGate.js b/src/gates/SpacerGate.js index a6f3c0a7..4a7ca82d 100644 --- a/src/gates/SpacerGate.js +++ b/src/gates/SpacerGate.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Rect} from "src/math/Rect.js" +import {Config} from "../Config.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Rect} from "../math/Rect.js" let SpacerGate = new GateBuilder(). setSerializedIdAndSymbol("…"). diff --git a/src/gates/SwapGateHalf.js b/src/gates/SwapGateHalf.js index 216b794b..c30025f9 100644 --- a/src/gates/SwapGateHalf.js +++ b/src/gates/SwapGateHalf.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {GateBuilder} from "src/circuit/Gate.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Matrix} from "src/math/Matrix.js" -import {Rect} from "src/math/Rect.js" -import {Seq} from "src/base/Seq.js" +import {GateBuilder} from "../circuit//Gate.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Matrix} from "../math/Matrix.js" +import {Rect} from "../math/Rect.js" +import {Seq} from "../base/Seq.js" // Note: there is special code to handle swaps sprinkled everywhere, since it's the only gate with two paired sides. diff --git a/src/gates/VariousXGates.js b/src/gates/VariousXGates.js index f8eb5d55..b3f8e602 100644 --- a/src/gates/VariousXGates.js +++ b/src/gates/VariousXGates.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" +import {Gate} from "../circuit//Gate.js" +import {Matrix} from "../math/Matrix.js" let VariousXGates = {}; diff --git a/src/gates/VariousYGates.js b/src/gates/VariousYGates.js index bbf0b0b6..3a680fdf 100644 --- a/src/gates/VariousYGates.js +++ b/src/gates/VariousYGates.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" +import {Gate} from "../circuit//Gate.js" +import {Matrix} from "../math/Matrix.js" let VariousYGates = {}; diff --git a/src/gates/VariousZGates.js b/src/gates/VariousZGates.js index d131109d..7db61b2f 100644 --- a/src/gates/VariousZGates.js +++ b/src/gates/VariousZGates.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Gate} from "src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" +import {Gate} from "../circuit//Gate.js" +import {Matrix} from "../math/Matrix.js" let VariousZGates = {}; diff --git a/src/gates/XorGates.js b/src/gates/XorGates.js index e1909abd..9d4f9dda 100644 --- a/src/gates/XorGates.js +++ b/src/gates/XorGates.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {Gate} from "src/circuit/Gate.js" -import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js" +import {Config} from "../Config.js" +import {Gate} from "../circuit//Gate.js" +import {ketArgs, ketShaderPermute, ketInputGateShaderCode} from "../circuit//KetShaderUtil.js" let XorGates = {}; diff --git a/src/math/Axis.js b/src/math/Axis.js index 41b21144..cd3a1478 100644 --- a/src/math/Axis.js +++ b/src/math/Axis.js @@ -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 {UNICODE_FRACTIONS} from "src/base/Format.js" -import {parseFormula} from "src/math/FormulaParser.js" +import {DetailedError} from "../base/DetailedError.js" +import {UNICODE_FRACTIONS} from "../base/Format.js" +import {parseFormula} from "./FormulaParser.js" const PARSE_AXIS_TOKEN_MAP = new Map(); diff --git a/src/math/Complex.js b/src/math/Complex.js index 8a785e8a..3e480b82 100644 --- a/src/math/Complex.js +++ b/src/math/Complex.js @@ -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 {Format, UNICODE_FRACTIONS} from "src/base/Format.js" -import {Util} from "src/base/Util.js" -import {parseFormula} from "src/math/FormulaParser.js" +import {DetailedError} from "../base/DetailedError.js" +import {Format, UNICODE_FRACTIONS} from "../base/Format.js" +import {Util} from "../base/Util.js" +import {parseFormula} from "./FormulaParser.js" const PARSE_COMPLEX_TOKEN_MAP_ALL = new Map(); const PARSE_COMPLEX_TOKEN_MAP_RAD = new Map(); diff --git a/src/math/FormulaParser.js b/src/math/FormulaParser.js index 3c6f7e8b..0b590006 100644 --- a/src/math/FormulaParser.js +++ b/src/math/FormulaParser.js @@ -12,8 +12,8 @@ // 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 {DetailedError} from "../base/DetailedError.js" +import {seq} from "../base/Seq.js" /** * @param {!Array.} tokens diff --git a/src/math/Matrix.js b/src/math/Matrix.js index 5e3812ca..e891cbc1 100644 --- a/src/math/Matrix.js +++ b/src/math/Matrix.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Complex} from "src/math/Complex.js" -import {DetailedError} from "src/base/DetailedError.js" -import {Format} from "src/base/Format.js" -import {seq, Seq} from "src/base/Seq.js" -import {Util} from "src/base/Util.js" +import {Complex} from "./Complex.js" +import {DetailedError} from "../base/DetailedError.js" +import {Format} from "../base/Format.js" +import {seq, Seq} from "../base/Seq.js" +import {Util} from "../base/Util.js" /** * A matrix of complex values. diff --git a/src/math/Rect.js b/src/math/Rect.js index 30e25a40..b0d32c44 100644 --- a/src/math/Rect.js +++ b/src/math/Rect.js @@ -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 "./Point.js" /** * A two dimensional axis-aligned rectangle with defined position and size. diff --git a/src/ui/DisplayedCircuit.js b/src/ui/DisplayedCircuit.js index 5b3792fd..627a8491 100644 --- a/src/ui/DisplayedCircuit.js +++ b/src/ui/DisplayedCircuit.js @@ -12,24 +12,24 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {CachablePainting} from "src/draw/CachablePainting.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Config} from "src/Config.js" -import {DetailedError} from "src/base/DetailedError.js" -import {equate} from "src/base/Equate.js" -import {Format} from "src/base/Format.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {GateDrawParams} from "src/draw/GateDrawParams.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Hand} from "src/ui/Hand.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Point} from "src/math/Point.js" -import {Matrix} from "src/math/Matrix.js" -import {Rect} from "src/math/Rect.js" -import {Util} from "src/base/Util.js" -import {seq, Seq} from "src/base/Seq.js" -import {paintBlochSphereDisplay} from "src/gates/BlochSphereDisplay.js" +import {CachablePainting} from "../draw/CachablePainting.js" +import {CircuitDefinition} from "../circuit/CircuitDefinition.js" +import {CircuitStats} from "../circuit/CircuitStats.js" +import {Config} from "../Config.js" +import {DetailedError} from "../base/DetailedError.js" +import {equate} from "../base/Equate.js" +import {Format} from "../base/Format.js" +import {GateColumn} from "../circuit/GateColumn.js" +import {GateDrawParams} from "../draw/GateDrawParams.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Hand} from "../ui/Hand.js" +import {MathPainter} from "../draw/MathPainter.js" +import {Point} from "../math/Point.js" +import {Matrix} from "../math/Matrix.js" +import {Rect} from "../math/Rect.js" +import {Util} from "../base/Util.js" +import {seq, Seq} from "../base/Seq.js" +import {paintBlochSphereDisplay} from "../gates/BlochSphereDisplay.js" /** @type {!number} */ let CIRCUIT_OP_HORIZONTAL_SPACING = 10; diff --git a/src/ui/DisplayedInspector.js b/src/ui/DisplayedInspector.js index d42096fe..7842b6d6 100644 --- a/src/ui/DisplayedInspector.js +++ b/src/ui/DisplayedInspector.js @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Config} from "src/Config.js" -import {DisplayedCircuit} from "src/ui/DisplayedCircuit.js" -import {DisplayedToolbox} from "src/ui/DisplayedToolbox.js" -import {GateDrawParams} from "src/draw/GateDrawParams.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Gates} from "src/gates/AllGates.js" -import {Hand} from "src/ui/Hand.js" -import {Painter} from "src/draw/Painter.js" -import {Rect} from "src/math/Rect.js" -import {Serializer} from "src/circuit/Serializer.js" +import {CircuitDefinition} from "../circuit/CircuitDefinition.js" +import {CircuitStats} from "../circuit/CircuitStats.js" +import {Config} from "../Config.js" +import {DisplayedCircuit} from "../ui/DisplayedCircuit.js" +import {DisplayedToolbox} from "../ui/DisplayedToolbox.js" +import {GateDrawParams} from "../draw/GateDrawParams.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Gates} from "../gates/AllGates.js" +import {Hand} from "../ui/Hand.js" +import {Painter} from "../draw/Painter.js" +import {Rect} from "../math/Rect.js" +import {Serializer} from "../circuit/Serializer.js" class DisplayedInspector { /** diff --git a/src/ui/DisplayedToolbox.js b/src/ui/DisplayedToolbox.js index 876ba82f..5d046b2e 100644 --- a/src/ui/DisplayedToolbox.js +++ b/src/ui/DisplayedToolbox.js @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {CachablePainting} from "src/draw/CachablePainting.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Config} from "src/Config.js" -import {GateDrawParams} from "src/draw/GateDrawParams.js" -import {GatePainting} from "src/draw/GatePainting.js" -import {Hand} from "src/ui/Hand.js" -import {MysteryGateSymbol, MysteryGateMaker} from "src/gates/Joke_MysteryGate.js" -import {Rect} from "src/math/Rect.js" -import {Painter} from "src/draw/Painter.js" -import {Point} from "src/math/Point.js" -import {seq} from "src/base/Seq.js" -import {WidgetPainter} from "src/draw/WidgetPainter.js" +import {CachablePainting} from "../draw/CachablePainting.js" +import {CircuitStats} from "../circuit/CircuitStats.js" +import {Config} from "../Config.js" +import {GateDrawParams} from "../draw/GateDrawParams.js" +import {GatePainting} from "../draw/GatePainting.js" +import {Hand} from "../ui/Hand.js" +import {MysteryGateSymbol, MysteryGateMaker} from "../gates/Joke_MysteryGate.js" +import {Rect} from "../math/Rect.js" +import {Painter} from "../draw/Painter.js" +import {Point} from "../math/Point.js" +import {seq} from "../base/Seq.js" +import {WidgetPainter} from "../draw/WidgetPainter.js" class DisplayedToolbox { /** diff --git a/src/ui/Hand.js b/src/ui/Hand.js index 9094b7b6..c0ff0d69 100644 --- a/src/ui/Hand.js +++ b/src/ui/Hand.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {describe} from "src/base/Describe.js" -import {DetailedError} from "src/base/DetailedError.js" -import {Gate} from "src/circuit/Gate.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Point} from "src/math/Point.js" -import {Util} from "src/base/Util.js" +import {describe} from "../base/Describe.js" +import {DetailedError} from "../base/DetailedError.js" +import {Gate} from "../circuit/Gate.js" +import {GateColumn} from "../circuit/GateColumn.js" +import {Point} from "../math/Point.js" +import {Util} from "../base/Util.js" class Hand { /** diff --git a/src/ui/exports.js b/src/ui/exports.js index 14b7bd78..424c5951 100644 --- a/src/ui/exports.js +++ b/src/ui/exports.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {ObservableValue} from "src/base/Obs.js" -import {Serializer} from "src/circuit/Serializer.js" -import {selectAndCopyToClipboard} from "src/browser/Clipboard.js" -import {fromJsonText_CircuitDefinition} from "src/circuit/Serializer.js" -import {saveFile} from "src/browser/SaveFile.js" +import {Config} from "../Config.js" +import {ObservableValue} from "../base/Obs.js" +import {Serializer} from "../circuit/Serializer.js" +import {selectAndCopyToClipboard} from "../browser/Clipboard.js" +import {fromJsonText_CircuitDefinition} from "../circuit/Serializer.js" +import {saveFile} from "../browser/SaveFile.js" const exportsIsVisible = new ObservableValue(false); const obsExportsIsShowing = exportsIsVisible.observable().whenDifferent(); diff --git a/src/ui/forge.js b/src/ui/forge.js index 5c4e001d..5f305daa 100644 --- a/src/ui/forge.js +++ b/src/ui/forge.js @@ -12,27 +12,27 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Axis} from "src/math/Axis.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {setGateBuilderEffectToCircuit} from "src/circuit/CircuitComputeUtil.js" -import {Complex} from "src/math/Complex.js" -import {Config} from "src/Config.js" -import {DetailedError} from "src/base/DetailedError.js" -import {drawCircuitTooltip} from "src/ui/DisplayedCircuit.js" -import {Format} from "src/base/Format.js" -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {getCircuitCycleTime} from "src/ui/sim.js" -import {MathPainter} from "src/draw/MathPainter.js" -import {Matrix} from "src/math/Matrix.js" -import {Observable, ObservableValue} from "src/base/Obs.js" -import {Painter} from "src/draw/Painter.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" -import {fromJsonText_CircuitDefinition, Serializer} from "src/circuit/Serializer.js" -import {seq} from "src/base/Seq.js" -import {textEditObservable} from "src/browser/EventUtil.js" -import {Util} from "src/base/Util.js" +import {Axis} from "../math/Axis.js" +import {CircuitDefinition} from "../circuit/CircuitDefinition.js" +import {setGateBuilderEffectToCircuit} from "../circuit/CircuitComputeUtil.js" +import {Complex} from "../math/Complex.js" +import {Config} from "../Config.js" +import {DetailedError} from "../base/DetailedError.js" +import {drawCircuitTooltip} from "../ui/DisplayedCircuit.js" +import {Format} from "../base/Format.js" +import {Gate, GateBuilder} from "../circuit/Gate.js" +import {GateColumn} from "../circuit/GateColumn.js" +import {getCircuitCycleTime} from "../ui/sim.js" +import {MathPainter} from "../draw/MathPainter.js" +import {Matrix} from "../math/Matrix.js" +import {Observable, ObservableValue} from "../base/Obs.js" +import {Painter} from "../draw/Painter.js" +import {Point} from "../math/Point.js" +import {Rect} from "../math/Rect.js" +import {fromJsonText_CircuitDefinition, Serializer} from "../circuit/Serializer.js" +import {seq} from "../base/Seq.js" +import {textEditObservable} from "../browser/EventUtil.js" +import {Util} from "../base/Util.js" const forgeIsVisible = new ObservableValue(false); const obsForgeIsShowing = forgeIsVisible.observable().whenDifferent(); diff --git a/src/ui/menu.js b/src/ui/menu.js index c3646ccf..7a3c79e7 100644 --- a/src/ui/menu.js +++ b/src/ui/menu.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {ObservableValue} from "src/base/Obs.js" +import {ObservableValue} from "../base/Obs.js" const menuIsVisible = new ObservableValue(true); const obsMenuIsShowing = menuIsVisible.observable().whenDifferent(); diff --git a/src/ui/sim.js b/src/ui/sim.js index 62144df3..7072c0e0 100644 --- a/src/ui/sim.js +++ b/src/ui/sim.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {Config} from "src/Config.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" +import {CircuitDefinition} from "../circuit/CircuitDefinition.js" +import {Config} from "../Config.js" +import {CircuitStats} from "../circuit/CircuitStats.js" const getCircuitCycleTime = (() => { /** diff --git a/src/ui/title.js b/src/ui/title.js index 53d763b8..9b10237d 100644 --- a/src/ui/title.js +++ b/src/ui/title.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {fromJsonText_CircuitDefinition} from "src/circuit/Serializer.js" +import {Config} from "../Config.js" +import {fromJsonText_CircuitDefinition} from "../circuit/Serializer.js" /** * @param {!Revision} revision diff --git a/src/ui/url.js b/src/ui/url.js index 989b0187..0d49a90b 100644 --- a/src/ui/url.js +++ b/src/ui/url.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {notifyAboutRecoveryFromUnexpectedError} from "src/fallback.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {Config} from "src/Config.js" -import {HistoryPusher} from "src/browser/HistoryPusher.js" -import {fromJsonText_CircuitDefinition, Serializer} from "src/circuit/Serializer.js" +import {notifyAboutRecoveryFromUnexpectedError} from "../fallback.js" +import {CircuitDefinition} from "../circuit/CircuitDefinition.js" +import {Config} from "../Config.js" +import {HistoryPusher} from "../browser/HistoryPusher.js" +import {fromJsonText_CircuitDefinition, Serializer} from "../circuit/Serializer.js" function urlWithCircuitHash(jsonText) { if (jsonText.indexOf('%') !== -1 || jsonText.indexOf('&') !== -1) { diff --git a/src/webgl/ShaderCoders.js b/src/webgl/ShaderCoders.js index fa91d958..5956204e 100644 --- a/src/webgl/ShaderCoders.js +++ b/src/webgl/ShaderCoders.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {WglArg} from "src/webgl/WglArg.js" -import {WglShader} from "src/webgl/WglShader.js" -import {WglTexture} from "src/webgl/WglTexture.js" -import {initializedWglContext} from "src/webgl/WglContext.js" -import {provideWorkingShaderCoderToWglConfiguredShader, WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {WglArg} from "./WglArg.js" +import {WglShader} from "./WglShader.js" +import {WglTexture} from "./WglTexture.js" +import {initializedWglContext} from "./WglContext.js" +import {provideWorkingShaderCoderToWglConfiguredShader, WglConfiguredShader} from "./WglConfiguredShader.js" -import {ShaderPart} from "src/webgl/ShaderCoders_Base.js" -import {SHADER_CODER_BYTES} from "src/webgl/ShaderCoders_intoBytes.js" -import {SHADER_CODER_FLOATS} from "src/webgl/ShaderCoders_intoFloats.js" +import {ShaderPart} from "./ShaderCoders_Base.js" +import {SHADER_CODER_BYTES} from "./ShaderCoders_intoBytes.js" +import {SHADER_CODER_FLOATS} from "./ShaderCoders_intoFloats.js" class ShaderPartDescription { /** diff --git a/src/webgl/ShaderCoders_Base.js b/src/webgl/ShaderCoders_Base.js index db9efd3c..56d198c2 100644 --- a/src/webgl/ShaderCoders_Base.js +++ b/src/webgl/ShaderCoders_Base.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {WglArg} from "src/webgl/WglArg.js" +import {WglArg} from "./WglArg.js" /** * A piece of a shader. diff --git a/src/webgl/ShaderCoders_intoBytes.js b/src/webgl/ShaderCoders_intoBytes.js index 9468a519..f6472ef2 100644 --- a/src/webgl/ShaderCoders_intoBytes.js +++ b/src/webgl/ShaderCoders_intoBytes.js @@ -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 {WglArg} from "src/webgl/WglArg.js" -import {Seq} from "src/base/Seq.js" -import {ShaderPart, SingleTypeCoder, ShaderCoder, BOOL_TYPE_CODER} from "src/webgl/ShaderCoders_Base.js" +import {DetailedError} from "../base/DetailedError.js" +import {WglArg} from "./WglArg.js" +import {Seq} from "../base/Seq.js" +import {ShaderPart, SingleTypeCoder, ShaderCoder, BOOL_TYPE_CODER} from "./ShaderCoders_Base.js" /** * Exposes an array of single-precision floats as an array of bytes. diff --git a/src/webgl/ShaderCoders_intoFloats.js b/src/webgl/ShaderCoders_intoFloats.js index 310a8a56..650675ae 100644 --- a/src/webgl/ShaderCoders_intoFloats.js +++ b/src/webgl/ShaderCoders_intoFloats.js @@ -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 {ShaderPart, SingleTypeCoder, ShaderCoder, BOOL_TYPE_CODER} from "src/webgl/ShaderCoders_Base.js" -import {WglArg} from "src/webgl/WglArg.js" +import {DetailedError} from "../base/DetailedError.js" +import {ShaderPart, SingleTypeCoder, ShaderCoder, BOOL_TYPE_CODER} from "./ShaderCoders_Base.js" +import {WglArg} from "./WglArg.js" /** * @param {!int} vecSize diff --git a/src/webgl/Shaders.js b/src/webgl/Shaders.js index 1400f3a6..5fe93d35 100644 --- a/src/webgl/Shaders.js +++ b/src/webgl/Shaders.js @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {DetailedError} from "src/base/DetailedError.js" -import {WglArg} from "src/webgl/WglArg.js" -import {initializedWglContext} from "src/webgl/WglContext.js" -import {WglShader} from "src/webgl/WglShader.js" -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {DetailedError} from "../base/DetailedError.js" +import {WglArg} from "./WglArg.js" +import {initializedWglContext} from "./WglContext.js" +import {WglShader} from "./WglShader.js" +import {WglConfiguredShader} from "./WglConfiguredShader.js" import { currentShaderCoder, Inputs, Outputs, makePseudoShaderWithInputsAndOutputAndCode -} from "src/webgl/ShaderCoders.js" +} from "./ShaderCoders.js" /** * Utilities for creating/configuring shaders that render various simple things. diff --git a/src/webgl/WglConfiguredShader.js b/src/webgl/WglConfiguredShader.js index cc1c1a4d..0a7e2563 100644 --- a/src/webgl/WglConfiguredShader.js +++ b/src/webgl/WglConfiguredShader.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Matrix} from "src/math/Matrix.js" -import {WglTexture} from "src/webgl/WglTexture.js" +import {Matrix} from "../math/Matrix.js" +import {WglTexture} from "./WglTexture.js" /** @returns {undefined|!ShaderCoder} */ let currentShaderCoder = undefined; diff --git a/src/webgl/WglContext.js b/src/webgl/WglContext.js index 74ce65ca..d4f30d05 100644 --- a/src/webgl/WglContext.js +++ b/src/webgl/WglContext.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {canvasCreatedForTesting, webglContextCreatedForTesting} from "src/issues.js" +import {canvasCreatedForTesting, webglContextCreatedForTesting} from "../issues.js" /** * A WebGLRenderingContext wrapped with metadata helpers, lifetime information, and utility methods. diff --git a/src/webgl/WglShader.js b/src/webgl/WglShader.js index c68ae8eb..cb56bb2c 100644 --- a/src/webgl/WglShader.js +++ b/src/webgl/WglShader.js @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" -import {DetailedError} from "src/base/DetailedError.js" -import {WglArg} from "src/webgl/WglArg.js" -import {initializedWglContext} from "src/webgl/WglContext.js" -import {WglMortalValueSlot} from "src/webgl/WglMortalValueSlot.js" -import {checkGetErrorResult, checkFrameBufferStatusResult} from "src/webgl/WglUtil.js" -import {Seq} from "src/base/Seq.js" -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" +import {Config} from "../Config.js" +import {DetailedError} from "../base/DetailedError.js" +import {WglArg} from "./WglArg.js" +import {initializedWglContext} from "./WglContext.js" +import {WglMortalValueSlot} from "./WglMortalValueSlot.js" +import {checkGetErrorResult, checkFrameBufferStatusResult} from "./WglUtil.js" +import {Seq} from "../base/Seq.js" +import {WglConfiguredShader} from "./WglConfiguredShader.js" /** @type {!WglMortalValueSlot} */ const ENSURE_ATTRIBUTES_BOUND_SLOT = new WglMortalValueSlot(() => { diff --git a/src/webgl/WglTexture.js b/src/webgl/WglTexture.js index 972aac08..6da50ae5 100644 --- a/src/webgl/WglTexture.js +++ b/src/webgl/WglTexture.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {DetailedError} from "src/base/DetailedError.js" -import {Util} from "src/base/Util.js" -import {WglMortalValueSlot} from "src/webgl/WglMortalValueSlot.js" -import {initializedWglContext} from "src/webgl/WglContext.js" -import {checkGetErrorResult, checkFrameBufferStatusResult} from "src/webgl/WglUtil.js" +import {DetailedError} from "../base/DetailedError.js" +import {Util} from "../base/Util.js" +import {WglMortalValueSlot} from "./WglMortalValueSlot.js" +import {initializedWglContext} from "./WglContext.js" +import {checkGetErrorResult, checkFrameBufferStatusResult} from "./WglUtil.js" /** * Stores pixel data for/from the gpu. diff --git a/src/webgl/WglTexturePool.js b/src/webgl/WglTexturePool.js index e5970385..b2cdb8ad 100644 --- a/src/webgl/WglTexturePool.js +++ b/src/webgl/WglTexturePool.js @@ -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 {WglTexture} from "src/webgl/WglTexture.js" -import {provideWglTexturePoolToWglConfiguredShader} from "src/webgl/WglConfiguredShader.js" -import {currentShaderCoder} from "src/webgl/ShaderCoders.js" +import {DetailedError} from "../base/DetailedError.js" +import {WglTexture} from "./WglTexture.js" +import {provideWglTexturePoolToWglConfiguredShader} from "./WglConfiguredShader.js" +import {currentShaderCoder} from "./ShaderCoders.js" /** @type {!Array.>} */ const FLOAT_POOL = []; diff --git a/src/webgl/WglTextureTrader.js b/src/webgl/WglTextureTrader.js index 99fa1044..13c6c0d6 100644 --- a/src/webgl/WglTextureTrader.js +++ b/src/webgl/WglTextureTrader.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js" -import {WglTexture} from "src/webgl/WglTexture.js" -import {WglTexturePool} from "src/webgl/WglTexturePool.js" +import {WglConfiguredShader} from "./WglConfiguredShader.js" +import {WglTexture} from "./WglTexture.js" +import {WglTexturePool} from "./WglTexturePool.js" /** * A mechanism, for applying a series of shaders to textures, that handles tedious deallocation for you. diff --git a/src/webgl/WglUtil.js b/src/webgl/WglUtil.js index 70c71e89..2646a1c3 100644 --- a/src/webgl/WglUtil.js +++ b/src/webgl/WglUtil.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Config} from "src/Config.js" +import {Config} from "../Config.js" /** * Checks if the given code, returned by gl.getError, is an error or not. diff --git a/test/CircuitOperationTestUtil.js b/test/CircuitOperationTestUtil.js index 220e4524..380eefc7 100644 --- a/test/CircuitOperationTestUtil.js +++ b/test/CircuitOperationTestUtil.js @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertThat, assertTrue} from "test/TestUtil.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitEvalContext} from "src/circuit/CircuitEvalContext.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Complex} from "src/math/Complex.js" -import {Controls} from "src/circuit/Controls.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" -import {Shaders} from "src/webgl/Shaders.js" -import {Matrix} from "src/math/Matrix.js" -import {KetTextureUtil} from "src/circuit/KetTextureUtil.js" -import {seq, Seq} from "src/base/Seq.js" -import {WglTextureTrader} from "src/webgl/WglTextureTrader.js" +import {assertThat, assertTrue} from "./TestUtil.js" +import {advanceStateWithCircuit} from "../src/circuit/CircuitComputeUtil.js" +import {CircuitDefinition} from "../src/circuit/CircuitDefinition.js" +import {CircuitEvalContext} from "../src/circuit/CircuitEvalContext.js" +import {CircuitShaders} from "../src/circuit/CircuitShaders.js" +import {CircuitStats} from "../src/circuit/CircuitStats.js" +import {Complex} from "../src/math/Complex.js" +import {Controls} from "../src/circuit/Controls.js" +import {GateColumn} from "../src/circuit/GateColumn.js" +import {Gates} from "../src/gates/AllGates.js" +import {Shaders} from "../src/webgl/Shaders.js" +import {Matrix} from "../src/math/Matrix.js" +import {KetTextureUtil} from "../src/circuit/KetTextureUtil.js" +import {seq, Seq} from "../src/base/Seq.js" +import {WglTextureTrader} from "../src/webgl/WglTextureTrader.js" // Turn this on to make it easier to debug why a randomized test is failing. const USE_SIMPLE_VALUES = false; diff --git a/test/KarmaTestRunner.test.js b/test/KarmaTestRunner.test.js index d48f50e2..32271b09 100644 --- a/test/KarmaTestRunner.test.js +++ b/test/KarmaTestRunner.test.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js"; +import {Suite} from "./TestUtil.js"; let tryPromiseRun = method => { try { diff --git a/test/TestUtil.js b/test/TestUtil.js index 898db329..1ee5c81e 100644 --- a/test/TestUtil.js +++ b/test/TestUtil.js @@ -13,15 +13,15 @@ // limitations under the License. // Cheat a little bit on the testing library being independent from what it tests -import {} from "src/browser/Polyfills.js" -import {describe} from "src/base/Describe.js" -import {equate} from "src/base/Equate.js" -import {WglTexturePool} from "src/webgl/WglTexturePool.js" -import {changeShaderCoder, canTestFloatShaders} from "src/webgl/ShaderCoders.js" -import {SHADER_CODER_BYTES} from "src/webgl/ShaderCoders_intoBytes.js" -import {SHADER_CODER_FLOATS} from "src/webgl/ShaderCoders_intoFloats.js" -import {DetailedError} from "src/base/DetailedError.js" -import {Config} from "src/Config.js" +import {} from "../src/browser/Polyfills.js" +import {describe} from "../src/base/Describe.js" +import {equate} from "../src/base/Equate.js" +import {WglTexturePool} from "../src/webgl/WglTexturePool.js" +import {changeShaderCoder, canTestFloatShaders} from "../src/webgl/ShaderCoders.js" +import {SHADER_CODER_BYTES} from "../src/webgl/ShaderCoders_intoBytes.js" +import {SHADER_CODER_FLOATS} from "../src/webgl/ShaderCoders_intoFloats.js" +import {DetailedError} from "../src/base/DetailedError.js" +import {Config} from "../src/Config.js" Config.CHECK_WEB_GL_ERRORS_EVEN_ON_HOT_PATHS = true; /** @type {!int} */ diff --git a/test/base/Describe.test.js b/test/base/Describe.test.js index 8a56f367..989337fc 100644 --- a/test/base/Describe.test.js +++ b/test/base/Describe.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {describe} from "src/base/Describe.js" +import {Suite, assertThat} from "../TestUtil.js" +import {describe} from "../../src/base/Describe.js" let suite = new Suite("Describe"); diff --git a/test/base/DetailedError.test.js b/test/base/DetailedError.test.js index d2360c09..1ef98f0b 100644 --- a/test/base/DetailedError.test.js +++ b/test/base/DetailedError.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {DetailedError} from "src/base/DetailedError.js" +import {Suite, assertThat} from "../TestUtil.js" +import {DetailedError} from "../../src/base/DetailedError.js" let suite = new Suite("DetailedError"); diff --git a/test/base/Equate.test.js b/test/base/Equate.test.js index ad78604f..94456e5d 100644 --- a/test/base/Equate.test.js +++ b/test/base/Equate.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, fail, assertTrue, assertFalse} from "test/TestUtil.js" -import {equate} from "src/base/Equate.js" +import {Suite, fail, assertTrue, assertFalse} from "../TestUtil.js" +import {equate} from "../../src/base/Equate.js" -import {describe} from "src/base/Describe.js" +import {describe} from "../../src/base/Describe.js" let suite = new Suite("Equate"); diff --git a/test/base/Format.test.js b/test/base/Format.test.js index d3d8be03..512bde70 100644 --- a/test/base/Format.test.js +++ b/test/base/Format.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows} from "test/TestUtil.js" -import {Format} from "src/base/Format.js" +import {Suite, assertThat, assertThrows} from "../TestUtil.js" +import {Format} from "../../src/base/Format.js" let suite = new Suite("Format"); diff --git a/test/base/Obs.test.js b/test/base/Obs.test.js index f9c62e18..622ec0bb 100644 --- a/test/base/Obs.test.js +++ b/test/base/Obs.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {Observable, ObservableValue, ObservableSource} from "src/base/Obs.js" +import {Suite, assertThat} from "../TestUtil.js" +import {Observable, ObservableValue, ObservableSource} from "../../src/base/Obs.js" let suite = new Suite("Obs"); diff --git a/test/base/RestartableRng.test.js b/test/base/RestartableRng.test.js index 07ace947..7cb8037f 100644 --- a/test/base/RestartableRng.test.js +++ b/test/base/RestartableRng.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {RestartableRng} from "src/base/RestartableRng.js" +import {Suite, assertThat} from "../TestUtil.js" +import {RestartableRng} from "../../src/base/RestartableRng.js" let suite = new Suite("RestartableRng"); diff --git a/test/base/Revision.test.js b/test/base/Revision.test.js index 6d880414..890a5451 100644 --- a/test/base/Revision.test.js +++ b/test/base/Revision.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "test/TestUtil.js" -import {Revision} from "src/base/Revision.js" +import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "../TestUtil.js" +import {Revision} from "../../src/base/Revision.js" let suite = new Suite("Revision"); diff --git a/test/base/Seq.test.js b/test/base/Seq.test.js index 7cbb63ae..75dbefa8 100644 --- a/test/base/Seq.test.js +++ b/test/base/Seq.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "test/TestUtil.js" -import {seq, Seq} from "src/base/Seq.js" +import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "../TestUtil.js" +import {seq, Seq} from "../../src/base/Seq.js" let suite = new Suite("Seq"); diff --git a/test/base/Util.test.js b/test/base/Util.test.js index 10ae3e64..81360122 100644 --- a/test/base/Util.test.js +++ b/test/base/Util.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "test/TestUtil.js" -import {Util} from "src/base/Util.js" +import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "../TestUtil.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("Util"); diff --git a/test/circuit/CircuitComputeUtil.test.js b/test/circuit/CircuitComputeUtil.test.js index 80141a63..1536d44f 100644 --- a/test/circuit/CircuitComputeUtil.test.js +++ b/test/circuit/CircuitComputeUtil.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {setGateBuilderEffectToCircuit, advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" -import {assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {GateBuilder} from "src/circuit/Gate.js" +import {Suite} from "../TestUtil.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {setGateBuilderEffectToCircuit, advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" +import {assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {GateBuilder} from "../../src/circuit/Gate.js" -import {Controls} from "src/circuit/Controls.js" -import {Gates} from "src/gates/AllGates.js" -import {Matrix} from "src/math/Matrix.js" +import {Controls} from "../../src/circuit/Controls.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("CircuitComputeUtil"); diff --git a/test/circuit/CircuitDefinition.test.js b/test/circuit/CircuitDefinition.test.js index 0024c07e..3e90caa2 100644 --- a/test/circuit/CircuitDefinition.test.js +++ b/test/circuit/CircuitDefinition.test.js @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "test/TestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" - -import {setGateBuilderEffectToCircuit} from "src/circuit/CircuitComputeUtil.js" -import {Complex} from "src/math/Complex.js" -import {Controls} from "src/circuit/Controls.js" -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" -import {Matrix} from "src/math/Matrix.js" -import {Point} from "src/math/Point.js" -import {Seq, seq} from "src/base/Seq.js" -import {Serializer} from "src/circuit/Serializer.js" -import {Util} from "src/base/Util.js" +import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "../TestUtil.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" + +import {setGateBuilderEffectToCircuit} from "../../src/circuit/CircuitComputeUtil.js" +import {Complex} from "../../src/math/Complex.js" +import {Controls} from "../../src/circuit/Controls.js" +import {Gate, GateBuilder} from "../../src/circuit/Gate.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Matrix} from "../../src/math/Matrix.js" +import {Point} from "../../src/math/Point.js" +import {Seq, seq} from "../../src/base/Seq.js" +import {Serializer} from "../../src/circuit/Serializer.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("CircuitDefinition"); diff --git a/test/circuit/CircuitShaders.test.js b/test/circuit/CircuitShaders.test.js index a73bcf7c..9fdaf926 100644 --- a/test/circuit/CircuitShaders.test.js +++ b/test/circuit/CircuitShaders.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {assertThatCircuitShaderActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" - -import {Controls} from "src/circuit/Controls.js" -import {Seq} from "src/base/Seq.js" -import {Shaders} from "src/webgl/Shaders.js" -import {Matrix} from "src/math/Matrix.js" -import {Outputs, makePseudoShaderWithInputsAndOutputAndCode} from "src/webgl/ShaderCoders.js" +import {Suite, assertThat} from "../TestUtil.js" +import {assertThatCircuitShaderActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {CircuitShaders} from "../../src/circuit/CircuitShaders.js" + +import {Controls} from "../../src/circuit/Controls.js" +import {Seq} from "../../src/base/Seq.js" +import {Shaders} from "../../src/webgl/Shaders.js" +import {Matrix} from "../../src/math/Matrix.js" +import {Outputs, makePseudoShaderWithInputsAndOutputAndCode} from "../../src/webgl/ShaderCoders.js" let suite = new Suite("CircuitShaders"); diff --git a/test/circuit/CircuitStats.test.js b/test/circuit/CircuitStats.test.js index d4f012c7..cf2b76cc 100644 --- a/test/circuit/CircuitStats.test.js +++ b/test/circuit/CircuitStats.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertTrue} from "test/TestUtil.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" - -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" -import {Matrix} from "src/math/Matrix.js" -import {Serializer} from "src/circuit/Serializer.js" -import {seq, Seq} from "src/base/Seq.js" +import {Suite, assertThat, assertTrue} from "../TestUtil.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" + +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Matrix} from "../../src/math/Matrix.js" +import {Serializer} from "../../src/circuit/Serializer.js" +import {seq, Seq} from "../../src/base/Seq.js" let suite = new Suite("CircuitStats"); diff --git a/test/circuit/Controls.test.js b/test/circuit/Controls.test.js index b020df89..27be4466 100644 --- a/test/circuit/Controls.test.js +++ b/test/circuit/Controls.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertTrue, assertFalse, assertThat, assertThrows, Suite} from "test/TestUtil.js" -import {Controls} from "src/circuit/Controls.js" +import {assertTrue, assertFalse, assertThat, assertThrows, Suite} from "../TestUtil.js" +import {Controls} from "../../src/circuit/Controls.js" let suite = new Suite("Controls"); diff --git a/test/circuit/Gate.test.js b/test/circuit/Gate.test.js index 2790dec8..13b9cad4 100644 --- a/test/circuit/Gate.test.js +++ b/test/circuit/Gate.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {Gate, GateBuilder} from "src/circuit/Gate.js" +import {Suite, assertThat} from "../TestUtil.js" +import {Gate, GateBuilder} from "../../src/circuit/Gate.js" -import {Matrix} from "src/math/Matrix.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("Gate"); diff --git a/test/circuit/GateColumn.test.js b/test/circuit/GateColumn.test.js index e2fb2fac..a22d26ad 100644 --- a/test/circuit/GateColumn.test.js +++ b/test/circuit/GateColumn.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertTrue, assertFalse} from "test/TestUtil.js" -import {GateColumn} from "src/circuit/GateColumn.js" +import {Suite, assertThat, assertTrue, assertFalse} from "../TestUtil.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" +import {Gates} from "../../src/gates/AllGates.js" let suite = new Suite("GateColumn"); diff --git a/test/circuit/GateShaders.test.js b/test/circuit/GateShaders.test.js index e83008ba..63d01911 100644 --- a/test/circuit/GateShaders.test.js +++ b/test/circuit/GateShaders.test.js @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {GateShaders} from "src/circuit/GateShaders.js" -import {assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" +import {Suite, assertThat} from "../TestUtil.js" +import {GateShaders} from "../../src/circuit/GateShaders.js" +import {assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" -import {Complex} from "src/math/Complex.js" -import {Seq} from "src/base/Seq.js" -import {Shaders} from "src/webgl/Shaders.js" -import {Matrix} from "src/math/Matrix.js" +import {Complex} from "../../src/math/Complex.js" +import {Seq} from "../../src/base/Seq.js" +import {Shaders} from "../../src/webgl/Shaders.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("GateShaders"); diff --git a/test/circuit/KetShaderUtil.test.js b/test/circuit/KetShaderUtil.test.js index 5f222ee4..f9380658 100644 --- a/test/circuit/KetShaderUtil.test.js +++ b/test/circuit/KetShaderUtil.test.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {ketArgs, ketShader, ketShaderPermute, ketShaderPhase} from "src/circuit/KetShaderUtil.js" -import {assertThatCircuitShaderActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Suite} from "../TestUtil.js" +import {ketArgs, ketShader, ketShaderPermute, ketShaderPhase} from "../../src/circuit/KetShaderUtil.js" +import {assertThatCircuitShaderActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {Complex} from "../../src/math/Complex.js" +import {Matrix} from "../../src/math/Matrix.js" +import {WglArg} from "../../src/webgl/WglArg.js" let suite = new Suite("KetShaderUtil"); diff --git a/test/circuit/Serializer.test.js b/test/circuit/Serializer.test.js index ba4b7902..55ccfd6f 100644 --- a/test/circuit/Serializer.test.js +++ b/test/circuit/Serializer.test.js @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertTrue} from "test/TestUtil.js" -import {Serializer} from "src/circuit/Serializer.js" +import {Suite, assertThat, assertTrue} from "../TestUtil.js" +import {Serializer} from "../../src/circuit/Serializer.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {setGateBuilderEffectToCircuit} from "src/circuit/CircuitComputeUtil.js" -import {Complex} from "src/math/Complex.js" -import {CustomGateSet} from "src/circuit/CustomGateSet.js" -import {describe} from "src/base/Describe.js" -import {Gate, GateBuilder} from "src/circuit/Gate.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" -import {Matrix} from "src/math/Matrix.js" -import {MysteryGateMaker} from "src/gates/Joke_MysteryGate.js" -import {seq} from "src/base/Seq.js" -import {Util} from "src/base/Util.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {setGateBuilderEffectToCircuit} from "../../src/circuit/CircuitComputeUtil.js" +import {Complex} from "../../src/math/Complex.js" +import {CustomGateSet} from "../../src/circuit/CustomGateSet.js" +import {describe} from "../../src/base/Describe.js" +import {Gate, GateBuilder} from "../../src/circuit/Gate.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Matrix} from "../../src/math/Matrix.js" +import {MysteryGateMaker} from "../../src/gates/Joke_MysteryGate.js" +import {seq} from "../../src/base/Seq.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("Serializer"); diff --git a/test/gates/AllGates.test.js b/test/gates/AllGates.test.js index 0c8c9861..42efe714 100644 --- a/test/gates/AllGates.test.js +++ b/test/gates/AllGates.test.js @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {Gates} from "src/gates/AllGates.js" - -import {CircuitEvalContext} from "src/circuit/CircuitEvalContext.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {Controls} from "src/circuit/Controls.js" -import {Matrix} from "src/math/Matrix.js" -import {Gate} from "src/circuit/Gate.js" -import {seq} from "src/base/Seq.js" -import {WglTextureTrader} from "src/webgl/WglTextureTrader.js" -import {currentShaderCoder} from "src/webgl/ShaderCoders.js" +import {Suite, assertThat} from "../TestUtil.js" +import {Gates} from "../../src/gates/AllGates.js" + +import {CircuitEvalContext} from "../../src/circuit/CircuitEvalContext.js" +import {CircuitShaders} from "../../src/circuit/CircuitShaders.js" +import {Controls} from "../../src/circuit/Controls.js" +import {Matrix} from "../../src/math/Matrix.js" +import {Gate} from "../../src/circuit/Gate.js" +import {seq} from "../../src/base/Seq.js" +import {WglTextureTrader} from "../../src/webgl/WglTextureTrader.js" +import {currentShaderCoder} from "../../src/webgl/ShaderCoders.js" import { assertThatGateActsLikePermutation, assertThatGateActsLikePhaser -} from "test/CircuitOperationTestUtil.js" +} from "../CircuitOperationTestUtil.js" let suite = new Suite("AllGates"); diff --git a/test/gates/AmplitudeDisplay.test.js b/test/gates/AmplitudeDisplay.test.js index c982125c..803d3173 100644 --- a/test/gates/AmplitudeDisplay.test.js +++ b/test/gates/AmplitudeDisplay.test.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" +import {Suite, assertThat} from "../TestUtil.js" import { amplitudeDisplayStatTextures, AMPS_TO_SQUARED_MAGS_SHADER, @@ -20,17 +20,17 @@ import { FOLD_MAX_INDEXED_MAG_SHADER, LOOKUP_KET_AT_INDEXED_MAG_SHADER, POINTWISE_CMUL_CONJ_SHADER, -} from "src/gates/AmplitudeDisplay.js" - -import {Complex} from "src/math/Complex.js" -import {Controls} from "src/circuit/Controls.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {Serializer} from "src/circuit/Serializer.js" -import {seq} from "src/base/Seq.js" -import {Shaders} from "src/webgl/Shaders.js" -import {currentShaderCoder} from "src/webgl/ShaderCoders.js" +} from "../../src/gates/AmplitudeDisplay.js" + +import {Complex} from "../../src/math/Complex.js" +import {Controls} from "../../src/circuit/Controls.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" +import {CircuitShaders} from "../../src/circuit/CircuitShaders.js" +import {Serializer} from "../../src/circuit/Serializer.js" +import {seq} from "../../src/base/Seq.js" +import {Shaders} from "../../src/webgl/Shaders.js" +import {currentShaderCoder} from "../../src/webgl/ShaderCoders.js" let suite = new Suite("AmplitudeDisplay"); diff --git a/test/gates/ArithmeticGates.test.js b/test/gates/ArithmeticGates.test.js index 06962420..f3382d39 100644 --- a/test/gates/ArithmeticGates.test.js +++ b/test/gates/ArithmeticGates.test.js @@ -12,18 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {ArithmeticGates} from "src/gates/ArithmeticGates.js" -import {InputGates} from "src/gates/InputGates.js" +import {Suite} from "../TestUtil.js" +import {ArithmeticGates} from "../../src/gates/ArithmeticGates.js" +import {InputGates} from "../../src/gates/InputGates.js" import { assertThatCircuitUpdateActsLikeMatrix, assertThatGateActsLikePermutation, -} from "test/CircuitOperationTestUtil.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" +} from "../CircuitOperationTestUtil.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Matrix} from "src/math/Matrix.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("ArithmeticGates"); diff --git a/test/gates/BitCountGates.test.js b/test/gates/BitCountGates.test.js index bb3bf184..28026054 100644 --- a/test/gates/BitCountGates.test.js +++ b/test/gates/BitCountGates.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {BitCountGates} from "src/gates/BitCountGates.js" -import {InputGates} from "src/gates/InputGates.js" -import {assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" +import {Suite} from "../TestUtil.js" +import {BitCountGates} from "../../src/gates/BitCountGates.js" +import {InputGates} from "../../src/gates/InputGates.js" +import {assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {Matrix} from "src/math/Matrix.js" -import {Util} from "src/base/Util.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {Matrix} from "../../src/math/Matrix.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("BitCountGates"); diff --git a/test/gates/ComparisonGates.test.js b/test/gates/ComparisonGates.test.js index 2ed915f5..87500458 100644 --- a/test/gates/ComparisonGates.test.js +++ b/test/gates/ComparisonGates.test.js @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {Gates} from "src/gates/AllGates.js" -import {ComparisonGates} from "src/gates/ComparisonGates.js" -import {assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" +import {Suite} from "../TestUtil.js" +import {Gates} from "../../src/gates/AllGates.js" +import {ComparisonGates} from "../../src/gates/ComparisonGates.js" +import {assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {Matrix} from "src/math/Matrix.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("ComparisonGates"); diff --git a/test/gates/Controls.test.js b/test/gates/Controls.test.js index 3af76bad..890cdfed 100644 --- a/test/gates/Controls.test.js +++ b/test/gates/Controls.test.js @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertThat, Suite} from "test/TestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js"; -import {Gate} from "src/circuit/Gate.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" - -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" -import {Util} from "src/base/Util.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js"; +import {assertThat, Suite} from "../TestUtil.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js"; +import {Gate} from "../../src/circuit/Gate.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Gates} from "../../src/gates/AllGates.js" + +import {Complex} from "../../src/math/Complex.js" +import {Matrix} from "../../src/math/Matrix.js" +import {Util} from "../../src/base/Util.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js"; import { assertThatCircuitUpdateActsLikeMatrix, -} from "test/CircuitOperationTestUtil.js"; +} from "../CircuitOperationTestUtil.js"; let suite = new Suite("Gates.Controls"); diff --git a/test/gates/CycleBitsGates.test.js b/test/gates/CycleBitsGates.test.js index 8010446a..09ca37ad 100644 --- a/test/gates/CycleBitsGates.test.js +++ b/test/gates/CycleBitsGates.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {assertThatCircuitShaderActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {cycleBitsShader} from "src/gates/CycleBitsGates.js" +import {Suite} from "../TestUtil.js" +import {assertThatCircuitShaderActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {cycleBitsShader} from "../../src/gates/CycleBitsGates.js" -import {Matrix} from "src/math/Matrix.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("CycleBitsGates"); diff --git a/test/gates/DensityMatrixDisplay.test.js b/test/gates/DensityMatrixDisplay.test.js index 0c70d20f..1e9bd2e2 100644 --- a/test/gates/DensityMatrixDisplay.test.js +++ b/test/gates/DensityMatrixDisplay.test.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {amplitudesToCouplings} from "src/gates/DensityMatrixDisplay.js" -import {Shaders} from "src/webgl/Shaders.js" +import {Suite, assertThat} from "../TestUtil.js" +import {amplitudesToCouplings} from "../../src/gates/DensityMatrixDisplay.js" +import {Shaders} from "../../src/webgl/Shaders.js" let suite = new Suite("DensityMatrixDisplay"); diff --git a/test/gates/Detector.test.js b/test/gates/Detector.test.js index dda9fc1e..d48589bc 100644 --- a/test/gates/Detector.test.js +++ b/test/gates/Detector.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {Gates} from "src/gates/AllGates.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js"; -import {CircuitStats} from "src/circuit/CircuitStats.js"; -import {Matrix} from "src/math/Matrix.js"; +import {Suite, assertThat} from "../TestUtil.js" +import {Gates} from "../../src/gates/AllGates.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js"; +import {CircuitStats} from "../../src/circuit/CircuitStats.js"; +import {Matrix} from "../../src/math/Matrix.js"; let suite = new Suite("Detector"); diff --git a/test/gates/ExponentiatingGates.test.js b/test/gates/ExponentiatingGates.test.js index 071b4838..84346f23 100644 --- a/test/gates/ExponentiatingGates.test.js +++ b/test/gates/ExponentiatingGates.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {Gates} from "src/gates/AllGates.js" -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" +import {Suite, assertThat} from "../TestUtil.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Complex} from "../../src/math/Complex.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("ExponentiatingGates"); diff --git a/test/gates/FourierTransformGates.test.js b/test/gates/FourierTransformGates.test.js index 44f2b015..dbdf2fd4 100644 --- a/test/gates/FourierTransformGates.test.js +++ b/test/gates/FourierTransformGates.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {applyControlledPhaseGradient, FourierTransformGates} from "src/gates/FourierTransformGates.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" +import {Suite} from "../TestUtil.js" +import {assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {applyControlledPhaseGradient, FourierTransformGates} from "../../src/gates/FourierTransformGates.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" +import {Complex} from "../../src/math/Complex.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("FourierTransformGates"); diff --git a/test/gates/Impossible_UniversalNotGate.test.js b/test/gates/Impossible_UniversalNotGate.test.js index fbd359a9..75725044 100644 --- a/test/gates/Impossible_UniversalNotGate.test.js +++ b/test/gates/Impossible_UniversalNotGate.test.js @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {CircuitEvalContext} from "src/circuit/CircuitEvalContext.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {universalNot} from "src/gates/Impossible_UniversalNotGate.js" +import {Suite, assertThat} from "../TestUtil.js" +import {CircuitEvalContext} from "../../src/circuit/CircuitEvalContext.js" +import {CircuitShaders} from "../../src/circuit/CircuitShaders.js" +import {universalNot} from "../../src/gates/Impossible_UniversalNotGate.js" -import {Controls} from "src/circuit/Controls.js" -import {Shaders} from "src/webgl/Shaders.js" -import {WglTextureTrader} from "src/webgl/WglTextureTrader.js" +import {Controls} from "../../src/circuit/Controls.js" +import {Shaders} from "../../src/webgl/Shaders.js" +import {WglTextureTrader} from "../../src/webgl/WglTextureTrader.js" let suite = new Suite("Impossible_UniverseNotGate"); diff --git a/test/gates/IncrementGates.test.js b/test/gates/IncrementGates.test.js index dc9fbd15..c7d72379 100644 --- a/test/gates/IncrementGates.test.js +++ b/test/gates/IncrementGates.test.js @@ -1,12 +1,12 @@ -import {Suite} from "test/TestUtil.js" -import {offsetShader, IncrementGates} from "src/gates/IncrementGates.js" +import {Suite} from "../TestUtil.js" +import {offsetShader, IncrementGates} from "../../src/gates/IncrementGates.js" import { assertThatCircuitShaderActsLikePermutation, assertThatGateActsLikePermutation, -} from "test/CircuitOperationTestUtil.js" +} from "../CircuitOperationTestUtil.js" -import {ketArgs} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" +import {ketArgs} from "../../src/circuit/KetShaderUtil.js" +import {WglArg} from "../../src/webgl/WglArg.js" let suite = new Suite("ArithmeticGates"); diff --git a/test/gates/InputGates.test.js b/test/gates/InputGates.test.js index bf446a1a..5d111045 100644 --- a/test/gates/InputGates.test.js +++ b/test/gates/InputGates.test.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertThat, Suite} from "test/TestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Gates} from "src/gates/AllGates.js" -import {Seq} from "src/base/Seq.js" -import {Util} from "src/base/Util.js" +import {assertThat, Suite} from "../TestUtil.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Seq} from "../../src/base/Seq.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("InputGates"); diff --git a/test/gates/InterleaveBitsGates.test.js b/test/gates/InterleaveBitsGates.test.js index a58eeae8..c0ee6de8 100644 --- a/test/gates/InterleaveBitsGates.test.js +++ b/test/gates/InterleaveBitsGates.test.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" +import {Suite, assertThat} from "../TestUtil.js" import { interleaveBit, deinterleaveBit, -} from "src/gates/InterleaveBitsGates.js" +} from "../../src/gates/InterleaveBitsGates.js" let suite = new Suite("InterleaveBitsGates"); diff --git a/test/gates/ModularAdditionGates.test.js b/test/gates/ModularAdditionGates.test.js index 817a07c3..5054d4c4 100644 --- a/test/gates/ModularAdditionGates.test.js +++ b/test/gates/ModularAdditionGates.test.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {assertThatGateActsLikePermutation, assertThatCircuitOutputsBasisKet} from "test/CircuitOperationTestUtil.js" +import {Suite} from "../TestUtil.js" +import {assertThatGateActsLikePermutation, assertThatCircuitOutputsBasisKet} from "../CircuitOperationTestUtil.js" -import {ModularAdditionGates} from "src/gates/ModularAdditionGates.js" -import {InputGates} from "src/gates/InputGates.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {Util} from "src/base/Util.js" +import {ModularAdditionGates} from "../../src/gates/ModularAdditionGates.js" +import {InputGates} from "../../src/gates/InputGates.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("ModularAdditionGates"); diff --git a/test/gates/ModularIncrementGates.test.js b/test/gates/ModularIncrementGates.test.js index 2c16b938..26cbc815 100644 --- a/test/gates/ModularIncrementGates.test.js +++ b/test/gates/ModularIncrementGates.test.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertThat, Suite} from "test/TestUtil.js" -import {assertThatGateActsLikePermutation} from "test/CircuitOperationTestUtil.js" +import {assertThat, Suite} from "../TestUtil.js" +import {assertThatGateActsLikePermutation} from "../CircuitOperationTestUtil.js" -import {ModularIncrementGates} from "src/gates/ModularIncrementGates.js" -import {ModularAdditionGates} from "src/gates/ModularAdditionGates.js" -import {InputGates} from "src/gates/InputGates.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" +import {ModularIncrementGates} from "../../src/gates/ModularIncrementGates.js" +import {ModularAdditionGates} from "../../src/gates/ModularAdditionGates.js" +import {InputGates} from "../../src/gates/InputGates.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" let suite = new Suite("ModularIncrementGates"); diff --git a/test/gates/ModularMultiplicationGates.test.js b/test/gates/ModularMultiplicationGates.test.js index a374670f..799d11e2 100644 --- a/test/gates/ModularMultiplicationGates.test.js +++ b/test/gates/ModularMultiplicationGates.test.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertThat, Suite} from "test/TestUtil.js" +import {assertThat, Suite} from "../TestUtil.js" import { MODULAR_INVERSE_SHADER_CODE, POW_MOD_SHADER_CODE, @@ -20,17 +20,17 @@ import { modularUnmultiply, modularPowerMultiply, ModularMultiplicationGates -} from "src/gates/ModularMultiplicationGates.js" - -import {assertThatGateActsLikePermutation} from "test/CircuitOperationTestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Gates} from "src/gates/AllGates.js" -import {Outputs, makePseudoShaderWithInputsAndOutputAndCode} from "src/webgl/ShaderCoders.js" -import {Seq} from "src/base/Seq.js" -import {Util} from "src/base/Util.js" -import {WglArg} from "src/webgl/WglArg.js" +} from "../../src/gates/ModularMultiplicationGates.js" + +import {assertThatGateActsLikePermutation} from "../CircuitOperationTestUtil.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Outputs, makePseudoShaderWithInputsAndOutputAndCode} from "../../src/webgl/ShaderCoders.js" +import {Seq} from "../../src/base/Seq.js" +import {Util} from "../../src/base/Util.js" +import {WglArg} from "../../src/webgl/WglArg.js" let suite = new Suite("ModularMultiplicationGates"); diff --git a/test/gates/ModularMultiplyAccumulateGates.test.js b/test/gates/ModularMultiplyAccumulateGates.test.js index e9127430..5373e2f5 100644 --- a/test/gates/ModularMultiplyAccumulateGates.test.js +++ b/test/gates/ModularMultiplyAccumulateGates.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {assertThatGateActsLikePermutation} from "test/CircuitOperationTestUtil.js" +import {Suite} from "../TestUtil.js" +import {assertThatGateActsLikePermutation} from "../CircuitOperationTestUtil.js" -import {ModularMultiplyAccumulateGates} from "src/gates/ModularMultiplyAccumulateGates.js" -import {Util} from "src/base/Util.js" +import {ModularMultiplyAccumulateGates} from "../../src/gates/ModularMultiplyAccumulateGates.js" +import {Util} from "../../src/base/Util.js" let suite = new Suite("ModularMultiplyAccumulateGates"); diff --git a/test/gates/MultiplicationGates.test.js b/test/gates/MultiplicationGates.test.js index 64047425..2d79e727 100644 --- a/test/gates/MultiplicationGates.test.js +++ b/test/gates/MultiplicationGates.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {Gates} from "src/gates/AllGates.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {modularMultiply, modularUnmultiply} from "src/gates/ModularMultiplicationGates.js" -import {assertThatGateActsLikePermutation, assertThatCircuitOutputsBasisKet} from "test/CircuitOperationTestUtil.js" +import {Suite} from "../TestUtil.js" +import {Gates} from "../../src/gates/AllGates.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {modularMultiply, modularUnmultiply} from "../../src/gates/ModularMultiplicationGates.js" +import {assertThatGateActsLikePermutation, assertThatCircuitOutputsBasisKet} from "../CircuitOperationTestUtil.js" let suite = new Suite("MultiplicationGates"); diff --git a/test/gates/MultiplyAccumulateGates.test.js b/test/gates/MultiplyAccumulateGates.test.js index 0250e481..889a96ed 100644 --- a/test/gates/MultiplyAccumulateGates.test.js +++ b/test/gates/MultiplyAccumulateGates.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {MultiplyAccumulateGates} from "src/gates/MultiplyAccumulateGates.js" -import {InputGates} from "src/gates/InputGates.js" -import {assertThatCircuitOutputsBasisKet, assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" +import {Suite} from "../TestUtil.js" +import {MultiplyAccumulateGates} from "../../src/gates/MultiplyAccumulateGates.js" +import {InputGates} from "../../src/gates/InputGates.js" +import {assertThatCircuitOutputsBasisKet, assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Matrix} from "src/math/Matrix.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("MultiplyAccumulateGates"); diff --git a/test/gates/ParametrizedRotationGates.test.js b/test/gates/ParametrizedRotationGates.test.js index b8103faf..432691fa 100644 --- a/test/gates/ParametrizedRotationGates.test.js +++ b/test/gates/ParametrizedRotationGates.test.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {assertThat, Suite} from "test/TestUtil.js" +import {assertThat, Suite} from "../TestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Complex} from "src/math/Complex.js" -import {Gates} from "src/gates/AllGates.js" -import {Matrix} from "src/math/Matrix.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" +import {Complex} from "../../src/math/Complex.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("ParametrizedRotationGates"); diff --git a/test/gates/PhaseGradientGates.test.js b/test/gates/PhaseGradientGates.test.js index bd03d60f..ad3990b6 100644 --- a/test/gates/PhaseGradientGates.test.js +++ b/test/gates/PhaseGradientGates.test.js @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" +import {Suite} from "../TestUtil.js" import { assertThatCircuitShaderActsLikeMatrix, assertThatGateActsLikePhaser, -} from "test/CircuitOperationTestUtil.js" -import {PHASE_GRADIENT_SHADER, PhaseGradientGates} from "src/gates/PhaseGradientGates.js" +} from "../CircuitOperationTestUtil.js" +import {PHASE_GRADIENT_SHADER, PhaseGradientGates} from "../../src/gates/PhaseGradientGates.js" -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" -import {ketArgs} from "src/circuit/KetShaderUtil.js" -import {WglArg} from "src/webgl/WglArg.js" +import {Complex} from "../../src/math/Complex.js" +import {Matrix} from "../../src/math/Matrix.js" +import {ketArgs} from "../../src/circuit/KetShaderUtil.js" +import {WglArg} from "../../src/webgl/WglArg.js" let suite = new Suite("PhaseGradientGates"); diff --git a/test/gates/PivotFlipGates.test.js b/test/gates/PivotFlipGates.test.js index defdfa60..b14d1e42 100644 --- a/test/gates/PivotFlipGates.test.js +++ b/test/gates/PivotFlipGates.test.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {assertThatCircuitOutputsBasisKet} from "test/CircuitOperationTestUtil.js" +import {Suite} from "../TestUtil.js" +import {assertThatCircuitOutputsBasisKet} from "../CircuitOperationTestUtil.js" -import {PivotFlipGates} from "src/gates/PivotFlipGates.js" -import {Gates} from "src/gates/AllGates.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" +import {PivotFlipGates} from "../../src/gates/PivotFlipGates.js" +import {Gates} from "../../src/gates/AllGates.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" let suite = new Suite("PivotFlipGates"); diff --git a/test/gates/ProbabilityDisplay.test.js b/test/gates/ProbabilityDisplay.test.js index a4d0cc20..8929ed23 100644 --- a/test/gates/ProbabilityDisplay.test.js +++ b/test/gates/ProbabilityDisplay.test.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {amplitudesToProbabilities} from "src/gates/ProbabilityDisplay.js" +import {Suite, assertThat} from "../TestUtil.js" +import {amplitudesToProbabilities} from "../../src/gates/ProbabilityDisplay.js" -import {CircuitShaders} from "src/circuit/CircuitShaders.js" -import {Controls} from "src/circuit/Controls.js" -import {Shaders} from "src/webgl/Shaders.js" +import {CircuitShaders} from "../../src/circuit/CircuitShaders.js" +import {Controls} from "../../src/circuit/Controls.js" +import {Shaders} from "../../src/webgl/Shaders.js" let suite = new Suite("ProbabilityDisplay"); diff --git a/test/gates/SampleDisplay.test.js b/test/gates/SampleDisplay.test.js index 86e7d185..14e40f1d 100644 --- a/test/gates/SampleDisplay.test.js +++ b/test/gates/SampleDisplay.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" +import {Suite, assertThat} from "../TestUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Serializer} from "src/circuit/Serializer.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" +import {Serializer} from "../../src/circuit/Serializer.js" let suite = new Suite("SampleDisplay"); diff --git a/test/gates/XorGates.test.js b/test/gates/XorGates.test.js index b9543e9d..09be2743 100644 --- a/test/gates/XorGates.test.js +++ b/test/gates/XorGates.test.js @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite} from "test/TestUtil.js" -import {XorGates} from "src/gates/XorGates.js" -import {InputGates} from "src/gates/InputGates.js" -import {assertThatCircuitUpdateActsLikeMatrix} from "test/CircuitOperationTestUtil.js" -import {advanceStateWithCircuit} from "src/circuit/CircuitComputeUtil.js" +import {Suite} from "../TestUtil.js" +import {XorGates} from "../../src/gates/XorGates.js" +import {InputGates} from "../../src/gates/InputGates.js" +import {assertThatCircuitUpdateActsLikeMatrix} from "../CircuitOperationTestUtil.js" +import {advanceStateWithCircuit} from "../../src/circuit/CircuitComputeUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {GateColumn} from "src/circuit/GateColumn.js" -import {Matrix} from "src/math/Matrix.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {GateColumn} from "../../src/circuit/GateColumn.js" +import {Matrix} from "../../src/math/Matrix.js" let suite = new Suite("XorGates"); diff --git a/test/math/Axis.test.js b/test/math/Axis.test.js index 7e5db0dc..f180d99c 100644 --- a/test/math/Axis.test.js +++ b/test/math/Axis.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "test/TestUtil.js" -import {Axis} from "src/math/Axis.js" +import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "../TestUtil.js" +import {Axis} from "../../src/math/Axis.js" let suite = new Suite("Axis"); diff --git a/test/math/Complex.test.js b/test/math/Complex.test.js index 8d8dfecf..b595453a 100644 --- a/test/math/Complex.test.js +++ b/test/math/Complex.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue} from "test/TestUtil.js" -import {Complex} from "src/math/Complex.js" +import {Suite, assertThat, assertThrows, assertTrue} from "../TestUtil.js" +import {Complex} from "../../src/math/Complex.js" -import {Format} from "src/base/Format.js" +import {Format} from "../../src/base/Format.js" let suite = new Suite("Complex"); diff --git a/test/math/Matrix.test.js b/test/math/Matrix.test.js index 0b1e5c82..9893a4a4 100644 --- a/test/math/Matrix.test.js +++ b/test/math/Matrix.test.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "test/TestUtil.js" -import {Matrix} from "src/math/Matrix.js" +import {Suite, assertThat, assertThrows, assertTrue, assertFalse} from "../TestUtil.js" +import {Matrix} from "../../src/math/Matrix.js" -import {Complex} from "src/math/Complex.js" -import {Controls} from "src/circuit/Controls.js" -import {Format} from "src/base/Format.js" -import {Seq} from "src/base/Seq.js" +import {Complex} from "../../src/math/Complex.js" +import {Controls} from "../../src/circuit/Controls.js" +import {Format} from "../../src/base/Format.js" +import {Seq} from "../../src/base/Seq.js" let suite = new Suite("Matrix"); diff --git a/test/math/Point.test.js b/test/math/Point.test.js index 814f3765..aae615f6 100644 --- a/test/math/Point.test.js +++ b/test/math/Point.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertTrue, assertFalse} from "test/TestUtil.js" -import {Point} from "src/math/Point.js" +import {Suite, assertThat, assertTrue, assertFalse} from "../TestUtil.js" +import {Point} from "../../src/math/Point.js" let suite = new Suite("Point"); diff --git a/test/math/Rect.test.js b/test/math/Rect.test.js index 87c7ccd8..d4073b64 100644 --- a/test/math/Rect.test.js +++ b/test/math/Rect.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertTrue, assertFalse} from "test/TestUtil.js" -import {Rect} from "src/math/Rect.js" +import {Suite, assertThat, assertTrue, assertFalse} from "../TestUtil.js" +import {Rect} from "../../src/math/Rect.js" -import {Point} from "src/math/Point.js" +import {Point} from "../../src/math/Point.js" let suite = new Suite("Rect"); diff --git a/test/ui/DisplayedCircuit.test.js b/test/ui/DisplayedCircuit.test.js index e91c46f0..bdca9382 100644 --- a/test/ui/DisplayedCircuit.test.js +++ b/test/ui/DisplayedCircuit.test.js @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows} from "test/TestUtil.js" -import {DisplayedCircuit} from "src/ui/DisplayedCircuit.js" +import {Suite, assertThat, assertThrows} from "../TestUtil.js" +import {DisplayedCircuit} from "../../src/ui/DisplayedCircuit.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Gates} from "src/gates/AllGates.js" -import {Point} from "src/math/Point.js" -import {RestartableRng} from "src/base/RestartableRng.js" -import {Hand} from "src/ui/Hand.js" -import {Painter} from "src/draw/Painter.js" +import {CircuitDefinition} from "../../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../../src/circuit/CircuitStats.js" +import {Gates} from "../../src/gates/AllGates.js" +import {Point} from "../../src/math/Point.js" +import {RestartableRng} from "../../src/base/RestartableRng.js" +import {Hand} from "../../src/ui/Hand.js" +import {Painter} from "../../src/draw/Painter.js" const COMMON_GATES = new Map([ ['X', Gates.HalfTurns.X], diff --git a/test/ui/MathPainter.test.js b/test/ui/MathPainter.test.js index d201acf7..704cf5dd 100644 --- a/test/ui/MathPainter.test.js +++ b/test/ui/MathPainter.test.js @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {MathPainter} from "src/draw/MathPainter.js" +import {Suite, assertThat} from "../TestUtil.js" +import {MathPainter} from "../../src/draw/MathPainter.js" let suite = new Suite("MathPainter"); diff --git a/test/ui/Painter.test.js b/test/ui/Painter.test.js index 6d64066b..a957bf7a 100644 --- a/test/ui/Painter.test.js +++ b/test/ui/Painter.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {Painter} from "src/draw/Painter.js" +import {Suite, assertThat} from "../TestUtil.js" +import {Painter} from "../../src/draw/Painter.js" -import {Point} from "src/math/Point.js" -import {Rect} from "src/math/Rect.js" +import {Point} from "../../src/math/Point.js" +import {Rect} from "../../src/math/Rect.js" let suite = new Suite("Painter"); diff --git a/test/ui/WidgetPainter.test.js b/test/ui/WidgetPainter.test.js index 1de07b47..70af4333 100644 --- a/test/ui/WidgetPainter.test.js +++ b/test/ui/WidgetPainter.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {WidgetPainter} from "src/draw/WidgetPainter.js" +import {Suite, assertThat} from "../TestUtil.js" +import {WidgetPainter} from "../../src/draw/WidgetPainter.js" -import {Format} from "src/base/Format.js" -import {Complex} from "src/math/Complex.js" +import {Format} from "../../src/base/Format.js" +import {Complex} from "../../src/math/Complex.js" let suite = new Suite("WidgetPainter"); diff --git a/test/ui/forge.test.js b/test/ui/forge.test.js index 571d3a42..0b4d5b78 100644 --- a/test/ui/forge.test.js +++ b/test/ui/forge.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows} from "test/TestUtil.js" -import {Complex} from "src/math/Complex.js" -import {Matrix} from "src/math/Matrix.js" -import {parseUserMatrix, parseUserRotation} from "src/ui/forge.js" +import {Suite, assertThat, assertThrows} from "../TestUtil.js" +import {Complex} from "../../src/math/Complex.js" +import {Matrix} from "../../src/math/Matrix.js" +import {parseUserMatrix, parseUserRotation} from "../../src/ui/forge.js" let suite = new Suite("forge"); diff --git a/test/webgl/ShaderCoders.test.js b/test/webgl/ShaderCoders.test.js index 60dec3a1..b7ec891c 100644 --- a/test/webgl/ShaderCoders.test.js +++ b/test/webgl/ShaderCoders.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {combinedShaderPartsWithCode, shaderWithOutputPartAndArgs} from "src/webgl/ShaderCoders.js" -import {currentShaderCoder} from "src/webgl/ShaderCoders.js" -import {Shaders} from "src/webgl/Shaders.js" +import {Suite, assertThat} from "../TestUtil.js" +import {combinedShaderPartsWithCode, shaderWithOutputPartAndArgs} from "../../src/webgl/ShaderCoders.js" +import {currentShaderCoder} from "../../src/webgl/ShaderCoders.js" +import {Shaders} from "../../src/webgl/Shaders.js" let suite = new Suite("ShaderCoders"); diff --git a/test/webgl/ShaderCoders_Base.test.js b/test/webgl/ShaderCoders_Base.test.js index fca8cb92..7e345184 100644 --- a/test/webgl/ShaderCoders_Base.test.js +++ b/test/webgl/ShaderCoders_Base.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" +import {Suite, assertThat} from "../TestUtil.js" -import {BOOL_TYPE_CODER} from "src/webgl/ShaderCoders_Base.js" -import {combinedShaderPartsWithCode, shaderWithOutputPartAndArgs} from "src/webgl/ShaderCoders.js" -import {Shaders} from "src/webgl/Shaders.js" +import {BOOL_TYPE_CODER} from "../../src/webgl/ShaderCoders_Base.js" +import {combinedShaderPartsWithCode, shaderWithOutputPartAndArgs} from "../../src/webgl/ShaderCoders.js" +import {Shaders} from "../../src/webgl/Shaders.js" let suite = new Suite("ShaderCoders_Base"); diff --git a/test/webgl/ShaderCoders_intoBytes.test.js b/test/webgl/ShaderCoders_intoBytes.test.js index 3c68abe5..a79cfa16 100644 --- a/test/webgl/ShaderCoders_intoBytes.test.js +++ b/test/webgl/ShaderCoders_intoBytes.test.js @@ -12,20 +12,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows} from "test/TestUtil.js" +import {Suite, assertThat, assertThrows} from "../TestUtil.js" import { bytesAsFloats, floatsAsBytes, PACK_FLOAT_INTO_BYTES_CODE, SHADER_CODER_BYTES, UNPACK_BYTES_INTO_FLOAT_CODE, -} from "src/webgl/ShaderCoders_intoBytes.js" -import {SHADER_CODER_FLOATS} from "src/webgl/ShaderCoders_intoFloats.js" -import {combinedShaderPartsWithCode, shaderWithOutputPartAndArgs } from "src/webgl/ShaderCoders.js" -import {Seq} from "src/base/Seq.js" -import {Shaders} from "src/webgl/Shaders.js" -import {WglArg} from "src/webgl/WglArg.js" -import {WglShader} from "src/webgl/WglShader.js" +} from "../../src/webgl/ShaderCoders_intoBytes.js" +import {SHADER_CODER_FLOATS} from "../../src/webgl/ShaderCoders_intoFloats.js" +import {combinedShaderPartsWithCode, shaderWithOutputPartAndArgs } from "../../src/webgl/ShaderCoders.js" +import {Seq} from "../../src/base/Seq.js" +import {Shaders} from "../../src/webgl/Shaders.js" +import {WglArg} from "../../src/webgl/WglArg.js" +import {WglShader} from "../../src/webgl/WglShader.js" let suite = new Suite("ShaderCoders_intoBytes"); diff --git a/test/webgl/ShaderCoders_intoFloats.test.js b/test/webgl/ShaderCoders_intoFloats.test.js index 8540cabe..3459b970 100644 --- a/test/webgl/ShaderCoders_intoFloats.test.js +++ b/test/webgl/ShaderCoders_intoFloats.test.js @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows} from "test/TestUtil.js" -import {SHADER_CODER_FLOATS} from "src/webgl/ShaderCoders_intoFloats.js" -import {Shaders} from "src/webgl/Shaders.js" +import {Suite, assertThat, assertThrows} from "../TestUtil.js" +import {SHADER_CODER_FLOATS} from "../../src/webgl/ShaderCoders_intoFloats.js" +import {Shaders} from "../../src/webgl/Shaders.js" let suite = new Suite("ShaderCoders"); diff --git a/test/webgl/Shaders.test.js b/test/webgl/Shaders.test.js index 9c5e6b45..1b8a54f1 100644 --- a/test/webgl/Shaders.test.js +++ b/test/webgl/Shaders.test.js @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat, assertThrows} from "test/TestUtil.js" -import {Shaders} from "src/webgl/Shaders.js" +import {Suite, assertThat, assertThrows} from "../TestUtil.js" +import {Shaders} from "../../src/webgl/Shaders.js" import { Outputs, makePseudoShaderWithInputsAndOutputAndCode -} from "src/webgl/ShaderCoders.js" -import {WglShader} from "src/webgl/WglShader.js" -import {WglTexture} from "src/webgl/WglTexture.js" +} from "../../src/webgl/ShaderCoders.js" +import {WglShader} from "../../src/webgl/WglShader.js" +import {WglTexture} from "../../src/webgl/WglTexture.js" -import {Seq} from "src/base/Seq.js" +import {Seq} from "../../src/base/Seq.js" let suite = new Suite("Shaders"); diff --git a/test/webgl/WglArg.test.js b/test/webgl/WglArg.test.js index c5a07e80..6badad6b 100644 --- a/test/webgl/WglArg.test.js +++ b/test/webgl/WglArg.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {WglArg} from "src/webgl/WglArg.js" -import {WglShader} from "src/webgl/WglShader.js" -import {WglTexture} from "src/webgl/WglTexture.js" +import {Suite, assertThat} from "../TestUtil.js" +import {WglArg} from "../../src/webgl/WglArg.js" +import {WglShader} from "../../src/webgl/WglShader.js" +import {WglTexture} from "../../src/webgl/WglTexture.js" let suite = new Suite("WglArg"); diff --git a/test/webgl/WglShader.test.js b/test/webgl/WglShader.test.js index f2344912..703b13bf 100644 --- a/test/webgl/WglShader.test.js +++ b/test/webgl/WglShader.test.js @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {WglShader} from "src/webgl/WglShader.js" -import {WglTexture} from "src/webgl/WglTexture.js" -import {Seq} from "src/base/Seq.js" -import {initializedWglContext} from "src/webgl/WglContext.js" +import {Suite, assertThat} from "../TestUtil.js" +import {WglShader} from "../../src/webgl/WglShader.js" +import {WglTexture} from "../../src/webgl/WglTexture.js" +import {Seq} from "../../src/base/Seq.js" +import {initializedWglContext} from "../../src/webgl/WglContext.js" let suite = new Suite("WglShader"); diff --git a/test/webgl/WglTexture.test.js b/test/webgl/WglTexture.test.js index 532ee603..44b58f97 100644 --- a/test/webgl/WglTexture.test.js +++ b/test/webgl/WglTexture.test.js @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" -import {WglArg} from "src/webgl/WglArg.js" -import {WglShader} from "src/webgl/WglShader.js" -import {WglTexture} from "src/webgl/WglTexture.js" +import {Suite, assertThat} from "../TestUtil.js" +import {WglArg} from "../../src/webgl/WglArg.js" +import {WglShader} from "../../src/webgl/WglShader.js" +import {WglTexture} from "../../src/webgl/WglTexture.js" let suite = new Suite("WglTexture"); diff --git a/test/webgl/WglTexturePool.test.js b/test/webgl/WglTexturePool.test.js index f6840c11..42d5981b 100644 --- a/test/webgl/WglTexturePool.test.js +++ b/test/webgl/WglTexturePool.test.js @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Suite, assertThat} from "test/TestUtil.js" +import {Suite, assertThat} from "../TestUtil.js" import { currentShaderCoder, Outputs, makePseudoShaderWithInputsAndOutputAndCode -} from "src/webgl/ShaderCoders.js" -import {WglTexturePool} from "src/webgl/WglTexturePool.js" +} from "../../src/webgl/ShaderCoders.js" +import {WglTexturePool} from "../../src/webgl/WglTexturePool.js" let suite = new Suite("WglTexturePool"); diff --git a/test_perf/CircuitStats.perf.js b/test_perf/CircuitStats.perf.js index b6277c53..3eec2a48 100644 --- a/test_perf/CircuitStats.perf.js +++ b/test_perf/CircuitStats.perf.js @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {perfGoal, millis} from "test_perf/TestPerfUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Gate} from "src/circuit/Gate.js" -import {Gates} from "src/gates/AllGates.js" -import {Matrix} from "src/math/Matrix.js" +import {perfGoal, millis} from "./TestPerfUtil.js" +import {CircuitDefinition} from "../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../src/circuit/CircuitStats.js" +import {Gate} from "../src/circuit/Gate.js" +import {Gates} from "../src/gates/AllGates.js" +import {Matrix} from "../src/math/Matrix.js" const diagram = (diagram, ...extras) => CircuitDefinition.fromTextDiagram(new Map([ ...extras, diff --git a/test_perf/DisplayedInspector.perf.js b/test_perf/DisplayedInspector.perf.js index 1adbf32b..adf48c48 100644 --- a/test_perf/DisplayedInspector.perf.js +++ b/test_perf/DisplayedInspector.perf.js @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {perfGoal, millis} from "test_perf/TestPerfUtil.js" -import {CircuitDefinition} from "src/circuit/CircuitDefinition.js" -import {CircuitStats} from "src/circuit/CircuitStats.js" -import {Rect} from "src/math/Rect.js" -import {Gates} from "src/gates/AllGates.js" -import {Hand} from "src/ui/Hand.js" -import {Painter} from "src/draw/Painter.js" -import {RestartableRng} from "src/base/RestartableRng.js" -import {DisplayedCircuit} from "src/ui/DisplayedCircuit.js" -import {DisplayedInspector} from "src/ui/DisplayedInspector.js" -import {Serializer} from "src/circuit/Serializer.js" +import {perfGoal, millis} from "./TestPerfUtil.js" +import {CircuitDefinition} from "../src/circuit/CircuitDefinition.js" +import {CircuitStats} from "../src/circuit/CircuitStats.js" +import {Rect} from "../src/math/Rect.js" +import {Gates} from "../src/gates/AllGates.js" +import {Hand} from "../src/ui/Hand.js" +import {Painter} from "../src/draw/Painter.js" +import {RestartableRng} from "../src/base/RestartableRng.js" +import {DisplayedCircuit} from "../src/ui/DisplayedCircuit.js" +import {DisplayedInspector} from "../src/ui/DisplayedInspector.js" +import {Serializer} from "../src/circuit/Serializer.js" perfGoal( "Update inspector circuit", diff --git a/test_perf/KarmaTestRunner.perf.js b/test_perf/KarmaTestRunner.perf.js index f8642b2a..a1674318 100644 --- a/test_perf/KarmaTestRunner.perf.js +++ b/test_perf/KarmaTestRunner.perf.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {getKnownPerfTests} from "test_perf/TestPerfUtil.js"; +import {getKnownPerfTests} from "./TestPerfUtil.js"; let execIntoPromise = method => { try { diff --git a/test_perf/TestPerfUtil.js b/test_perf/TestPerfUtil.js index a1bc5345..5f8adebe 100644 --- a/test_perf/TestPerfUtil.js +++ b/test_perf/TestPerfUtil.js @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {} from "src/browser/Polyfills.js" +import {} from "../src/browser/Polyfills.js" function nanos(nanoseconds) { return {