Skip to content

Commit 140277d

Browse files
Merge pull request #772 from Sinestro38/fix_license
[cosmetic] Fix licenses
2 parents 7131f9e + f922751 commit 140277d

File tree

132 files changed

+208
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+208
-163
lines changed

.github/workflows/ci.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on: [pull_request]
55
jobs:
66
lint:
77
name: Lint check
8-
runs-on: ubuntu-18.04
8+
runs-on: ubuntu-20.04
99
steps:
1010
- uses: actions/checkout@v1
1111
- uses: actions/setup-python@v1
@@ -19,7 +19,7 @@ jobs:
1919

2020
format:
2121
name: Formatting check
22-
runs-on: ubuntu-18.04
22+
runs-on: ubuntu-20.04
2323

2424
steps:
2525
- uses: actions/checkout@v1
@@ -34,7 +34,7 @@ jobs:
3434

3535
wheel-build:
3636
name: Wheel test
37-
runs-on: ubuntu-18.04
37+
runs-on: ubuntu-20.04
3838

3939
steps:
4040
- uses: actions/checkout@v1
@@ -53,7 +53,7 @@ jobs:
5353

5454
bazel-tests:
5555
name: Library tests
56-
runs-on: ubuntu-18.04
56+
runs-on: ubuntu-20.04
5757
needs: [lint, format]
5858

5959
steps:
@@ -71,7 +71,7 @@ jobs:
7171

7272
leak-tests:
7373
name: Memory Leak tests
74-
runs-on: ubuntu-18.04
74+
runs-on: ubuntu-20.04
7575
needs: [lint, format]
7676

7777
steps:
@@ -89,7 +89,7 @@ jobs:
8989

9090
tutorials-test:
9191
name: Tutorial tests
92-
runs-on: ubuntu-18.04
92+
runs-on: ubuntu-20.04
9393
needs: [lint, format, wheel-build]
9494

9595
steps:

.github/workflows/cirq_compatibility.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
name: Cirq Compatibility
23

34
on:
@@ -7,7 +8,7 @@ on:
78
jobs:
89
consistency:
910
name: Nightly Compatibility
10-
runs-on: ubuntu-16.04
11+
runs-on: ubuntu-20.04
1112
steps:
1213
- uses: actions/checkout@v1
1314
- uses: actions/setup-python@v1

benchmarks/scripts/benchmark_clifford_circuit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Benchmark simulators against classically simulatable circuits."""
1616
import os
1717
import time

benchmarks/scripts/benchmark_op_gradients.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Benchmark differentiator methods."""
1616
import os
1717
import time

benchmarks/scripts/benchmark_random_circuit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Benchmark simulators against classically intractable 'supremacy' circuits."""
1616
import os
1717
import time

benchmarks/scripts/benchmark_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Utility functions for benchmark tools."""
1616
import tensorflow as tf
1717
import test_log_pb2

benchmarks/scripts/benchmark_util_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Tests for utilities related to reading/running benchmarks."""
1616
import os
1717
import tempfile

benchmarks/scripts/flags.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Command line flags shared between benchmarks."""
1616
from collections import namedtuple
1717
from absl import flags as absl_flags

benchmarks/scripts/flags_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Tests for benchmark command line flags."""
1616

1717
import tensorflow as tf

benchmarks/scripts/models/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================

benchmarks/scripts/models/random_clifford_circuit.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515

1616
from typing import Iterable
1717

benchmarks/scripts/models/random_clifford_circuit_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515

1616
from absl.testing import parameterized
1717
import cirq

configure.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
PLATFORM="$(uname -s | tr 'A-Z' 'a-z')"
1717

1818
function write_to_bazelrc() {

docs/_book.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
upper_tabs:
1616
# Tabs left of dropdown menu
1717
- include: /_upper_tabs_left.yaml

docs/_index.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
book_path: /quantum/_book.yaml
1616
project_path: /quantum/_project.yaml
1717
description: >

release/build_pip_package.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
set -e
1717
set -x
1818

release/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""TensorFlow Quantum adds qauntum computing primitives to TensorFlow.
1616
1717
TensorFlow Quantum is an open source library for high performance batch

scripts/benchmark_all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Testing benchmarks.";
1717
test_outputs=$(bazel test -c opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" --cxxopt="-msse2" --cxxopt="-msse3" --cxxopt="-msse4" --test_output=errors $(bazel query //benchmarks/...))
1818
exit_code=$?

scripts/build_docs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Tool to generate external api_docs for tfq."""
1616

