diff --git a/graphiq/__init__.py b/graphiq/__init__.py index 1bb67f99..b2b9e8dd 100644 --- a/graphiq/__init__.py +++ b/graphiq/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. DENSITY_MATRIX_ARRAY_LIBRARY = "numpy" from graphiq.backends.stabilizer.compiler import StabilizerCompiler diff --git a/graphiq/backends/__init__.py b/graphiq/backends/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/backends/__init__.py +++ b/graphiq/backends/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/backends/compiler_base.py b/graphiq/backends/compiler_base.py index 3d077388..48af6f03 100644 --- a/graphiq/backends/compiler_base.py +++ b/graphiq/backends/compiler_base.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Compilers takes a circuit description and implements the mapping, given a specific representation of the underlying quantum state. diff --git a/graphiq/backends/density_matrix/__init__.py b/graphiq/backends/density_matrix/__init__.py index 06e563c4..8446c64b 100644 --- a/graphiq/backends/density_matrix/__init__.py +++ b/graphiq/backends/density_matrix/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq import DENSITY_MATRIX_ARRAY_LIBRARY # todo, reload numpy/jax if needed? possible package conflicts diff --git a/graphiq/backends/density_matrix/compiler.py b/graphiq/backends/density_matrix/compiler.py index 33d62218..fe1e9d65 100644 --- a/graphiq/backends/density_matrix/compiler.py +++ b/graphiq/backends/density_matrix/compiler.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Compilation tools for simulating a circuit with a purely Density Matrix based backend """ diff --git a/graphiq/backends/density_matrix/functions.py b/graphiq/backends/density_matrix/functions.py index 07925b6b..6024160c 100644 --- a/graphiq/backends/density_matrix/functions.py +++ b/graphiq/backends/density_matrix/functions.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Helper functions for the density matrix representation backend diff --git a/graphiq/backends/density_matrix/state.py b/graphiq/backends/density_matrix/state.py index ab73a5ad..d3e79d05 100644 --- a/graphiq/backends/density_matrix/state.py +++ b/graphiq/backends/density_matrix/state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Density matrix representation for states. Supports unitary operations, quantum channels, and state measurements. diff --git a/graphiq/backends/graph/__init__.py b/graphiq/backends/graph/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/backends/graph/__init__.py +++ b/graphiq/backends/graph/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/backends/graph/functions.py b/graphiq/backends/graph/functions.py index b5fba60a..f8eb401f 100644 --- a/graphiq/backends/graph/functions.py +++ b/graphiq/backends/graph/functions.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 file contains helper functions for graph representation """ diff --git a/graphiq/backends/graph/state.py b/graphiq/backends/graph/state.py index cea8bb91..8241dcd3 100644 --- a/graphiq/backends/graph/state.py +++ b/graphiq/backends/graph/state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Graph representation of quantum state """ diff --git a/graphiq/backends/lc_equivalence_check.py b/graphiq/backends/lc_equivalence_check.py index 266e0ab1..02d2d95e 100644 --- a/graphiq/backends/lc_equivalence_check.py +++ b/graphiq/backends/lc_equivalence_check.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. r""" Local-Clifford equivalence check determines whether two graph states are local-Clifford equivalent via :py:func:`is_lc_equivalent` function. diff --git a/graphiq/backends/stabilizer/__init__.py b/graphiq/backends/stabilizer/__init__.py index 661c0d8b..075a2598 100644 --- a/graphiq/backends/stabilizer/__init__.py +++ b/graphiq/backends/stabilizer/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.backends.stabilizer.functions.rep_conversion import ( clifford_from_stabilizer, ) diff --git a/graphiq/backends/stabilizer/clifford_tableau.py b/graphiq/backends/stabilizer/clifford_tableau.py index a3395cd2..43167698 100644 --- a/graphiq/backends/stabilizer/clifford_tableau.py +++ b/graphiq/backends/stabilizer/clifford_tableau.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 copy import numpy as np diff --git a/graphiq/backends/stabilizer/compiler.py b/graphiq/backends/stabilizer/compiler.py index fe3e62c9..a177f3f5 100644 --- a/graphiq/backends/stabilizer/compiler.py +++ b/graphiq/backends/stabilizer/compiler.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Compilation tools for simulating a circuit with a Stabilizer backend """ diff --git a/graphiq/backends/stabilizer/functions/__init__.py b/graphiq/backends/stabilizer/functions/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/backends/stabilizer/functions/__init__.py +++ b/graphiq/backends/stabilizer/functions/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/backends/stabilizer/functions/clifford.py b/graphiq/backends/stabilizer/functions/clifford.py index 4b57a74e..c0f161d9 100644 --- a/graphiq/backends/stabilizer/functions/clifford.py +++ b/graphiq/backends/stabilizer/functions/clifford.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions that are applicable to CliffordTableau. """ diff --git a/graphiq/backends/stabilizer/functions/height.py b/graphiq/backends/stabilizer/functions/height.py index 48b0af08..ec6cfb2a 100644 --- a/graphiq/backends/stabilizer/functions/height.py +++ b/graphiq/backends/stabilizer/functions/height.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions that are related to height function calculation """ diff --git a/graphiq/backends/stabilizer/functions/linalg.py b/graphiq/backends/stabilizer/functions/linalg.py index 136bee0f..2e9db46c 100644 --- a/graphiq/backends/stabilizer/functions/linalg.py +++ b/graphiq/backends/stabilizer/functions/linalg.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions that are binary matrix linear algebra """ diff --git a/graphiq/backends/stabilizer/functions/local_cliff_equi_check.py b/graphiq/backends/stabilizer/functions/local_cliff_equi_check.py index 86be5c0c..0c680ae5 100644 --- a/graphiq/backends/stabilizer/functions/local_cliff_equi_check.py +++ b/graphiq/backends/stabilizer/functions/local_cliff_equi_check.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import numpy as np diff --git a/graphiq/backends/stabilizer/functions/metric.py b/graphiq/backends/stabilizer/functions/metric.py index 0a170a7a..79308d25 100644 --- a/graphiq/backends/stabilizer/functions/metric.py +++ b/graphiq/backends/stabilizer/functions/metric.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions that help calculation of various metrics in the stabilizer backend diff --git a/graphiq/backends/stabilizer/functions/rep_conversion.py b/graphiq/backends/stabilizer/functions/rep_conversion.py index 8ff9a878..8c0dd927 100644 --- a/graphiq/backends/stabilizer/functions/rep_conversion.py +++ b/graphiq/backends/stabilizer/functions/rep_conversion.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Some rc functions between different tableau types or between tableau and graph """ diff --git a/graphiq/backends/stabilizer/functions/stabilizer.py b/graphiq/backends/stabilizer/functions/stabilizer.py index 06954074..720569bc 100644 --- a/graphiq/backends/stabilizer/functions/stabilizer.py +++ b/graphiq/backends/stabilizer/functions/stabilizer.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions that are specific for StabilizerTableau """ diff --git a/graphiq/backends/stabilizer/functions/transformation.py b/graphiq/backends/stabilizer/functions/transformation.py index f1f42202..a5449a6e 100644 --- a/graphiq/backends/stabilizer/functions/transformation.py +++ b/graphiq/backends/stabilizer/functions/transformation.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 gate transformation here is applicable to both StabilizerTableau and CliffordTableau. """ diff --git a/graphiq/backends/stabilizer/functions/utils.py b/graphiq/backends/stabilizer/functions/utils.py index b645456e..adbfb3c1 100644 --- a/graphiq/backends/stabilizer/functions/utils.py +++ b/graphiq/backends/stabilizer/functions/utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Miscellaneous functions """ diff --git a/graphiq/backends/stabilizer/state.py b/graphiq/backends/stabilizer/state.py index 8d50707d..44bc066f 100644 --- a/graphiq/backends/stabilizer/state.py +++ b/graphiq/backends/stabilizer/state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ State representation using the stabilizer formalism """ diff --git a/graphiq/backends/stabilizer/tableau.py b/graphiq/backends/stabilizer/tableau.py index b29cccd3..77ecf108 100644 --- a/graphiq/backends/stabilizer/tableau.py +++ b/graphiq/backends/stabilizer/tableau.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 copy from abc import ABC diff --git a/graphiq/backends/state_base.py b/graphiq/backends/state_base.py index 943216aa..e916d0c2 100644 --- a/graphiq/backends/state_base.py +++ b/graphiq/backends/state_base.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 state representation base summarizes the methods which should be available for every quantum state representation subclass diff --git a/graphiq/backends/state_rep_conversion.py b/graphiq/backends/state_rep_conversion.py index d453211d..e8a0e6c7 100644 --- a/graphiq/backends/state_rep_conversion.py +++ b/graphiq/backends/state_rep_conversion.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Convert between different representations of quantum states; including density matrices, graph, and stabilizer. """ diff --git a/graphiq/benchmarks/__init__.py b/graphiq/benchmarks/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/benchmarks/__init__.py +++ b/graphiq/benchmarks/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/benchmarks/alternate_circuits.py b/graphiq/benchmarks/alternate_circuits.py index 161b0b3a..582c37e0 100644 --- a/graphiq/benchmarks/alternate_circuits.py +++ b/graphiq/benchmarks/alternate_circuits.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 script to find alternative circuits with hybrid solver """ diff --git a/graphiq/benchmarks/benchmark_utils.py b/graphiq/benchmarks/benchmark_utils.py index be65f835..e8da3b04 100644 --- a/graphiq/benchmarks/benchmark_utils.py +++ b/graphiq/benchmarks/benchmark_utils.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Utilities for benchmarking solver performance """ diff --git a/graphiq/benchmarks/circuits.py b/graphiq/benchmarks/circuits.py index 8519eaee..6eba20da 100644 --- a/graphiq/benchmarks/circuits.py +++ b/graphiq/benchmarks/circuits.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 suite of circuits for small, known quantum states that can be used for benchmarking, testing, and learning. """ diff --git a/graphiq/benchmarks/graph_states.py b/graphiq/benchmarks/graph_states.py index cd4d0a4b..e54f360e 100644 --- a/graphiq/benchmarks/graph_states.py +++ b/graphiq/benchmarks/graph_states.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 helps with the creation of various graph states (which we can use as targets for solving) diff --git a/graphiq/benchmarks/lc_equivalence.py b/graphiq/benchmarks/lc_equivalence.py index a38032d1..c6a1818f 100644 --- a/graphiq/benchmarks/lc_equivalence.py +++ b/graphiq/benchmarks/lc_equivalence.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt from graphiq.benchmarks.alternate_circuits import ( exemplary_run, diff --git a/graphiq/benchmarks/pipeline.py b/graphiq/benchmarks/pipeline.py index 7ac04a71..94a0ac7c 100644 --- a/graphiq/benchmarks/pipeline.py +++ b/graphiq/benchmarks/pipeline.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pandas as pd import time import psutil diff --git a/graphiq/benchmarks/solvers.py b/graphiq/benchmarks/solvers.py index d443e2fc..569e51bc 100644 --- a/graphiq/benchmarks/solvers.py +++ b/graphiq/benchmarks/solvers.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Example script for benchmarking multiple solvers """ diff --git a/graphiq/circuit/__init__.py b/graphiq/circuit/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/circuit/__init__.py +++ b/graphiq/circuit/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/circuit/circuit_base.py b/graphiq/circuit/circuit_base.py index 897acaf0..ca5d6764 100644 --- a/graphiq/circuit/circuit_base.py +++ b/graphiq/circuit/circuit_base.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 copy import random import warnings diff --git a/graphiq/circuit/circuit_dag.py b/graphiq/circuit/circuit_dag.py index 1e76f1f4..c02e84de 100644 --- a/graphiq/circuit/circuit_dag.py +++ b/graphiq/circuit/circuit_dag.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ CircuitDAG class, which defines the sequence of operations and gates. Once a compiler is defined, the resulting quantum state can be simulated. diff --git a/graphiq/circuit/ops.py b/graphiq/circuit/ops.py index 621ebe99..08af9fab 100644 --- a/graphiq/circuit/ops.py +++ b/graphiq/circuit/ops.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 Operation objects are objects which tell the compiler what gate to apply on which registers / qubits diff --git a/graphiq/circuit/register.py b/graphiq/circuit/register.py index e0d72ecb..d48f65e0 100644 --- a/graphiq/circuit/register.py +++ b/graphiq/circuit/register.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. class Register: """ Register class object, the class includes a dictionary which map the register type as the key and the register array diff --git a/graphiq/data_collection/correlation_module.py b/graphiq/data_collection/correlation_module.py index 33ab2e01..34a97826 100644 --- a/graphiq/data_collection/correlation_module.py +++ b/graphiq/data_collection/correlation_module.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 random from math import ceil diff --git a/graphiq/data_collection/ui_functions.py b/graphiq/data_collection/ui_functions.py index 3709cb7f..f6a40333 100644 --- a/graphiq/data_collection/ui_functions.py +++ b/graphiq/data_collection/ui_functions.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 os import tkinter as tk from warnings import warn diff --git a/graphiq/data_collection/user_interface.py b/graphiq/data_collection/user_interface.py index bd5a349a..d33fe0af 100644 --- a/graphiq/data_collection/user_interface.py +++ b/graphiq/data_collection/user_interface.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. ### # data collection script # ### diff --git a/graphiq/io.py b/graphiq/io.py index 668d1de0..c917ecef 100644 --- a/graphiq/io.py +++ b/graphiq/io.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 datetime import json import os diff --git a/graphiq/metrics.py b/graphiq/metrics.py index c51e7c32..18fd25ae 100644 --- a/graphiq/metrics.py +++ b/graphiq/metrics.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Classes to compute metrics on a circuit and/or system states """ diff --git a/graphiq/noise/__init__.py b/graphiq/noise/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/noise/__init__.py +++ b/graphiq/noise/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/noise/model_parameters.py b/graphiq/noise/model_parameters.py index fb062d91..19dcce6e 100644 --- a/graphiq/noise/model_parameters.py +++ b/graphiq/noise/model_parameters.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.circuit.ops as ops diff --git a/graphiq/noise/monte_carlo_noise.py b/graphiq/noise/monte_carlo_noise.py index 2f62a103..24d25523 100644 --- a/graphiq/noise/monte_carlo_noise.py +++ b/graphiq/noise/monte_carlo_noise.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import graphiq.circuit.ops as ops diff --git a/graphiq/noise/noise_models.py b/graphiq/noise/noise_models.py index e83e6793..dcf0e7f7 100644 --- a/graphiq/noise/noise_models.py +++ b/graphiq/noise/noise_models.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 Noise objects are objects that tell the compiler the noise model of each gate. diff --git a/graphiq/noise/time_depend_noise.py b/graphiq/noise/time_depend_noise.py index ecb16c5d..f9f767ac 100644 --- a/graphiq/noise/time_depend_noise.py +++ b/graphiq/noise/time_depend_noise.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 copy from itertools import combinations_with_replacement diff --git a/graphiq/solvers/__init__.py b/graphiq/solvers/__init__.py index cb87d012..02a41768 100644 --- a/graphiq/solvers/__init__.py +++ b/graphiq/solvers/__init__.py @@ -1 +1,15 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.solvers.solver_base import SolverBase, RandomSearchSolver diff --git a/graphiq/solvers/alternate_target_solver.py b/graphiq/solvers/alternate_target_solver.py index 0f91c877..66338178 100644 --- a/graphiq/solvers/alternate_target_solver.py +++ b/graphiq/solvers/alternate_target_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ AlternateTargetSolver uses alternative target graph states as the starting point for the TimeReversedSolver. Alternative target graph states can be found by relabeling (photon emission ordering) diff --git a/graphiq/solvers/evolutionary_solver.py b/graphiq/solvers/evolutionary_solver.py index 596624fb..8abbbe66 100644 --- a/graphiq/solvers/evolutionary_solver.py +++ b/graphiq/solvers/evolutionary_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Evolutionary solver which includes a random search solver as a special case. This solver is based on certain physical rules imposed by a platform. diff --git a/graphiq/solvers/gradient_descent_solver.py b/graphiq/solvers/gradient_descent_solver.py index b6c0fe33..976f108b 100644 --- a/graphiq/solvers/gradient_descent_solver.py +++ b/graphiq/solvers/gradient_descent_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Gradient descent algorithms on parameterized circuits. """ diff --git a/graphiq/solvers/hybrid_solvers.py b/graphiq/solvers/hybrid_solvers.py index a330ff72..b7754273 100644 --- a/graphiq/solvers/hybrid_solvers.py +++ b/graphiq/solvers/hybrid_solvers.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Contains various hybrid solvers """ diff --git a/graphiq/solvers/solver_base.py b/graphiq/solvers/solver_base.py index 5ffc698f..29affdb4 100644 --- a/graphiq/solvers/solver_base.py +++ b/graphiq/solvers/solver_base.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Solvers are implementations of search algorithms to find quantum circuits which produce a target state. diff --git a/graphiq/solvers/solver_result.py b/graphiq/solvers/solver_result.py index c69b8859..0c32b230 100644 --- a/graphiq/solvers/solver_result.py +++ b/graphiq/solvers/solver_result.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 json import warnings diff --git a/graphiq/solvers/time_reversed_solver.py b/graphiq/solvers/time_reversed_solver.py index 5a7666b7..fa8f4bee 100644 --- a/graphiq/solvers/time_reversed_solver.py +++ b/graphiq/solvers/time_reversed_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. r""" Time-reversed solver which follows the paper by Li et al [1]_. diff --git a/graphiq/state.py b/graphiq/state.py index 43f900b7..223197bf 100644 --- a/graphiq/state.py +++ b/graphiq/state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 QuantumState class mediates the interactions between different state representations diff --git a/graphiq/utils/__init__.py b/graphiq/utils/__init__.py index e69de29b..fd1ce610 100644 --- a/graphiq/utils/__init__.py +++ b/graphiq/utils/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/graphiq/utils/circuit_comparison.py b/graphiq/utils/circuit_comparison.py index 054d9a39..6bf66fb6 100644 --- a/graphiq/utils/circuit_comparison.py +++ b/graphiq/utils/circuit_comparison.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions to compare quantum circuits diff --git a/graphiq/utils/draw.py b/graphiq/utils/draw.py index 84173fc0..0657b734 100644 --- a/graphiq/utils/draw.py +++ b/graphiq/utils/draw.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 json import requests diff --git a/graphiq/utils/openqasm_lib.py b/graphiq/utils/openqasm_lib.py index 32c54e39..ef756e11 100644 --- a/graphiq/utils/openqasm_lib.py +++ b/graphiq/utils/openqasm_lib.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 purpose of this document is to have a single place in which openQASM functionality has to be kept up to date diff --git a/graphiq/utils/openqasm_parser.py b/graphiq/utils/openqasm_parser.py index ab77b8a4..eb5607e7 100644 --- a/graphiq/utils/openqasm_parser.py +++ b/graphiq/utils/openqasm_parser.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 qiskit.qasm import Qasm diff --git a/graphiq/utils/photon_loss.py b/graphiq/utils/photon_loss.py index b922bdec..47792338 100644 --- a/graphiq/utils/photon_loss.py +++ b/graphiq/utils/photon_loss.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Utility functions for analyzing the effect of photon loss on circuit performance. """ diff --git a/graphiq/utils/preprocessing.py b/graphiq/utils/preprocessing.py index 2fe5a04e..24a9b603 100644 --- a/graphiq/utils/preprocessing.py +++ b/graphiq/utils/preprocessing.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import numpy as np diff --git a/graphiq/utils/relabel_module.py b/graphiq/utils/relabel_module.py index 73411d19..121c77f1 100644 --- a/graphiq/utils/relabel_module.py +++ b/graphiq/utils/relabel_module.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Utility functionality for creating isomorphic graphs to explore alternative circuits. """ diff --git a/graphiq/visualizers/__init__.py b/graphiq/visualizers/__init__.py index 9965760e..a5ef896b 100644 --- a/graphiq/visualizers/__init__.py +++ b/graphiq/visualizers/__init__.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 .density_matrix import density_matrix_bars, density_matrix_heatmap from .graph import * from .solver_logs import * diff --git a/graphiq/visualizers/dag.py b/graphiq/visualizers/dag.py index ad52380f..ba3220cb 100644 --- a/graphiq/visualizers/dag.py +++ b/graphiq/visualizers/dag.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Functions for visualizing the circuit DAGs """ diff --git a/graphiq/visualizers/density_matrix.py b/graphiq/visualizers/density_matrix.py index 71ae2715..c4931073 100644 --- a/graphiq/visualizers/density_matrix.py +++ b/graphiq/visualizers/density_matrix.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import numpy as np import seaborn as sns diff --git a/graphiq/visualizers/graph.py b/graphiq/visualizers/graph.py index 399e9496..0c01f4c7 100644 --- a/graphiq/visualizers/graph.py +++ b/graphiq/visualizers/graph.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. """ Graph representation visualization helper """ diff --git a/graphiq/visualizers/openqasm_visualization.py b/graphiq/visualizers/openqasm_visualization.py index 3e5afbb0..8f623645 100644 --- a/graphiq/visualizers/openqasm_visualization.py +++ b/graphiq/visualizers/openqasm_visualization.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt from qiskit import QuantumCircuit diff --git a/graphiq/visualizers/solver_logs.py b/graphiq/visualizers/solver_logs.py index 642b3e63..061e9d04 100644 --- a/graphiq/visualizers/solver_logs.py +++ b/graphiq/visualizers/solver_logs.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_benchmarking/__init__.py b/tests/test_benchmarking/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_benchmarking/__init__.py +++ b/tests/test_benchmarking/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_benchmarking/test_benchmarking.py b/tests/test_benchmarking/test_benchmarking.py index 6d22ae64..a5db34a0 100644 --- a/tests/test_benchmarking/test_benchmarking.py +++ b/tests/test_benchmarking/test_benchmarking.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.backends.density_matrix.compiler import DensityMatrixCompiler from graphiq.io import IO from graphiq.metrics import Infidelity diff --git a/tests/test_benchmarking/test_pipeline.py b/tests/test_benchmarking/test_pipeline.py index 7c7497a0..12df04a5 100644 --- a/tests/test_benchmarking/test_pipeline.py +++ b/tests/test_benchmarking/test_pipeline.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.noise.monte_carlo_noise as mcn from graphiq.backends.stabilizer.compiler import StabilizerCompiler from graphiq.backends.stabilizer.functions.rep_conversion import ( diff --git a/tests/test_circuits/__init__.py b/tests/test_circuits/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_circuits/__init__.py +++ b/tests/test_circuits/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_circuits/conftest.py b/tests/test_circuits/conftest.py index 5c9b8be8..acb3ebc0 100644 --- a/tests/test_circuits/conftest.py +++ b/tests/test_circuits/conftest.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest from graphiq.circuit.circuit_dag import CircuitDAG diff --git a/tests/test_circuits/test_dag_circuit.py b/tests/test_circuits/test_dag_circuit.py index 04c75fd3..0069f6eb 100644 --- a/tests/test_circuits/test_dag_circuit.py +++ b/tests/test_circuits/test_dag_circuit.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 random import pytest diff --git a/tests/test_circuits/test_openqasm.py b/tests/test_circuits/test_openqasm.py index 3a17d1e1..3f092614 100644 --- a/tests/test_circuits/test_openqasm.py +++ b/tests/test_circuits/test_openqasm.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import numpy as np import pytest diff --git a/tests/test_circuits/test_ops.py b/tests/test_circuits/test_ops.py index 6014985d..83493c77 100644 --- a/tests/test_circuits/test_ops.py +++ b/tests/test_circuits/test_ops.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import pytest diff --git a/tests/test_circuits/test_register.py b/tests/test_circuits/test_register.py index 9c070da3..f140cf0c 100644 --- a/tests/test_circuits/test_register.py +++ b/tests/test_circuits/test_register.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest from graphiq.circuit.register import Register diff --git a/tests/test_circuits/test_register_depth.py b/tests/test_circuits/test_register_depth.py index 720b19dc..50ef3ae8 100644 --- a/tests/test_circuits/test_register_depth.py +++ b/tests/test_circuits/test_register_depth.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import numpy.testing as test diff --git a/tests/test_flags.py b/tests/test_flags.py index c14915bc..1750e381 100644 --- a/tests/test_flags.py +++ b/tests/test_flags.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest import graphiq diff --git a/tests/test_noise/__init__.py b/tests/test_noise/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_noise/__init__.py +++ b/tests/test_noise/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_noise/test_mixed_stabilizers.py b/tests/test_noise/test_mixed_stabilizers.py index 6a4d0a6c..40caea5e 100644 --- a/tests/test_noise/test_mixed_stabilizers.py +++ b/tests/test_noise/test_mixed_stabilizers.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import pytest diff --git a/tests/test_noise/test_noise_models.py b/tests/test_noise/test_noise_models.py index 08be2ba2..cbdeb130 100644 --- a/tests/test_noise/test_noise_models.py +++ b/tests/test_noise/test_noise_models.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import graphiq.backends.density_matrix.functions as dmf diff --git a/tests/test_noise/test_solver_with_noise.py b/tests/test_noise/test_solver_with_noise.py index c0a1f629..13257bb5 100644 --- a/tests/test_noise/test_solver_with_noise.py +++ b/tests/test_noise/test_solver_with_noise.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import pytest import numpy as np diff --git a/tests/test_noise/test_time_depend_noise.py b/tests/test_noise/test_time_depend_noise.py index 4891a53f..43b52f4d 100644 --- a/tests/test_noise/test_time_depend_noise.py +++ b/tests/test_noise/test_time_depend_noise.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import pytest diff --git a/tests/test_simulation/__init__.py b/tests/test_simulation/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_simulation/__init__.py +++ b/tests/test_simulation/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_simulation/test_benchmark_fidelity.py b/tests/test_simulation/test_benchmark_fidelity.py index 54ac8e2f..32183535 100644 --- a/tests/test_simulation/test_benchmark_fidelity.py +++ b/tests/test_simulation/test_benchmark_fidelity.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import pytest diff --git a/tests/test_simulation/test_random_solver_results.py b/tests/test_simulation/test_random_solver_results.py index aa11bec4..b248b7ca 100644 --- a/tests/test_simulation/test_random_solver_results.py +++ b/tests/test_simulation/test_random_solver_results.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import pytest diff --git a/tests/test_solvers/__init__.py b/tests/test_solvers/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_solvers/__init__.py +++ b/tests/test_solvers/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_solvers/test_alternate_target_solver.py b/tests/test_solvers/test_alternate_target_solver.py index ae5e1a99..a4ecd45f 100644 --- a/tests/test_solvers/test_alternate_target_solver.py +++ b/tests/test_solvers/test_alternate_target_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest as pytest from graphiq.benchmarks.graph_states import linear_cluster_state diff --git a/tests/test_solvers/test_deterministic_solver.py b/tests/test_solvers/test_deterministic_solver.py index 8ec59b61..765bb6d6 100644 --- a/tests/test_solvers/test_deterministic_solver.py +++ b/tests/test_solvers/test_deterministic_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import numpy as np import pytest diff --git a/tests/test_solvers/test_evolutionary_random_solvers.py b/tests/test_solvers/test_evolutionary_random_solvers.py index 9e87316a..9ccb646e 100644 --- a/tests/test_solvers/test_evolutionary_random_solvers.py +++ b/tests/test_solvers/test_evolutionary_random_solvers.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import pytest import numpy as np diff --git a/tests/test_solvers/test_gradient_descent_solver.py b/tests/test_solvers/test_gradient_descent_solver.py index ef29f42d..41d7c8f2 100644 --- a/tests/test_solvers/test_gradient_descent_solver.py +++ b/tests/test_solvers/test_gradient_descent_solver.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 jax # import jax.numpy as np # import matplotlib.pyplot as plt diff --git a/tests/test_solvers/test_hybrid_solvers.py b/tests/test_solvers/test_hybrid_solvers.py index ed44491d..b1b385a0 100644 --- a/tests/test_solvers/test_hybrid_solvers.py +++ b/tests/test_solvers/test_hybrid_solvers.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import networkx as nx from graphiq.benchmarks.circuits import ( diff --git a/tests/test_solvers/test_solver_base.py b/tests/test_solvers/test_solver_base.py index f101bb19..ed5f84c7 100644 --- a/tests/test_solvers/test_solver_base.py +++ b/tests/test_solvers/test_solver_base.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.solvers.solver_base import * diff --git a/tests/test_state_representation/__init__.py b/tests/test_state_representation/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_state_representation/__init__.py +++ b/tests/test_state_representation/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_state_representation/conftest.py b/tests/test_state_representation/conftest.py index ba4ed04a..0a05b6e4 100644 --- a/tests/test_state_representation/conftest.py +++ b/tests/test_state_representation/conftest.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import pytest diff --git a/tests/test_state_representation/density_matrix/__init__.py b/tests/test_state_representation/density_matrix/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_state_representation/density_matrix/__init__.py +++ b/tests/test_state_representation/density_matrix/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_state_representation/density_matrix/test_density_matrix_compiler.py b/tests/test_state_representation/density_matrix/test_density_matrix_compiler.py index c60f6a50..c4f3142b 100644 --- a/tests/test_state_representation/density_matrix/test_density_matrix_compiler.py +++ b/tests/test_state_representation/density_matrix/test_density_matrix_compiler.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import graphiq.circuit.ops as ops diff --git a/tests/test_state_representation/density_matrix/test_density_matrix_functions.py b/tests/test_state_representation/density_matrix/test_density_matrix_functions.py index 95aa17f0..9b02b72a 100644 --- a/tests/test_state_representation/density_matrix/test_density_matrix_functions.py +++ b/tests/test_state_representation/density_matrix/test_density_matrix_functions.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest from graphiq.backends.density_matrix.functions import * diff --git a/tests/test_state_representation/density_matrix/test_density_matrix_state.py b/tests/test_state_representation/density_matrix/test_density_matrix_state.py index 2caea15c..f8bf858a 100644 --- a/tests/test_state_representation/density_matrix/test_density_matrix_state.py +++ b/tests/test_state_representation/density_matrix/test_density_matrix_state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import graphiq.backends.density_matrix.functions as dmf diff --git a/tests/test_state_representation/density_matrix/test_measurements.py b/tests/test_state_representation/density_matrix/test_measurements.py index 88792084..cfdcb58d 100644 --- a/tests/test_state_representation/density_matrix/test_measurements.py +++ b/tests/test_state_representation/density_matrix/test_measurements.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import networkx as nx import numpy as np diff --git a/tests/test_state_representation/graph/__init__.py b/tests/test_state_representation/graph/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_state_representation/graph/__init__.py +++ b/tests/test_state_representation/graph/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_state_representation/graph/test_graph_rep.py b/tests/test_state_representation/graph/test_graph_rep.py index c29f65e9..47344eaa 100644 --- a/tests/test_state_representation/graph/test_graph_rep.py +++ b/tests/test_state_representation/graph/test_graph_rep.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.backends.graph.state import Graph, MixedGraph import networkx as nx diff --git a/tests/test_state_representation/stabilizer/__init__.py b/tests/test_state_representation/stabilizer/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_state_representation/stabilizer/__init__.py +++ b/tests/test_state_representation/stabilizer/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_state_representation/stabilizer/test_height_functions.py b/tests/test_state_representation/stabilizer/test_height_functions.py index ed54c0a0..c59191a6 100644 --- a/tests/test_state_representation/stabilizer/test_height_functions.py +++ b/tests/test_state_representation/stabilizer/test_height_functions.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 numpy as np import pytest diff --git a/tests/test_state_representation/stabilizer/test_stabilizer_compiler.py b/tests/test_state_representation/stabilizer/test_stabilizer_compiler.py index eb0acace..1f0e3147 100644 --- a/tests/test_state_representation/stabilizer/test_stabilizer_compiler.py +++ b/tests/test_state_representation/stabilizer/test_stabilizer_compiler.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest from graphiq.circuit.circuit_dag import CircuitDAG diff --git a/tests/test_state_representation/stabilizer/test_stabilizer_functions.py b/tests/test_state_representation/stabilizer/test_stabilizer_functions.py index 2f2e5b79..d03aafad 100644 --- a/tests/test_state_representation/stabilizer/test_stabilizer_functions.py +++ b/tests/test_state_representation/stabilizer/test_stabilizer_functions.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 functools import reduce import pytest diff --git a/tests/test_state_representation/stabilizer/test_stabilizer_state.py b/tests/test_state_representation/stabilizer/test_stabilizer_state.py index 48be1a23..fd0b6e21 100644 --- a/tests/test_state_representation/stabilizer/test_stabilizer_state.py +++ b/tests/test_state_representation/stabilizer/test_stabilizer_state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.backends.stabilizer.state import * diff --git a/tests/test_state_representation/test_graph_LC_equivalence.py b/tests/test_state_representation/test_graph_LC_equivalence.py index fda40940..061ebf65 100644 --- a/tests/test_state_representation/test_graph_LC_equivalence.py +++ b/tests/test_state_representation/test_graph_LC_equivalence.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 matplotlib.pyplot as plt import pytest diff --git a/tests/test_state_representation/test_quantum_state.py b/tests/test_state_representation/test_quantum_state.py index ecba25e4..3a5fea73 100644 --- a/tests/test_state_representation/test_quantum_state.py +++ b/tests/test_state_representation/test_quantum_state.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import numpy as np import pytest diff --git a/tests/test_state_representation/test_state_rep_conversion.py b/tests/test_state_representation/test_state_rep_conversion.py index 77ee3f0b..854ff941 100644 --- a/tests/test_state_representation/test_state_rep_conversion.py +++ b/tests/test_state_representation/test_state_rep_conversion.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 functools import reduce import networkx as nx diff --git a/tests/test_utils/__init__.py b/tests/test_utils/__init__.py index e69de29b..fd1ce610 100644 --- a/tests/test_utils/__init__.py +++ b/tests/test_utils/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/tests/test_utils/test_circuit_comparison.py b/tests/test_utils/test_circuit_comparison.py index 471bf201..2ffc271b 100644 --- a/tests/test_utils/test_circuit_comparison.py +++ b/tests/test_utils/test_circuit_comparison.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest from graphiq.solvers.alternate_target_solver import * diff --git a/tests/test_utils/test_draw.py b/tests/test_utils/test_draw.py index 7101672d..d390a23c 100644 --- a/tests/test_utils/test_draw.py +++ b/tests/test_utils/test_draw.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 pytest from graphiq.utils.draw import Columns diff --git a/tests/test_utils/test_openqasm_parser.py b/tests/test_utils/test_openqasm_parser.py index 0c7df38a..0f50de77 100644 --- a/tests/test_utils/test_openqasm_parser.py +++ b/tests/test_utils/test_openqasm_parser.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 math import pytest diff --git a/tests/test_utils/test_relabel_module.py b/tests/test_utils/test_relabel_module.py index a7bdb1de..dc4a949f 100644 --- a/tests/test_utils/test_relabel_module.py +++ b/tests/test_utils/test_relabel_module.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 networkx as nx import numpy as np import pytest diff --git a/tests/test_utils/test_solver_result.py b/tests/test_utils/test_solver_result.py index 97363511..13692a71 100644 --- a/tests/test_utils/test_solver_result.py +++ b/tests/test_utils/test_solver_result.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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 graphiq.solvers.solver_result import * from graphiq.benchmarks.circuits import ( ghz3_state_circuit, diff --git a/visualization/__init__.py b/visualization/__init__.py index e69de29b..fd1ce610 100644 --- a/visualization/__init__.py +++ b/visualization/__init__.py @@ -0,0 +1,14 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. diff --git a/visualization/app.py b/visualization/app.py index 7971206c..ea0d605e 100644 --- a/visualization/app.py +++ b/visualization/app.py @@ -1,3 +1,17 @@ +# Copyright (c) 2022-2024 Quantum Bridge Technologies Inc. +# Copyright (c) 2022-2024 Ki3 Photonics Technologies +# +# 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. # an object of WSGI application from flask import Flask, jsonify, render_template, json, request, redirect, url_for