diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 00000000..ae319c70
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,23 @@
+# How to Contribute
+
+We'd love to accept your patches and contributions to this project. There are
+just a few small guidelines you need to follow.
+
+## Contributor License Agreement
+
+Contributions to this project must be accompanied by a Contributor License
+Agreement. You (or your employer) retain the copyright to your contribution,
+this simply gives us permission to use and redistribute your contributions as
+part of the project. Head over to to see
+your current agreements on file or to sign a new one.
+
+You generally only need to submit a CLA once, so if you've already submitted one
+(even if it was for a different project), you probably don't need to do it
+again.
+
+## Code reviews
+
+All submissions, including submissions by project members, require review. We
+use GitHub pull requests for this purpose. Consult
+[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
+information on using pull requests.
diff --git a/GruntFile.js b/GruntFile.js
index b7658a66..e845277b 100644
--- a/GruntFile.js
+++ b/GruntFile.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
var path = require('path');
module.exports = function(grunt) {
diff --git a/LICENSE b/LICENSE
index ea6146ba..a1c6dc61 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright 2016 Craig Gidney
+ Copyright 2017 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/html/quirk.template.html b/html/quirk.template.html
index dca086da..ee62b76a 100644
--- a/html/quirk.template.html
+++ b/html/quirk.template.html
@@ -22,7 +22,8 @@
-
+
+
diff --git a/karma.test.conf.js b/karma.test.conf.js
index e302642d..dc69150c 100644
--- a/karma.test.conf.js
+++ b/karma.test.conf.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
module.exports = function(config) {
config.set({
basePath: '',
diff --git a/karma.test_perf.conf.js b/karma.test_perf.conf.js
index 5bd786a8..6f1617a9 100644
--- a/karma.test_perf.conf.js
+++ b/karma.test_perf.conf.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
module.exports = function(config) {
config.set({
basePath: '',
diff --git a/src/Config.js b/src/Config.js
index 2f9e0815..e6bccfb8 100644
--- a/src/Config.js
+++ b/src/Config.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Configuration parameters for quantum circuit visualizer.
*/
diff --git a/src/base/CooldownThrottle.js b/src/base/CooldownThrottle.js
index 04ba535e..ee27f629 100644
--- a/src/base/CooldownThrottle.js
+++ b/src/base/CooldownThrottle.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Performs an action when triggered, but defers the action if it happens too soon after the last one.
*
diff --git a/src/base/Describe.js b/src/base/Describe.js
index d9c01951..9e8baf72 100644
--- a/src/base/Describe.js
+++ b/src/base/Describe.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
const COLLECTION_CUTOFF = 1000;
const BAD_TO_STRING_RESULT = new (function(){})().toString();
const RECURSE_LIMIT_DESCRIPTION = "!recursion-limit!";
diff --git a/src/base/DetailedError.js b/src/base/DetailedError.js
index 9e4a6f6a..5201f5c7 100644
--- a/src/base/DetailedError.js
+++ b/src/base/DetailedError.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {describe} from "src/base/Describe.js"
let CONSTRUCTOR_CALLS_NESTING = 0;
diff --git a/src/base/Equate.js b/src/base/Equate.js
index 2aca4219..32b874d1 100644
--- a/src/base/Equate.js
+++ b/src/base/Equate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Determines if two values are currently equivalent.
*
diff --git a/src/base/Format.js b/src/base/Format.js
index 3c40a711..c109fe18 100644
--- a/src/base/Format.js
+++ b/src/base/Format.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Stores formatting options, for determining what string output should look like.
*/
diff --git a/src/base/Obs.js b/src/base/Obs.js
index 3af89122..12b984dc 100644
--- a/src/base/Obs.js
+++ b/src/base/Obs.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {CooldownThrottle} from "src/base/CooldownThrottle.js"
/**
diff --git a/src/base/RestartableRng.js b/src/base/RestartableRng.js
index c66d92dd..998311f3 100644
--- a/src/base/RestartableRng.js
+++ b/src/base/RestartableRng.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* A random number generator that records its results, so you can make a restarted copy.
*/
diff --git a/src/base/Revision.js b/src/base/Revision.js
index 57a3303f..08d47d94 100644
--- a/src/base/Revision.js
+++ b/src/base/Revision.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
@@ -46,6 +60,14 @@ class Revision {
return this._latestActiveCommit.observable();
}
+ /**
+ * Returns a snapshot of the current commit.
+ * @returns {*}
+ */
+ peekActiveCommit() {
+ return this._latestActiveCommit.get();
+ }
+
/**
* Returns a cleared revision history, starting at the given state.
* @param {*} state
diff --git a/src/base/Seq.js b/src/base/Seq.js
index d696bc60..720e4659 100644
--- a/src/base/Seq.js
+++ b/src/base/Seq.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {DetailedError} from "src/base/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 fb55aa0a..f35004ef 100644
--- a/src/base/Util.js
+++ b/src/base/Util.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {DetailedError} from "src/base/DetailedError.js"
/**
diff --git a/src/browser/Clipboard.js b/src/browser/Clipboard.js
index 60909d39..815b571c 100644
--- a/src/browser/Clipboard.js
+++ b/src/browser/Clipboard.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* @param {!HTMLElement} element
* @throws
diff --git a/src/browser/EventUtil.js b/src/browser/EventUtil.js
index e4dc6aef..ab7c843f 100644
--- a/src/browser/EventUtil.js
+++ b/src/browser/EventUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Observable} from "src/base/Obs.js"
/**
diff --git a/src/browser/HistoryPusher.js b/src/browser/HistoryPusher.js
index 2855f096..8b699175 100644
--- a/src/browser/HistoryPusher.js
+++ b/src/browser/HistoryPusher.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {DetailedError} from "src/base/DetailedError.js"
/**
diff --git a/src/browser/MouseWatcher.js b/src/browser/MouseWatcher.js
index a2c9f1b3..5e2fe8a8 100644
--- a/src/browser/MouseWatcher.js
+++ b/src/browser/MouseWatcher.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Point} from "src/math/Point.js"
const ALLOW_REGRAB_WATCHDOG_TIME_MS = 5000;
diff --git a/src/browser/Polyfills.js b/src/browser/Polyfills.js
index c90c2c7a..c5906507 100644
--- a/src/browser/Polyfills.js
+++ b/src/browser/Polyfills.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
// Several browsers (IE, Safari, Samsung) don't implement slice.
Float32Array.prototype.slice = Float32Array.prototype.slice || function(a, b) {
return new Float32Array(Array.from(this).slice(a, b));
diff --git a/src/browser/SaveFile.js b/src/browser/SaveFile.js
index 3cc4aec0..4cc74208 100644
--- a/src/browser/SaveFile.js
+++ b/src/browser/SaveFile.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* @param {!string} name
* @param {!string} content
diff --git a/src/browser/TouchScrollBlocker.js b/src/browser/TouchScrollBlocker.js
index 11494369..f12ff52c 100644
--- a/src/browser/TouchScrollBlocker.js
+++ b/src/browser/TouchScrollBlocker.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Rect} from "src/math/Rect.js"
class TouchScrollBlocker {
diff --git a/src/circuit/CircuitComputeUtil.js b/src/circuit/CircuitComputeUtil.js
index 7ccfb687..d9f47d7f 100644
--- a/src/circuit/CircuitComputeUtil.js
+++ b/src/circuit/CircuitComputeUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {KetTextureUtil} from "src/circuit/KetTextureUtil.js"
diff --git a/src/circuit/CircuitDefinition.js b/src/circuit/CircuitDefinition.js
index 05278dfd..2c3960f3 100644
--- a/src/circuit/CircuitDefinition.js
+++ b/src/circuit/CircuitDefinition.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/CircuitEvalContext.js b/src/circuit/CircuitEvalContext.js
index 3b3d8131..7bcb81a1 100644
--- a/src/circuit/CircuitEvalContext.js
+++ b/src/circuit/CircuitEvalContext.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Util} from "src/base/Util.js"
import {WglConfiguredShader} from "src/webgl/WglConfiguredShader.js"
diff --git a/src/circuit/CircuitShaders.js b/src/circuit/CircuitShaders.js
index af050224..a5031e3f 100644
--- a/src/circuit/CircuitShaders.js
+++ b/src/circuit/CircuitShaders.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/CircuitStats.js b/src/circuit/CircuitStats.js
index 7f61a7f6..bcd78719 100644
--- a/src/circuit/CircuitStats.js
+++ b/src/circuit/CircuitStats.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/Controls.js b/src/circuit/Controls.js
index 05fae427..c4a70924 100644
--- a/src/circuit/Controls.js
+++ b/src/circuit/Controls.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/CustomGateSet.js b/src/circuit/CustomGateSet.js
index 5ad3eb45..0b82704d 100644
--- a/src/circuit/CustomGateSet.js
+++ b/src/circuit/CustomGateSet.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {DetailedError} from "src/base/DetailedError.js"
class CustomGateSet {
diff --git a/src/circuit/Gate.js b/src/circuit/Gate.js
index 74db45cc..67dcdfb3 100644
--- a/src/circuit/Gate.js
+++ b/src/circuit/Gate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/GateCheckArgs.js b/src/circuit/GateCheckArgs.js
index 882eca26..6782f4c5 100644
--- a/src/circuit/GateCheckArgs.js
+++ b/src/circuit/GateCheckArgs.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Values used by gate disable reason finder functions.
*/
diff --git a/src/circuit/GateColumn.js b/src/circuit/GateColumn.js
index 80ac0a22..bb4dcf34 100644
--- a/src/circuit/GateColumn.js
+++ b/src/circuit/GateColumn.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/GateShaders.js b/src/circuit/GateShaders.js
index bf2824c1..f6444a1c 100644
--- a/src/circuit/GateShaders.js
+++ b/src/circuit/GateShaders.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/KetShaderUtil.js b/src/circuit/KetShaderUtil.js
index 16bae3c7..882e2d60 100644
--- a/src/circuit/KetShaderUtil.js
+++ b/src/circuit/KetShaderUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/KetTextureUtil.js b/src/circuit/KetTextureUtil.js
index db95f6c0..b11ec149 100644
--- a/src/circuit/KetTextureUtil.js
+++ b/src/circuit/KetTextureUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/circuit/Serializer.js b/src/circuit/Serializer.js
index effc09f9..1f4dddc1 100644
--- a/src/circuit/Serializer.js
+++ b/src/circuit/Serializer.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/draw/CachablePainting.js b/src/draw/CachablePainting.js
index bd3a29c6..929741e8 100644
--- a/src/draw/CachablePainting.js
+++ b/src/draw/CachablePainting.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/draw/GateDrawParams.js b/src/draw/GateDrawParams.js
index d7c09049..e5e87dc2 100644
--- a/src/draw/GateDrawParams.js
+++ b/src/draw/GateDrawParams.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Values used by the various gate drawing strategies.
*/
diff --git a/src/draw/GatePainting.js b/src/draw/GatePainting.js
index 32ee7509..402280ce 100644
--- a/src/draw/GatePainting.js
+++ b/src/draw/GatePainting.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/draw/MathPainter.js b/src/draw/MathPainter.js
index 29a96b71..12f19052 100644
--- a/src/draw/MathPainter.js
+++ b/src/draw/MathPainter.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/draw/Painter.js b/src/draw/Painter.js
index 314f983f..cf1112ac 100644
--- a/src/draw/Painter.js
+++ b/src/draw/Painter.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/draw/WidgetPainter.js b/src/draw/WidgetPainter.js
index 0601ae9e..9dad67e4 100644
--- a/src/draw/WidgetPainter.js
+++ b/src/draw/WidgetPainter.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/fallback.js b/src/fallback.js
index 9bbb3098..027bdba5 100644
--- a/src/fallback.js
+++ b/src/fallback.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {describe} from "src/base/Describe.js"
/**
diff --git a/src/gates/AllGates.js b/src/gates/AllGates.js
index 444a9781..06da00c2 100644
--- a/src/gates/AllGates.js
+++ b/src/gates/AllGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/AmplitudeDisplay.js b/src/gates/AmplitudeDisplay.js
index f5ce1266..cf89fb6a 100644
--- a/src/gates/AmplitudeDisplay.js
+++ b/src/gates/AmplitudeDisplay.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ArithmeticGates.js b/src/gates/ArithmeticGates.js
index ad213035..73368765 100644
--- a/src/gates/ArithmeticGates.js
+++ b/src/gates/ArithmeticGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/BitCountGates.js b/src/gates/BitCountGates.js
index bcedb727..65cc4586 100644
--- a/src/gates/BitCountGates.js
+++ b/src/gates/BitCountGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/BlochSphereDisplay.js b/src/gates/BlochSphereDisplay.js
index e0f15165..402f2591 100644
--- a/src/gates/BlochSphereDisplay.js
+++ b/src/gates/BlochSphereDisplay.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ComparisonGates.js b/src/gates/ComparisonGates.js
index e96d6fe6..5ceecf7c 100644
--- a/src/gates/ComparisonGates.js
+++ b/src/gates/ComparisonGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/Controls.js b/src/gates/Controls.js
index 306f5a11..edd41b4b 100644
--- a/src/gates/Controls.js
+++ b/src/gates/Controls.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/CountingGates.js b/src/gates/CountingGates.js
index ad6564e9..ac188d7c 100644
--- a/src/gates/CountingGates.js
+++ b/src/gates/CountingGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/CycleBitsGates.js b/src/gates/CycleBitsGates.js
index 0d3f7ff7..120e2e0c 100644
--- a/src/gates/CycleBitsGates.js
+++ b/src/gates/CycleBitsGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/Debug_ErrorInjectionGate.js b/src/gates/Debug_ErrorInjectionGate.js
index 9b51f249..794fcecd 100644
--- a/src/gates/Debug_ErrorInjectionGate.js
+++ b/src/gates/Debug_ErrorInjectionGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/DensityMatrixDisplay.js b/src/gates/DensityMatrixDisplay.js
index 61f30e65..13177556 100644
--- a/src/gates/DensityMatrixDisplay.js
+++ b/src/gates/DensityMatrixDisplay.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ExponentiatingGates.js b/src/gates/ExponentiatingGates.js
index cfc1fe1b..861dd7fc 100644
--- a/src/gates/ExponentiatingGates.js
+++ b/src/gates/ExponentiatingGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/FourierTransformGates.js b/src/gates/FourierTransformGates.js
index cc83b214..3f3182b3 100644
--- a/src/gates/FourierTransformGates.js
+++ b/src/gates/FourierTransformGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/HalfTurnGates.js b/src/gates/HalfTurnGates.js
index dbc9ddb7..14695a7d 100644
--- a/src/gates/HalfTurnGates.js
+++ b/src/gates/HalfTurnGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/Impossible_UniversalNotGate.js b/src/gates/Impossible_UniversalNotGate.js
index a7b29b2d..490ce905 100644
--- a/src/gates/Impossible_UniversalNotGate.js
+++ b/src/gates/Impossible_UniversalNotGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/InputGates.js b/src/gates/InputGates.js
index 2c54a995..d73ad960 100644
--- a/src/gates/InputGates.js
+++ b/src/gates/InputGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/InterleaveBitsGates.js b/src/gates/InterleaveBitsGates.js
index c8d390c2..92823143 100644
--- a/src/gates/InterleaveBitsGates.js
+++ b/src/gates/InterleaveBitsGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/Joke_MysteryGate.js b/src/gates/Joke_MysteryGate.js
index fa405b18..fc68003a 100644
--- a/src/gates/Joke_MysteryGate.js
+++ b/src/gates/Joke_MysteryGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/Joke_NeGate.js b/src/gates/Joke_NeGate.js
index 9b9b5334..308c444a 100644
--- a/src/gates/Joke_NeGate.js
+++ b/src/gates/Joke_NeGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/Joke_ZeroGate.js b/src/gates/Joke_ZeroGate.js
index ed354fb7..5b099897 100644
--- a/src/gates/Joke_ZeroGate.js
+++ b/src/gates/Joke_ZeroGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/MeasurementGate.js b/src/gates/MeasurementGate.js
index 8b759aa8..7f4030ea 100644
--- a/src/gates/MeasurementGate.js
+++ b/src/gates/MeasurementGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ModularAdditionGates.js b/src/gates/ModularAdditionGates.js
index c62aa455..18b84098 100644
--- a/src/gates/ModularAdditionGates.js
+++ b/src/gates/ModularAdditionGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ModularIncrementGates.js b/src/gates/ModularIncrementGates.js
index 4c0044b2..7a1747ea 100644
--- a/src/gates/ModularIncrementGates.js
+++ b/src/gates/ModularIncrementGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ModularMultiplicationGates.js b/src/gates/ModularMultiplicationGates.js
index 7b3b28f5..239aeacc 100644
--- a/src/gates/ModularMultiplicationGates.js
+++ b/src/gates/ModularMultiplicationGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {
diff --git a/src/gates/ModularMultiplyAccumulateGates.js b/src/gates/ModularMultiplyAccumulateGates.js
index 61393532..9ea58fc6 100644
--- a/src/gates/ModularMultiplyAccumulateGates.js
+++ b/src/gates/ModularMultiplyAccumulateGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/MultiplicationGates.js b/src/gates/MultiplicationGates.js
index 2b758676..5027cdac 100644
--- a/src/gates/MultiplicationGates.js
+++ b/src/gates/MultiplicationGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {
diff --git a/src/gates/MultiplyAccumulateGates.js b/src/gates/MultiplyAccumulateGates.js
index cf8683ee..1016d9d4 100644
--- a/src/gates/MultiplyAccumulateGates.js
+++ b/src/gates/MultiplyAccumulateGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ParametrizedRotationGates.js b/src/gates/ParametrizedRotationGates.js
index b3a812da..4f4b2e1d 100644
--- a/src/gates/ParametrizedRotationGates.js
+++ b/src/gates/ParametrizedRotationGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {ketArgs, ketShader, ketShaderPhase, ketInputGateShaderCode} from "src/circuit/KetShaderUtil.js"
diff --git a/src/gates/PhaseGradientGates.js b/src/gates/PhaseGradientGates.js
index c1cdb5fc..23c7e02a 100644
--- a/src/gates/PhaseGradientGates.js
+++ b/src/gates/PhaseGradientGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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, ketShaderPhase} from "src/circuit/KetShaderUtil.js"
diff --git a/src/gates/PivotFlipGates.js b/src/gates/PivotFlipGates.js
index 671071ba..c6cb9829 100644
--- a/src/gates/PivotFlipGates.js
+++ b/src/gates/PivotFlipGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {modulusTooBigChecker} from 'src/gates/ModularIncrementGates.js'
diff --git a/src/gates/PostSelectionGates.js b/src/gates/PostSelectionGates.js
index 532f6ed5..014e0517 100644
--- a/src/gates/PostSelectionGates.js
+++ b/src/gates/PostSelectionGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/PoweringGates.js b/src/gates/PoweringGates.js
index 6d021ec1..ec3f36b2 100644
--- a/src/gates/PoweringGates.js
+++ b/src/gates/PoweringGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ProbabilityDisplay.js b/src/gates/ProbabilityDisplay.js
index 55602aa0..35b7875a 100644
--- a/src/gates/ProbabilityDisplay.js
+++ b/src/gates/ProbabilityDisplay.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/QuarterTurnGates.js b/src/gates/QuarterTurnGates.js
index 321ced61..cf5b9119 100644
--- a/src/gates/QuarterTurnGates.js
+++ b/src/gates/QuarterTurnGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/ReverseBitsGate.js b/src/gates/ReverseBitsGate.js
index 23883390..fee1eafa 100644
--- a/src/gates/ReverseBitsGate.js
+++ b/src/gates/ReverseBitsGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/SampleDisplay.js b/src/gates/SampleDisplay.js
index b324948f..da2a86a5 100644
--- a/src/gates/SampleDisplay.js
+++ b/src/gates/SampleDisplay.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/SpacerGate.js b/src/gates/SpacerGate.js
index bbbfc186..a6f3c0a7 100644
--- a/src/gates/SpacerGate.js
+++ b/src/gates/SpacerGate.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/SwapGateHalf.js b/src/gates/SwapGateHalf.js
index 187a4fbd..216b794b 100644
--- a/src/gates/SwapGateHalf.js
+++ b/src/gates/SwapGateHalf.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/VariousXGates.js b/src/gates/VariousXGates.js
index e8c04a4e..de8cb738 100644
--- a/src/gates/VariousXGates.js
+++ b/src/gates/VariousXGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/VariousYGates.js b/src/gates/VariousYGates.js
index 9d77f135..d2986aea 100644
--- a/src/gates/VariousYGates.js
+++ b/src/gates/VariousYGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/VariousZGates.js b/src/gates/VariousZGates.js
index 4f98f9d4..6ff37702 100644
--- a/src/gates/VariousZGates.js
+++ b/src/gates/VariousZGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/gates/XorGates.js b/src/gates/XorGates.js
index a26c4a30..e1909abd 100644
--- a/src/gates/XorGates.js
+++ b/src/gates/XorGates.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/issues.js b/src/issues.js
index 421cf015..70e77c9d 100644
--- a/src/issues.js
+++ b/src/issues.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {notifyAboutKnownIssue} from "src/fallback.js"
let canvasCreatedForTesting = document.createElement('canvas');
diff --git a/src/main.js b/src/main.js
index 1b8bac24..bdb556d3 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
// It's important that the polyfills and error fallback get loaded first!
import {} from "src/browser/Polyfills.js"
import {hookErrorHandler} from "src/fallback.js"
diff --git a/src/math/Axis.js b/src/math/Axis.js
index 65275be4..41b21144 100644
--- a/src/math/Axis.js
+++ b/src/math/Axis.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/math/Complex.js b/src/math/Complex.js
index d6d0bf0c..3015b404 100644
--- a/src/math/Complex.js
+++ b/src/math/Complex.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/math/FormulaParser.js b/src/math/FormulaParser.js
index e03d72d6..3c6f7e8b 100644
--- a/src/math/FormulaParser.js
+++ b/src/math/FormulaParser.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/math/Matrix.js b/src/math/Matrix.js
index c8a68174..9eefeac6 100644
--- a/src/math/Matrix.js
+++ b/src/math/Matrix.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/math/Point.js b/src/math/Point.js
index 965257fe..f3c6ff67 100644
--- a/src/math/Point.js
+++ b/src/math/Point.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* A two dimensional point with real coordinates.
*/
diff --git a/src/math/Rect.js b/src/math/Rect.js
index f251a205..30e25a40 100644
--- a/src/math/Rect.js
+++ b/src/math/Rect.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Point} from "src/math/Point.js"
/**
diff --git a/src/ui/DisplayedCircuit.js b/src/ui/DisplayedCircuit.js
index f4f86741..970b952a 100644
--- a/src/ui/DisplayedCircuit.js
+++ b/src/ui/DisplayedCircuit.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/DisplayedInspector.js b/src/ui/DisplayedInspector.js
index 8c428447..296166d8 100644
--- a/src/ui/DisplayedInspector.js
+++ b/src/ui/DisplayedInspector.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/DisplayedToolbox.js b/src/ui/DisplayedToolbox.js
index a53d108f..dce22dd7 100644
--- a/src/ui/DisplayedToolbox.js
+++ b/src/ui/DisplayedToolbox.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/Hand.js b/src/ui/Hand.js
index 545f64b9..ecb38579 100644
--- a/src/ui/Hand.js
+++ b/src/ui/Hand.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/clear.js b/src/ui/clear.js
index ac55b42d..10475a77 100644
--- a/src/ui/clear.js
+++ b/src/ui/clear.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* @param {!Revision} revision
* @param {!Observable.} obsIsAnyOverlayShowing
@@ -5,11 +19,29 @@
function initClear(revision, obsIsAnyOverlayShowing) {
const EMPTY_STATE = '{"cols":[]}';
- const clearButton = /** @type {!HTMLButtonElement} */ document.getElementById('clear-button');
+ const clearAllButton = /** @type {!HTMLButtonElement} */ document.getElementById('clear-all-button');
revision.latestActiveCommit().zipLatest(obsIsAnyOverlayShowing, (r, v) => ({r, v})).subscribe(({r, v}) => {
- clearButton.disabled = r === EMPTY_STATE || v;
+ clearAllButton.disabled = r === EMPTY_STATE || v;
});
- clearButton.addEventListener('click', () => revision.commit(EMPTY_STATE));
+ clearAllButton.addEventListener('click', () => revision.commit(EMPTY_STATE));
+
+ const clearCircuitButton = /** @type {!HTMLButtonElement} */ document.getElementById('clear-circuit-button');
+ revision.latestActiveCommit().zipLatest(obsIsAnyOverlayShowing, (r, v) => ({r, v})).subscribe(({r, v}) => {
+ clearCircuitButton.disabled = r === _getEmptyCircuitState(revision) || v;
+ });
+ clearCircuitButton.addEventListener('click', () => revision.commit(_getEmptyCircuitState(revision)));
+}
+
+/**
+ * Returns current state without circuit. Keeps all custom gates.
+ * @param {!Revision} revision
+ * @returns {!string}
+ */
+function _getEmptyCircuitState(revision) {
+ let val = JSON.parse(revision.peekActiveCommit());
+ val["cols"] = [];
+
+ return JSON.stringify(val);
}
export {initClear}
diff --git a/src/ui/exports.js b/src/ui/exports.js
index 137e8aae..b0fbd63d 100644
--- a/src/ui/exports.js
+++ b/src/ui/exports.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {selectAndCopyToClipboard} from "src/browser/Clipboard.js"
diff --git a/src/ui/forge.js b/src/ui/forge.js
index 4195a031..5c4e001d 100644
--- a/src/ui/forge.js
+++ b/src/ui/forge.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/menu.js b/src/ui/menu.js
index 99d0741c..a6654855 100644
--- a/src/ui/menu.js
+++ b/src/ui/menu.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {ObservableValue} from "src/base/Obs.js"
const menuIsVisible = new ObservableValue(true);
diff --git a/src/ui/sim.js b/src/ui/sim.js
index f5c19313..62144df3 100644
--- a/src/ui/sim.js
+++ b/src/ui/sim.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/title.js b/src/ui/title.js
index e632e5ae..53d763b8 100644
--- a/src/ui/title.js
+++ b/src/ui/title.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/ui/undo.js b/src/ui/undo.js
index 57e423e4..5a71f6a8 100644
--- a/src/ui/undo.js
+++ b/src/ui/undo.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* @param {!Revision} revision
* @param {!Observable.} obsIsAnyOverlayShowing
diff --git a/src/ui/url.js b/src/ui/url.js
index 7d3e2f9c..989b0187 100644
--- a/src/ui/url.js
+++ b/src/ui/url.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/ShaderCoders.js b/src/webgl/ShaderCoders.js
index d1f6989e..e2fb7a05 100644
--- a/src/webgl/ShaderCoders.js
+++ b/src/webgl/ShaderCoders.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/ShaderCoders_Base.js b/src/webgl/ShaderCoders_Base.js
index d41ad979..816a735d 100644
--- a/src/webgl/ShaderCoders_Base.js
+++ b/src/webgl/ShaderCoders_Base.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {WglArg} from "src/webgl/WglArg.js"
/**
diff --git a/src/webgl/ShaderCoders_intoBytes.js b/src/webgl/ShaderCoders_intoBytes.js
index f5dbc9c0..9468a519 100644
--- a/src/webgl/ShaderCoders_intoBytes.js
+++ b/src/webgl/ShaderCoders_intoBytes.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/ShaderCoders_intoFloats.js b/src/webgl/ShaderCoders_intoFloats.js
index 4d2528d5..310a8a56 100644
--- a/src/webgl/ShaderCoders_intoFloats.js
+++ b/src/webgl/ShaderCoders_intoFloats.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/Shaders.js b/src/webgl/Shaders.js
index 9470016b..a8c0b6ae 100644
--- a/src/webgl/Shaders.js
+++ b/src/webgl/Shaders.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/WglArg.js b/src/webgl/WglArg.js
index 57dbc417..483cc61a 100644
--- a/src/webgl/WglArg.js
+++ b/src/webgl/WglArg.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* Describes a uniform argument, for passing into shaders when rendering.
*/
diff --git a/src/webgl/WglConfiguredShader.js b/src/webgl/WglConfiguredShader.js
index 52a95a1b..cc1c1a4d 100644
--- a/src/webgl/WglConfiguredShader.js
+++ b/src/webgl/WglConfiguredShader.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/WglContext.js b/src/webgl/WglContext.js
index 93b5d8ff..74ce65ca 100644
--- a/src/webgl/WglContext.js
+++ b/src/webgl/WglContext.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {canvasCreatedForTesting, webglContextCreatedForTesting} from "src/issues.js"
/**
diff --git a/src/webgl/WglMortalValueSlot.js b/src/webgl/WglMortalValueSlot.js
index fdf20e33..b120e286 100644
--- a/src/webgl/WglMortalValueSlot.js
+++ b/src/webgl/WglMortalValueSlot.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
/**
* A place for a value associated with a webgl context, that needs to be re-initialized when the context is lost.
* @template T
diff --git a/src/webgl/WglShader.js b/src/webgl/WglShader.js
index 1c41f60d..2ec57a19 100644
--- a/src/webgl/WglShader.js
+++ b/src/webgl/WglShader.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/WglTexture.js b/src/webgl/WglTexture.js
index d6e559ad..81bb7c43 100644
--- a/src/webgl/WglTexture.js
+++ b/src/webgl/WglTexture.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/WglTexturePool.js b/src/webgl/WglTexturePool.js
index 71ade399..94f35eb3 100644
--- a/src/webgl/WglTexturePool.js
+++ b/src/webgl/WglTexturePool.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/WglTextureTrader.js b/src/webgl/WglTextureTrader.js
index 5e21075e..58570cd3 100644
--- a/src/webgl/WglTextureTrader.js
+++ b/src/webgl/WglTextureTrader.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/src/webgl/WglUtil.js b/src/webgl/WglUtil.js
index b90db4bf..70c71e89 100644
--- a/src/webgl/WglUtil.js
+++ b/src/webgl/WglUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Config} from "src/Config.js"
/**
diff --git a/test/CircuitOperationTestUtil.js b/test/CircuitOperationTestUtil.js
index dbb5e117..ff0c8771 100644
--- a/test/CircuitOperationTestUtil.js
+++ b/test/CircuitOperationTestUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/KarmaTestRunner.test.js b/test/KarmaTestRunner.test.js
index 0a9fbd47..5be71271 100644
--- a/test/KarmaTestRunner.test.js
+++ b/test/KarmaTestRunner.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite} from "test/TestUtil.js";
let tryPromiseRun = method => {
diff --git a/test/TestUtil.js b/test/TestUtil.js
index c76ef338..2e24b362 100644
--- a/test/TestUtil.js
+++ b/test/TestUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// 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"
diff --git a/test/base/Describe.test.js b/test/base/Describe.test.js
index 5bbc7fc3..8a56f367 100644
--- a/test/base/Describe.test.js
+++ b/test/base/Describe.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/DetailedError.test.js b/test/base/DetailedError.test.js
index 1461c5b7..d2360c09 100644
--- a/test/base/DetailedError.test.js
+++ b/test/base/DetailedError.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/Equate.test.js b/test/base/Equate.test.js
index 9f32c5d7..ad78604f 100644
--- a/test/base/Equate.test.js
+++ b/test/base/Equate.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/Format.test.js b/test/base/Format.test.js
index 13489152..d3d8be03 100644
--- a/test/base/Format.test.js
+++ b/test/base/Format.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/Obs.test.js b/test/base/Obs.test.js
index 1271cd8e..f9c62e18 100644
--- a/test/base/Obs.test.js
+++ b/test/base/Obs.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/RestartableRng.test.js b/test/base/RestartableRng.test.js
index 2668a05f..07ace947 100644
--- a/test/base/RestartableRng.test.js
+++ b/test/base/RestartableRng.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
@@ -34,4 +48,3 @@ suite.test("reverse-repeat", () => {
let v1 = rng2.random();
assertThat(rng1.random()).isEqualTo(v1);
});
-
diff --git a/test/base/Revision.test.js b/test/base/Revision.test.js
index 4d40c0d1..6d880414 100644
--- a/test/base/Revision.test.js
+++ b/test/base/Revision.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/Seq.test.js b/test/base/Seq.test.js
index aa332391..7cbb63ae 100644
--- a/test/base/Seq.test.js
+++ b/test/base/Seq.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/base/Util.test.js b/test/base/Util.test.js
index 12fb050c..3ba641c5 100644
--- a/test/base/Util.test.js
+++ b/test/base/Util.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/CircuitComputeUtil.test.js b/test/circuit/CircuitComputeUtil.test.js
index 0ef4695c..80141a63 100644
--- a/test/circuit/CircuitComputeUtil.test.js
+++ b/test/circuit/CircuitComputeUtil.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/CircuitDefinition.test.js b/test/circuit/CircuitDefinition.test.js
index b5614f2f..a092fcd0 100644
--- a/test/circuit/CircuitDefinition.test.js
+++ b/test/circuit/CircuitDefinition.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/CircuitShaders.test.js b/test/circuit/CircuitShaders.test.js
index cac67e61..a73bcf7c 100644
--- a/test/circuit/CircuitShaders.test.js
+++ b/test/circuit/CircuitShaders.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/CircuitStats.test.js b/test/circuit/CircuitStats.test.js
index 2a1b0e9a..573849d4 100644
--- a/test/circuit/CircuitStats.test.js
+++ b/test/circuit/CircuitStats.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/Controls.test.js b/test/circuit/Controls.test.js
index d211ff85..b020df89 100644
--- a/test/circuit/Controls.test.js
+++ b/test/circuit/Controls.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/Gate.test.js b/test/circuit/Gate.test.js
index ae705319..2790dec8 100644
--- a/test/circuit/Gate.test.js
+++ b/test/circuit/Gate.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/GateColumn.test.js b/test/circuit/GateColumn.test.js
index 44b2d701..4f9661d0 100644
--- a/test/circuit/GateColumn.test.js
+++ b/test/circuit/GateColumn.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/GateShaders.test.js b/test/circuit/GateShaders.test.js
index a9912e39..e83008ba 100644
--- a/test/circuit/GateShaders.test.js
+++ b/test/circuit/GateShaders.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/KetShaderUtil.test.js b/test/circuit/KetShaderUtil.test.js
index fb8b8534..25dda0ba 100644
--- a/test/circuit/KetShaderUtil.test.js
+++ b/test/circuit/KetShaderUtil.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/circuit/Serializer.test.js b/test/circuit/Serializer.test.js
index 5e7e29f4..85fe2d75 100644
--- a/test/circuit/Serializer.test.js
+++ b/test/circuit/Serializer.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/AllGates.test.js b/test/gates/AllGates.test.js
index 2304ab5d..2ffa8946 100644
--- a/test/gates/AllGates.test.js
+++ b/test/gates/AllGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/AmplitudeDisplay.test.js b/test/gates/AmplitudeDisplay.test.js
index 112198ce..ca597e83 100644
--- a/test/gates/AmplitudeDisplay.test.js
+++ b/test/gates/AmplitudeDisplay.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite, assertThat} from "test/TestUtil.js"
import {
amplitudesToPolarKets,
diff --git a/test/gates/ArithmeticGates.test.js b/test/gates/ArithmeticGates.test.js
index d1d1758b..06962420 100644
--- a/test/gates/ArithmeticGates.test.js
+++ b/test/gates/ArithmeticGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/BitCountGates.test.js b/test/gates/BitCountGates.test.js
index c607667c..bb3bf184 100644
--- a/test/gates/BitCountGates.test.js
+++ b/test/gates/BitCountGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/ComparisonGates.test.js b/test/gates/ComparisonGates.test.js
index e4727a4d..2ed915f5 100644
--- a/test/gates/ComparisonGates.test.js
+++ b/test/gates/ComparisonGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
@@ -152,4 +166,3 @@ suite.testUsingWebGL('A_not_equal_to_B', () => {
return t | (i & ~1)
}));
});
-
diff --git a/test/gates/Controls.test.js b/test/gates/Controls.test.js
index 9329da52..e160d032 100644
--- a/test/gates/Controls.test.js
+++ b/test/gates/Controls.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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";
diff --git a/test/gates/CycleBitsGates.test.js b/test/gates/CycleBitsGates.test.js
index 6f615f30..8010446a 100644
--- a/test/gates/CycleBitsGates.test.js
+++ b/test/gates/CycleBitsGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/DensityMatrixDisplay.test.js b/test/gates/DensityMatrixDisplay.test.js
index 61ef0baf..0c70d20f 100644
--- a/test/gates/DensityMatrixDisplay.test.js
+++ b/test/gates/DensityMatrixDisplay.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/ExponentiatingGates.test.js b/test/gates/ExponentiatingGates.test.js
index 0cb5e4b1..071b4838 100644
--- a/test/gates/ExponentiatingGates.test.js
+++ b/test/gates/ExponentiatingGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/FourierTransformGates.test.js b/test/gates/FourierTransformGates.test.js
index 36fe7929..44f2b015 100644
--- a/test/gates/FourierTransformGates.test.js
+++ b/test/gates/FourierTransformGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/Impossible_UniversalNotGate.test.js b/test/gates/Impossible_UniversalNotGate.test.js
index 0d8ebb3c..d6df27b5 100644
--- a/test/gates/Impossible_UniversalNotGate.test.js
+++ b/test/gates/Impossible_UniversalNotGate.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/InputGates.test.js b/test/gates/InputGates.test.js
index 1d29a9b5..bf446a1a 100644
--- a/test/gates/InputGates.test.js
+++ b/test/gates/InputGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/InterleaveBitsGates.test.js b/test/gates/InterleaveBitsGates.test.js
index fdc3ebe0..a58eeae8 100644
--- a/test/gates/InterleaveBitsGates.test.js
+++ b/test/gates/InterleaveBitsGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite, assertThat} from "test/TestUtil.js"
import {
diff --git a/test/gates/ModularAdditionGates.test.js b/test/gates/ModularAdditionGates.test.js
index 7b8243aa..817a07c3 100644
--- a/test/gates/ModularAdditionGates.test.js
+++ b/test/gates/ModularAdditionGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/ModularIncrementGates.test.js b/test/gates/ModularIncrementGates.test.js
index c95fc002..2c16b938 100644
--- a/test/gates/ModularIncrementGates.test.js
+++ b/test/gates/ModularIncrementGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/ModularMultiplicationGates.test.js b/test/gates/ModularMultiplicationGates.test.js
index 297887f8..03544fd8 100644
--- a/test/gates/ModularMultiplicationGates.test.js
+++ b/test/gates/ModularMultiplicationGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {assertThat, Suite} from "test/TestUtil.js"
import {
MODULAR_INVERSE_SHADER_CODE,
diff --git a/test/gates/ModularMultiplyAccumulateGates.test.js b/test/gates/ModularMultiplyAccumulateGates.test.js
index 16cc07ac..e9127430 100644
--- a/test/gates/ModularMultiplyAccumulateGates.test.js
+++ b/test/gates/ModularMultiplyAccumulateGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/MultiplicationGates.test.js b/test/gates/MultiplicationGates.test.js
index b61b85a4..64047425 100644
--- a/test/gates/MultiplicationGates.test.js
+++ b/test/gates/MultiplicationGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/MultiplyAccumulateGates.test.js b/test/gates/MultiplyAccumulateGates.test.js
index 3f6ca1a6..0250e481 100644
--- a/test/gates/MultiplyAccumulateGates.test.js
+++ b/test/gates/MultiplyAccumulateGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/ParametrizedRotationGates.test.js b/test/gates/ParametrizedRotationGates.test.js
index 66635554..44028123 100644
--- a/test/gates/ParametrizedRotationGates.test.js
+++ b/test/gates/ParametrizedRotationGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/PhaseGradientGates.test.js b/test/gates/PhaseGradientGates.test.js
index cb263ad5..bd03d60f 100644
--- a/test/gates/PhaseGradientGates.test.js
+++ b/test/gates/PhaseGradientGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite} from "test/TestUtil.js"
import {
assertThatCircuitShaderActsLikeMatrix,
diff --git a/test/gates/PivotFlipGates.test.js b/test/gates/PivotFlipGates.test.js
index 7caaa251..defdfa60 100644
--- a/test/gates/PivotFlipGates.test.js
+++ b/test/gates/PivotFlipGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/ProbabilityDisplay.test.js b/test/gates/ProbabilityDisplay.test.js
index 9059ab9e..a4d0cc20 100644
--- a/test/gates/ProbabilityDisplay.test.js
+++ b/test/gates/ProbabilityDisplay.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/gates/XorGates.test.js b/test/gates/XorGates.test.js
index 81117645..b9543e9d 100644
--- a/test/gates/XorGates.test.js
+++ b/test/gates/XorGates.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/math/Axis.test.js b/test/math/Axis.test.js
index 344852ab..7e5db0dc 100644
--- a/test/math/Axis.test.js
+++ b/test/math/Axis.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/math/Complex.test.js b/test/math/Complex.test.js
index a2d88ddd..34964f70 100644
--- a/test/math/Complex.test.js
+++ b/test/math/Complex.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/math/Matrix.test.js b/test/math/Matrix.test.js
index a64d467d..6f592428 100644
--- a/test/math/Matrix.test.js
+++ b/test/math/Matrix.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/math/Point.test.js b/test/math/Point.test.js
index 8a6a626a..814f3765 100644
--- a/test/math/Point.test.js
+++ b/test/math/Point.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/math/Rect.test.js b/test/math/Rect.test.js
index 2d9b49ab..87c7ccd8 100644
--- a/test/math/Rect.test.js
+++ b/test/math/Rect.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/ui/DisplayedCircuit.test.js b/test/ui/DisplayedCircuit.test.js
index 19ccc702..e91c46f0 100644
--- a/test/ui/DisplayedCircuit.test.js
+++ b/test/ui/DisplayedCircuit.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/ui/MathPainter.test.js b/test/ui/MathPainter.test.js
index b9f573c7..d201acf7 100644
--- a/test/ui/MathPainter.test.js
+++ b/test/ui/MathPainter.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/ui/Painter.test.js b/test/ui/Painter.test.js
index d1164b49..6d64066b 100644
--- a/test/ui/Painter.test.js
+++ b/test/ui/Painter.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/ui/WidgetPainter.test.js b/test/ui/WidgetPainter.test.js
index 0b16ab5e..1de07b47 100644
--- a/test/ui/WidgetPainter.test.js
+++ b/test/ui/WidgetPainter.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/ui/forge.test.js b/test/ui/forge.test.js
index 82d0f9b6..571d3a42 100644
--- a/test/ui/forge.test.js
+++ b/test/ui/forge.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/webgl/ShaderCoders.test.js b/test/webgl/ShaderCoders.test.js
index 5a6b306a..60dec3a1 100644
--- a/test/webgl/ShaderCoders.test.js
+++ b/test/webgl/ShaderCoders.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/webgl/ShaderCoders_Base.test.js b/test/webgl/ShaderCoders_Base.test.js
index aac667ea..b6ad48fc 100644
--- a/test/webgl/ShaderCoders_Base.test.js
+++ b/test/webgl/ShaderCoders_Base.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite, assertThat} from "test/TestUtil.js"
import {BOOL_TYPE_CODER} from "src/webgl/ShaderCoders_Base.js"
diff --git a/test/webgl/ShaderCoders_intoBytes.test.js b/test/webgl/ShaderCoders_intoBytes.test.js
index 2eef9ef0..3c68abe5 100644
--- a/test/webgl/ShaderCoders_intoBytes.test.js
+++ b/test/webgl/ShaderCoders_intoBytes.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite, assertThat, assertThrows} from "test/TestUtil.js"
import {
bytesAsFloats,
diff --git a/test/webgl/ShaderCoders_intoFloats.test.js b/test/webgl/ShaderCoders_intoFloats.test.js
index 103e1790..8540cabe 100644
--- a/test/webgl/ShaderCoders_intoFloats.test.js
+++ b/test/webgl/ShaderCoders_intoFloats.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/webgl/Shaders.test.js b/test/webgl/Shaders.test.js
index 9d6b9b2b..f2df3d28 100644
--- a/test/webgl/Shaders.test.js
+++ b/test/webgl/Shaders.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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 {
diff --git a/test/webgl/WglArg.test.js b/test/webgl/WglArg.test.js
index 04068fb2..c5a07e80 100644
--- a/test/webgl/WglArg.test.js
+++ b/test/webgl/WglArg.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/webgl/WglShader.test.js b/test/webgl/WglShader.test.js
index 0a1bb1b3..f2344912 100644
--- a/test/webgl/WglShader.test.js
+++ b/test/webgl/WglShader.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/webgl/WglTexture.test.js b/test/webgl/WglTexture.test.js
index cc5a6529..532ee603 100644
--- a/test/webgl/WglTexture.test.js
+++ b/test/webgl/WglTexture.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test/webgl/WglTexturePool.test.js b/test/webgl/WglTexturePool.test.js
index d5abbc2a..f6840c11 100644
--- a/test/webgl/WglTexturePool.test.js
+++ b/test/webgl/WglTexturePool.test.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {Suite, assertThat} from "test/TestUtil.js"
import {
currentShaderCoder,
diff --git a/test_perf/CircuitStats.perf.js b/test_perf/CircuitStats.perf.js
index d523be97..b6277c53 100644
--- a/test_perf/CircuitStats.perf.js
+++ b/test_perf/CircuitStats.perf.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test_perf/DisplayedInspector.perf.js b/test_perf/DisplayedInspector.perf.js
index 68a66606..1adbf32b 100644
--- a/test_perf/DisplayedInspector.perf.js
+++ b/test_perf/DisplayedInspector.perf.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// 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"
diff --git a/test_perf/KarmaTestRunner.perf.js b/test_perf/KarmaTestRunner.perf.js
index 38a4dc1b..f8642b2a 100644
--- a/test_perf/KarmaTestRunner.perf.js
+++ b/test_perf/KarmaTestRunner.perf.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {getKnownPerfTests} from "test_perf/TestPerfUtil.js";
let execIntoPromise = method => {
diff --git a/test_perf/TestPerfUtil.js b/test_perf/TestPerfUtil.js
index 1cef4580..a1bc5345 100644
--- a/test_perf/TestPerfUtil.js
+++ b/test_perf/TestPerfUtil.js
@@ -1,3 +1,17 @@
+// Copyright 2017 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
import {} from "src/browser/Polyfills.js"
function nanos(nanoseconds) {