1717
from __future__ import absolute_import

scripts/build_pip_package_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616

1717
pip install -r requirements.txt
1818

scripts/ci_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
1717
sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
1818
pip install --upgrade pip setuptools wheel

scripts/ci_validate_tutorials.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616

1717
# Run the tutorials using the installed pip package
1818
pip install jupyter nbclient==0.6.5 jupyter-client==6.1.12 ipython==7.22.0

scripts/format_all.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Doing python language formatting..."
1717
python3 -m yapf --style=google --in-place --recursive ./benchmarks
1818
python3 -m yapf --style=google --in-place --recursive ./tensorflow_quantum
1919
echo -e "Done! \nDoing notebook formatting..."
2020
python3 ./scripts/format_ipynb.py
2121
echo -e "Done! \nDoing C++ formatting..."
22-
find tensorflow_quantum/ -iname *.h -o -iname *.cc | xargs clang-format -i -style=google
22+
find tensorflow_quantum/ -iname *.h -o -iname *.cc | xargs clang-format-6.0 -i -style=google
2323
echo "Done!"
2424
exit 0;

scripts/format_check.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Checking python formatting...";
1717

1818
################################################################################
@@ -92,7 +92,7 @@ else
9292
fi
9393

9494
echo "Checking C++ formatting...";
95-
formatting_outputs=$(find tensorflow_quantum/ -iname *.h -o -iname *.cc | xargs clang-format -style=google -output-replacements-xml);
95+
formatting_outputs=$(find tensorflow_quantum/ -iname *.h -o -iname *.cc | xargs clang-format-6.0 -style=google -output-replacements-xml);
9696
CFORMATCHECK=0
9797
while read -r formatting_outputs; do
9898
if [ "$formatting_outputs" != "<?xml version='1.0'?>" ] && [ "$formatting_outputs" != "<replacements xml:space='preserve' incomplete_format='false'>" ] && [ "$formatting_outputs" != "</replacements>" ] && [ "$formatting_outputs" != "<replacement offset='4290' length='9'> </replacement>" ]; then

scripts/format_ipynb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Format notebook code cells using yapf google style."""
1616
import glob
1717
import nbformat

scripts/import_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Tests to check if importing `tfq` APIs is successful or not."""
1616
import tensorflow_quantum as tfq
1717

scripts/lint_all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Checking for lint in python code...";
1717
linting_outputs=$(pylint --rcfile .pylintrc ./tensorflow_quantum ./examples);
1818
exit_code=$?

scripts/msan_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Testing All Bazel cc_tests with msan.";
1717
test_outputs=$(bazel test -c opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" \
1818
--cxxopt="-msse2" --cxxopt="-msse3" --cxxopt="-msse4" \

scripts/run_example.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
cd ..
1717
cp quantum/scripts/import_test.py import_test.py
1818
python import_test.py

scripts/test_all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Testing All Bazel py_test and cc_tests.";
1717
test_outputs=$(bazel test -c opt --experimental_repo_remote_exec --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" --cxxopt="-std=c++17" --cxxopt="-msse2" --cxxopt="-msse3" --cxxopt="-msse4" --notest_keep_going --test_output=errors //tensorflow_quantum/...)
1818
exit_code=$?

scripts/test_benchmarks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# ==============================================================================
15+
# =============================================================================
1616
echo "Testing all Benchmarks.";
1717
bazel test -c opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" --cxxopt="-msse2" --cxxopt="-msse3" --cxxopt="-msse4" --test_output=errors $(bazel query //benchmarks/scripts:all)
1818
# test_outputs=$(bazel test -c opt --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" --cxxopt="-msse2" --cxxopt="-msse3" --cxxopt="-msse4" --test_output=errors $(bazel query //benchmarks/scripts:all))

scripts/test_tutorials.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Module to ensure all notebooks execute without error by pytesting them."""
1616
import glob
1717
import re

tensorflow_quantum/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Module functions for tensorflow_quantum.*"""
1616

1717
# Import basic ops and op getters.

tensorflow_quantum/core/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Imports to tensorflow_quantum.core.* level."""
1616
# Import getters for constructing ops.
1717
from tensorflow_quantum.core.ops import (get_expectation_op,

tensorflow_quantum/core/ops/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""Module for tfq.core.ops.*"""
1616

1717
# Import getters for constructing ops.

tensorflow_quantum/core/ops/batch_util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# ==============================================================================
14+
# =============================================================================
1515
"""A module to for running Cirq objects."""
1616
import collections
1717

0 commit comments

Comments
 (0)