Repository: google/qhbm-library (language: python)

Issue:
Update imports
Right now, in a colab, after importing `qhbmlib`, I cannot call `qhbmlib.hamiltonian`.  Need to update the `__init__.py` file so importing `qhbmlib` makes `qhbmlib.hamiltonian` available.


Discussion / hints:

Fix patch:
diff --git a/.gitignore b/.gitignore
index 20f3b61c..d5d5757e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/__init__.py b/qhbmlib/__init__.py
index 3dc1f76b..ab25f23d 100644
--- a/qhbmlib/__init__.py
+++ b/qhbmlib/__init__.py
@@ -1,1 +1,26 @@
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
+#
+# 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
+#
+#     https://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 QHBM library modules.*"""
+
+from qhbmlib import architectures
+from qhbmlib import ebm
+from qhbmlib import hamiltonian
+from qhbmlib import qhbm_base
+from qhbmlib import qmhl
+from qhbmlib import qnn
+from qhbmlib import util
+from qhbmlib import vqt
+
 __version__ = "0.1.0"
diff --git a/qhbmlib/architectures.py b/qhbmlib/architectures.py
index 7d876120..b2f5826d 100644
--- a/qhbmlib/architectures.py
+++ b/qhbmlib/architectures.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/ebm.py b/qhbmlib/ebm.py
index 99e07d83..396bc768 100644
--- a/qhbmlib/ebm.py
+++ b/qhbmlib/ebm.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/hamiltonian.py b/qhbmlib/hamiltonian.py
index 39f5ecbe..051b632f 100644
--- a/qhbmlib/hamiltonian.py
+++ b/qhbmlib/hamiltonian.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/qhbm_base.py b/qhbmlib/qhbm_base.py
index c42625af..841a3ef5 100644
--- a/qhbmlib/qhbm_base.py
+++ b/qhbmlib/qhbm_base.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/qmhl.py b/qhbmlib/qmhl.py
index e92825d0..3ffc1843 100644
--- a/qhbmlib/qmhl.py
+++ b/qhbmlib/qmhl.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/qnn.py b/qhbmlib/qnn.py
index ff56a606..09cd251d 100644
--- a/qhbmlib/qnn.py
+++ b/qhbmlib/qnn.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/util.py b/qhbmlib/util.py
index 17082e34..cf4f2fe6 100644
--- a/qhbmlib/util.py
+++ b/qhbmlib/util.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/qhbmlib/vqt.py b/qhbmlib/vqt.py
index cbbf2a2a..e02b2926 100644
--- a/qhbmlib/vqt.py
+++ b/qhbmlib/vqt.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/scripts/check_format.sh b/scripts/check_format.sh
index e3ca0417..5837c3fc 100755
--- a/scripts/check_format.sh
+++ b/scripts/check_format.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/scripts/check_lint.sh b/scripts/check_lint.sh
index 3e468e09..d701858a 100755
--- a/scripts/check_lint.sh
+++ b/scripts/check_lint.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/scripts/prepare_pr.sh b/scripts/prepare_pr.sh
index 9dd22132..419b8cc5 100755
--- a/scripts/prepare_pr.sh
+++ b/scripts/prepare_pr.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
index e69de29b..5ca4a0ef 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
+#
+# 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
+#
+#     https://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.
+# ==============================================================================
\ No newline at end of file
diff --git a/tests/architectures_test.py b/tests/architectures_test.py
index 51529a94..4b985526 100644
--- a/tests/architectures_test.py
+++ b/tests/architectures_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/ebm_test.py b/tests/ebm_test.py
index b5672f12..b06fba76 100644
--- a/tests/ebm_test.py
+++ b/tests/ebm_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/hamiltonian_test.py b/tests/hamiltonian_test.py
index e261de29..78d35b7c 100644
--- a/tests/hamiltonian_test.py
+++ b/tests/hamiltonian_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/qhbm_base_test.py b/tests/qhbm_base_test.py
index 3b22f24d..d7a7f6dc 100644
--- a/tests/qhbm_base_test.py
+++ b/tests/qhbm_base_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/qmhl_test.py b/tests/qmhl_test.py
index 41d2fb83..7b2c5089 100644
--- a/tests/qmhl_test.py
+++ b/tests/qmhl_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/qnn_test.py b/tests/qnn_test.py
index e3c1d960..20509651 100644
--- a/tests/qnn_test.py
+++ b/tests/qnn_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/test_util.py b/tests/test_util.py
index 01d0aeb7..0a50b094 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/util_test.py b/tests/util_test.py
index bca87988..2086aee2 100644
--- a/tests/util_test.py
+++ b/tests/util_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # 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/tests/vqt_test.py b/tests/vqt_test.py
index ffce757f..d3184a6e 100644
--- a/tests/vqt_test.py
+++ b/tests/vqt_test.py
@@ -1,4 +1,4 @@
-# Copyright 2021 The QHBM Library Authors.
+# Copyright 2021 The QHBM Library Authors. All Rights Reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.