Repository: XanaduAI/jet (language: python)

Issue:
Add IR to Jet
Adds the IR to Jet, stored in `python/ir`. This folder contains the following:

* The grammar, parser and program class.
* A utilities file (used by parser/program)
* A usage guide (same as `grammar.md` in the IR repo) describing the syntax of the IR.
* The Strawberry Fields interface, consisting of a single file with a SF-to/from-IR-program converter function.
* A tests folder containing tests for the IR.

**To-do/To-discuss**
- [x] Move tests to a better place (e.g., `python/tests`)
- [ ] Rewrite `usage_guide.md` to fit better with Jet.
- [x] Add `strawberryfields` and `lark` to requirements.


Discussion / hints:
## Test Report (C++) on Ubuntu
    1 files  ±0      1 suites  ±0   0s :stopwatch: ±0s
239 tests ±0  239 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 
519 runs  ±0  519 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit c62d635a. ± Comparison against base commit c62d635a.

:recycle: This comment has been updated with latest results.
## Test Report (C++) on MacOS
    1 files  ±0      1 suites  ±0   0s :stopwatch: ±0s
239 tests ±0  239 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 
519 runs  ±0  519 :heavy_check_mark: ±0  0 :zzz: ±0  0 :x: ±0 

Results for commit c62d635a. ± Comparison against base commit c62d635a.

:recycle: This comment has been updated with latest results.

Fix patch:
diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index 9d51d93b..d8ca3fe1 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -30,6 +30,8 @@
 
 ### Documentation
 
+* The license comment headers at the top of the IR source files have been removed. [(#14)](https://github.com/XanaduAI/jet/pull/14)
+
 ### Contributors
 
 This release contains contributions from (in alphabetical order):
diff --git a/python/xir/__init__.py b/python/xir/__init__.py
index 417c9bac..7a104883 100644
--- a/python/xir/__init__.py
+++ b/python/xir/__init__.py
@@ -1,15 +1,1 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 from .parser import XIRTransformer, xir_parser
diff --git a/python/xir/_version.py b/python/xir/_version.py
index 4d81295d..0b5d834b 100644
--- a/python/xir/_version.py
+++ b/python/xir/_version.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 """The current version number. Uses semantic versioning (https://semver.org)"""
 
 __version__ = "0.1.0"
diff --git a/python/xir/interfaces/__init__.py b/python/xir/interfaces/__init__.py
index bc161c39..a10af5e7 100644
--- a/python/xir/interfaces/__init__.py
+++ b/python/xir/interfaces/__init__.py
@@ -1,15 +1,1 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 from .strawberryfields_io import to_program, to_xir, find_number_of_modes
diff --git a/python/xir/interfaces/strawberryfields_io.py b/python/xir/interfaces/strawberryfields_io.py
index 9d989787..c6734570 100644
--- a/python/xir/interfaces/strawberryfields_io.py
+++ b/python/xir/interfaces/strawberryfields_io.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 from decimal import Decimal
 import strawberryfields as sf
 from strawberryfields import ops
diff --git a/python/xir/ir.lark b/python/xir/ir.lark
index bac3baa2..91ffeb4b 100644
--- a/python/xir/ir.lark
+++ b/python/xir/ir.lark
@@ -1,17 +1,3 @@
-// Copyright 2021 Xanadu Quantum Technologies 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.
-
 // IR grammar
 program: (include | declarations | circuit)*
 include: "use" name ";"
diff --git a/python/xir/parser.py b/python/xir/parser.py
index ebee48c4..e43ed6d7 100644
--- a/python/xir/parser.py
+++ b/python/xir/parser.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 """This module contains the XIRTransformer and xir_parser"""
 from decimal import Decimal
 from pathlib import Path
diff --git a/python/xir/program.py b/python/xir/program.py
index ed686d37..f21f9a1c 100644
--- a/python/xir/program.py
+++ b/python/xir/program.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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 re
 import warnings
 from decimal import Decimal
diff --git a/python/xir/utils.py b/python/xir/utils.py
index cefa7e0a..7bdf549f 100644
--- a/python/xir/utils.py
+++ b/python/xir/utils.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 """This module contains the utility functions used when parsing"""
 
 import re


Test patch:
diff --git a/python/tests/xir/test_integration.py b/python/tests/xir/test_integration.py
index 66d8239a..7b746fb7 100644
--- a/python/tests/xir/test_integration.py
+++ b/python/tests/xir/test_integration.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 """Integration tests for the IR"""
 
 import pytest
diff --git a/python/tests/xir/test_io.py b/python/tests/xir/test_io.py
index 045ec75b..734dca59 100644
--- a/python/tests/xir/test_io.py
+++ b/python/tests/xir/test_io.py
@@ -1,18 +1,4 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
-"""Tests for the interfaces module"""
+"""Unit tests for the interfaces module"""
 
 from decimal import Decimal
 from typing import List, Tuple
diff --git a/python/tests/xir/test_program.py b/python/tests/xir/test_program.py
index 5a76b7bd..1bf66db5 100644
--- a/python/tests/xir/test_program.py
+++ b/python/tests/xir/test_program.py
@@ -1,17 +1,3 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
 """Unit tests for the program class"""
 
 from decimal import Decimal
diff --git a/python/tests/xir/test_utils.py b/python/tests/xir/test_utils.py
index f470b704..6af5ebbf 100644
--- a/python/tests/xir/test_utils.py
+++ b/python/tests/xir/test_utils.py
@@ -1,18 +1,4 @@
-# Copyright 2021 Xanadu Quantum Technologies 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.
-
-"""Unit test for the utils module"""
+"""Unit tests for the utils module"""
 
 import pytest