From 3afada35f1a70a73f29ec4de7821f53fe5ff78ee Mon Sep 17 00:00:00 2001 From: Jake Lishman Date: Thu, 14 Mar 2024 16:47:50 +0000 Subject: [PATCH] Add licence headers (#29) This matches other Qiskit projects. They originally weren't in these files because the project wasn't originally going to be managed by the Qiskit organisation, but was just a proof of concept. --- src/qiskit_qasm3_import/__init__.py | 11 +++++++++++ src/qiskit_qasm3_import/api.py | 11 +++++++++++ src/qiskit_qasm3_import/converter.py | 11 +++++++++++ src/qiskit_qasm3_import/data.py | 11 +++++++++++ src/qiskit_qasm3_import/exceptions.py | 11 +++++++++++ src/qiskit_qasm3_import/expression.py | 11 +++++++++++ src/qiskit_qasm3_import/state.py | 11 +++++++++++ src/qiskit_qasm3_import/types.py | 11 +++++++++++ tests/__init__.py | 10 ++++++++++ tests/test_conditions.py | 11 +++++++++++ tests/test_convert.py | 11 +++++++++++ tests/test_values.py | 11 +++++++++++ 12 files changed, 131 insertions(+) diff --git a/src/qiskit_qasm3_import/__init__.py b/src/qiskit_qasm3_import/__init__.py index d21d9e0..a76e165 100644 --- a/src/qiskit_qasm3_import/__init__.py +++ b/src/qiskit_qasm3_import/__init__.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + """Basic importer for OpenQASM 3 programmes into Qiskit.""" __version__ = "0.4.1" diff --git a/src/qiskit_qasm3_import/api.py b/src/qiskit_qasm3_import/api.py index 7839213..f656a0d 100644 --- a/src/qiskit_qasm3_import/api.py +++ b/src/qiskit_qasm3_import/api.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import openqasm3 from qiskit import QuantumCircuit diff --git a/src/qiskit_qasm3_import/converter.py b/src/qiskit_qasm3_import/converter.py index e9e6424..87c49d8 100644 --- a/src/qiskit_qasm3_import/converter.py +++ b/src/qiskit_qasm3_import/converter.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + __all__ = ["ConvertVisitor"] import re diff --git a/src/qiskit_qasm3_import/data.py b/src/qiskit_qasm3_import/data.py index 9c1ed7d..fd8af3a 100644 --- a/src/qiskit_qasm3_import/data.py +++ b/src/qiskit_qasm3_import/data.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import enum from typing import Any, Optional from openqasm3 import ast diff --git a/src/qiskit_qasm3_import/exceptions.py b/src/qiskit_qasm3_import/exceptions.py index 46525eb..2a7e8ae 100644 --- a/src/qiskit_qasm3_import/exceptions.py +++ b/src/qiskit_qasm3_import/exceptions.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + from typing import NoReturn, Optional from openqasm3 import ast diff --git a/src/qiskit_qasm3_import/expression.py b/src/qiskit_qasm3_import/expression.py index 4aaf086..816127e 100644 --- a/src/qiskit_qasm3_import/expression.py +++ b/src/qiskit_qasm3_import/expression.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + """QASM visitors for the expression tree, resolving it into objects that are useful for interaction with Qiskit. diff --git a/src/qiskit_qasm3_import/state.py b/src/qiskit_qasm3_import/state.py index 0d1922d..312b8da 100644 --- a/src/qiskit_qasm3_import/state.py +++ b/src/qiskit_qasm3_import/state.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import re import enum from typing import Optional, Union diff --git a/src/qiskit_qasm3_import/types.py b/src/qiskit_qasm3_import/types.py index c72c5d0..6da0d2e 100644 --- a/src/qiskit_qasm3_import/types.py +++ b/src/qiskit_qasm3_import/types.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE.txt file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import abc import typing diff --git a/tests/__init__.py b/tests/__init__.py index e69de29..94c9f5c 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,10 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. diff --git a/tests/test_conditions.py b/tests/test_conditions.py index 9c4dc8d..d710193 100644 --- a/tests/test_conditions.py +++ b/tests/test_conditions.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import pytest from openqasm3 import ast diff --git a/tests/test_convert.py b/tests/test_convert.py index 63cfea4..eb42a11 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import math import numpy as np diff --git a/tests/test_values.py b/tests/test_values.py index 3949539..87584de 100644 --- a/tests/test_values.py +++ b/tests/test_values.py @@ -1,3 +1,14 @@ +# This code is part of Qiskit. +# +# (C) Copyright IBM 2024. +# +# This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license +# in the LICENSE file in the root directory of this source tree or at +# http://www.apache.org/licenses/LICENSE-2.0. +# +# Any modifications or derivative works of this code must retain this copyright notice, and modified +# files need to carry a notice indicating that they have been altered from the originals. + import operator import pytest