From 6bbc764534dab1c164fc73c8d825d7fb69cd5d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abd=C3=B3n=20Rodr=C3=ADguez=20Davila?= Date: Fri, 8 Jun 2018 15:00:58 +0200 Subject: [PATCH] Consistent license across all the project (#550) * Consistent license across all the project * Update license * Update LICENSE.txt * Update licenses * Fix linter --- .travis.yml | 16 +--- LICENSE.md => LICENSE.txt | 4 +- Make.bat | 16 +--- Makefile | 17 +--- README.md | 4 - appveyor.yml | 16 +--- doc/ko/README.md | 6 -- doc/zh/README.md | 4 - examples/python/basic_optimize.py | 17 +--- examples/python/ghz.py | 16 +--- examples/python/initialize.py | 16 +--- examples/python/qft.py | 16 +--- examples/python/rippleadd-async.py | 16 +--- examples/python/rippleadd.py | 16 +--- examples/python/teleport.py | 16 +--- examples/python/using_qiskit_core_level_0.py | 16 +--- examples/python/using_qiskit_core_level_1.py | 16 +--- qiskit/__init__.py | 21 ++--- qiskit/_classicalregister.py | 16 +--- qiskit/_compiler.py | 19 +--- qiskit/_compositegate.py | 16 +--- qiskit/_gate.py | 16 +--- qiskit/_instruction.py | 16 +--- qiskit/_instructionset.py | 16 +--- qiskit/_logging.py | 17 +--- qiskit/_measure.py | 16 +--- qiskit/_openquantumcompiler.py | 19 +--- qiskit/_qiskiterror.py | 16 +--- qiskit/_quantumcircuit.py | 16 +--- qiskit/_quantumjob.py | 21 ++--- qiskit/_quantumprogram.py | 16 +--- qiskit/_quantumregister.py | 16 +--- qiskit/_register.py | 16 +--- qiskit/_reset.py | 16 +--- qiskit/_result.py | 19 +--- qiskit/_resulterror.py | 16 +--- qiskit/_util.py | 17 +--- qiskit/backends/__init__.py | 16 +--- qiskit/backends/basebackend.py | 16 +--- qiskit/backends/basejob.py | 16 +--- qiskit/backends/baseprovider.py | 19 +--- qiskit/backends/ibmq/__init__.py | 16 +--- qiskit/backends/ibmq/ibmqbackend.py | 17 +--- qiskit/backends/ibmq/ibmqjob.py | 17 +--- qiskit/backends/ibmq/ibmqprovider.py | 16 +--- qiskit/backends/local/__init__.py | 16 +--- qiskit/backends/local/_simulatorerror.py | 16 +--- qiskit/backends/local/_simulatortools.py | 19 +--- qiskit/backends/local/localjob.py | 16 +--- qiskit/backends/local/localprovider.py | 19 +--- qiskit/backends/local/qasm_simulator_cpp.py | 16 +--- .../backends/local/qasm_simulator_projectq.py | 20 +--- qiskit/backends/local/qasm_simulator_py.py | 19 +--- .../local/statevector_simulator_cpp.py | 19 +--- .../local/statevector_simulator_py.py | 19 +--- qiskit/backends/local/unitary_simulator_py.py | 16 +--- qiskit/dagcircuit/__init__.py | 16 +--- qiskit/dagcircuit/_dagcircuit.py | 16 +--- qiskit/dagcircuit/_dagcircuiterror.py | 16 +--- qiskit/extensions/__init__.py | 17 +--- qiskit/extensions/_extensionerror.py | 16 +--- .../quantum_initializer/__init__.py | 16 +--- .../quantum_initializer/_initializer.py | 17 +--- qiskit/extensions/simulator/__init__.py | 16 +--- qiskit/extensions/simulator/load.py | 16 +--- qiskit/extensions/simulator/noise.py | 16 +--- qiskit/extensions/simulator/save.py | 16 +--- qiskit/extensions/simulator/snapshot.py | 16 +--- qiskit/extensions/simulator/wait.py | 19 +--- qiskit/extensions/standard/__init__.py | 16 +--- qiskit/extensions/standard/barrier.py | 16 +--- qiskit/extensions/standard/ccx.py | 16 +--- qiskit/extensions/standard/ch.py | 19 +--- qiskit/extensions/standard/crz.py | 16 +--- qiskit/extensions/standard/cswap.py | 16 +--- qiskit/extensions/standard/cu1.py | 16 +--- qiskit/extensions/standard/cu3.py | 16 +--- qiskit/extensions/standard/cx.py | 19 +--- qiskit/extensions/standard/cxbase.py | 16 +--- qiskit/extensions/standard/cy.py | 19 +--- qiskit/extensions/standard/cz.py | 20 ++-- qiskit/extensions/standard/gatestools.py | 20 ++-- qiskit/extensions/standard/h.py | 19 +--- qiskit/extensions/standard/header.py | 16 +--- qiskit/extensions/standard/iden.py | 19 +--- qiskit/extensions/standard/rx.py | 19 +--- qiskit/extensions/standard/ry.py | 19 +--- qiskit/extensions/standard/rz.py | 19 +--- qiskit/extensions/standard/rzz.py | 16 +--- qiskit/extensions/standard/s.py | 19 +--- qiskit/extensions/standard/swap.py | 19 +--- qiskit/extensions/standard/t.py | 19 +--- qiskit/extensions/standard/u0.py | 19 +--- qiskit/extensions/standard/u1.py | 19 +--- qiskit/extensions/standard/u2.py | 19 +--- qiskit/extensions/standard/u3.py | 19 +--- qiskit/extensions/standard/ubase.py | 19 +--- qiskit/extensions/standard/x.py | 19 +--- qiskit/extensions/standard/y.py | 19 +--- qiskit/extensions/standard/z.py | 19 +--- qiskit/mapper/__init__.py | 16 +--- qiskit/mapper/_compiling.py | 19 +--- qiskit/mapper/_coupling.py | 16 +--- qiskit/mapper/_couplingerror.py | 16 +--- qiskit/mapper/_mappererror.py | 16 +--- qiskit/mapper/_mapping.py | 19 +--- qiskit/qasm/__init__.py | 16 +--- qiskit/qasm/_node/__init__.py | 16 +--- qiskit/qasm/_node/_barrier.py | 16 +--- qiskit/qasm/_node/_binaryop.py | 16 +--- qiskit/qasm/_node/_binaryoperator.py | 16 +--- qiskit/qasm/_node/_cnot.py | 16 +--- qiskit/qasm/_node/_creg.py | 20 ++-- qiskit/qasm/_node/_customunitary.py | 20 ++-- qiskit/qasm/_node/_expressionlist.py | 16 +--- qiskit/qasm/_node/_external.py | 20 ++-- qiskit/qasm/_node/_format.py | 16 +--- qiskit/qasm/_node/_gate.py | 19 +--- qiskit/qasm/_node/_gatebody.py | 16 +--- qiskit/qasm/_node/_id.py | 16 +--- qiskit/qasm/_node/_idlist.py | 16 +--- qiskit/qasm/_node/_if.py | 16 +--- qiskit/qasm/_node/_indexedid.py | 19 +--- qiskit/qasm/_node/_intnode.py | 16 +--- qiskit/qasm/_node/_measure.py | 16 +--- qiskit/qasm/_node/_node.py | 16 +--- qiskit/qasm/_node/_nodeexception.py | 16 +--- qiskit/qasm/_node/_opaque.py | 19 +--- qiskit/qasm/_node/_prefix.py | 16 +--- qiskit/qasm/_node/_primarylist.py | 16 +--- qiskit/qasm/_node/_program.py | 16 +--- qiskit/qasm/_node/_qreg.py | 19 +--- qiskit/qasm/_node/_real.py | 16 +--- qiskit/qasm/_node/_reset.py | 16 +--- qiskit/qasm/_node/_unaryoperator.py | 16 +--- qiskit/qasm/_node/_universalunitary.py | 16 +--- qiskit/qasm/_qasm.py | 16 +--- qiskit/qasm/_qasmerror.py | 16 +--- qiskit/qasm/_qasmlexer.py | 16 +--- qiskit/qasm/_qasmparser.py | 16 +--- qiskit/tools/apps/fermion.py | 17 +--- qiskit/tools/apps/optimization.py | 20 ++-- qiskit/tools/file_io.py | 17 +--- qiskit/tools/qcvv/fitters.py | 17 +--- qiskit/tools/qcvv/tomography.py | 20 ++-- qiskit/tools/qi/pauli.py | 20 ++-- qiskit/tools/qi/qi.py | 20 ++-- qiskit/tools/visualization.py | 20 ++-- qiskit/unroll/__init__.py | 16 +--- qiskit/unroll/_backenderror.py | 16 +--- qiskit/unroll/_circuitbackend.py | 16 +--- qiskit/unroll/_dagbackend.py | 16 +--- qiskit/unroll/_dagunroller.py | 16 +--- qiskit/unroll/_jsonbackend.py | 16 +--- qiskit/unroll/_printerbackend.py | 16 +--- qiskit/unroll/_unroller.py | 16 +--- qiskit/unroll/_unrollerbackend.py | 16 +--- qiskit/unroll/_unrollererror.py | 16 +--- qiskit/wrapper/__init__.py | 20 ++-- qiskit/wrapper/_wrapper.py | 17 +--- qiskit/wrapper/defaultqiskitprovider.py | 16 +--- setup.py.in | 16 +--- src/qasm-simulator-cpp/README.md | 14 +-- .../src/backends/base_backend.hpp | 23 ++--- .../src/backends/clifford_backend.hpp | 21 ++--- .../src/backends/ideal_backend.hpp | 29 ++---- .../src/backends/noise_models.hpp | 21 ++--- .../src/backends/qubit_backend.hpp | 23 ++--- .../src/backends/rng_engine.hpp | 21 ++--- .../src/engines/base_engine.hpp | 27 ++---- .../src/engines/vector_engine.hpp | 27 ++---- src/qasm-simulator-cpp/src/main.cpp | 21 ++--- src/qasm-simulator-cpp/src/simulator.hpp | 29 ++---- .../src/utilities/binary_vector.hpp | 23 ++--- .../src/utilities/circuit.hpp | 25 ++--- .../src/utilities/clifford.hpp | 21 ++--- .../src/utilities/matrix.hpp | 23 ++--- src/qasm-simulator-cpp/src/utilities/misc.hpp | 21 ++--- .../src/utilities/qubit_vector.hpp | 91 +++++++++---------- .../src/utilities/tensor_index.hpp | 23 ++--- .../src/utilities/types.hpp | 21 ++--- test/__init__.py | 16 +--- test/performance/state_tomography.py | 16 +--- test/performance/vqe.py | 16 +--- test/python/__init__.py | 17 +--- test/python/_dummybackend.py | 16 +--- test/python/_random_circuit_generator.py | 17 +--- test/python/_random_qasm_generator.py | 19 +--- test/python/common.py | 17 +--- test/python/test_api_ibmq.py | 20 ++-- test/python/test_apps.py | 19 +--- test/python/test_backends.py | 19 +--- test/python/test_compiler.py | 19 +--- test/python/test_dagcircuit.py | 20 ++-- test/python/test_extensions_simulator.py | 20 ++-- test/python/test_extensions_standard.py | 19 +--- test/python/test_ibmqjob.py | 19 +--- test/python/test_identifiers.py | 19 +--- test/python/test_initializer.py | 20 ++-- test/python/test_jsonoutput.py | 19 +--- test/python/test_localjob.py | 20 ++-- test/python/test_mapper.py | 19 +--- test/python/test_qasm_parser.py | 20 ++-- test/python/test_qasm_simulator_cpp.py | 18 +--- test/python/test_qasm_simulator_projectq.py | 18 +--- test/python/test_qasm_simulator_py.py | 19 +--- test/python/test_qi.py | 19 +--- test/python/test_quantumprogram.py | 19 +--- test/python/test_reordering.py | 20 ++-- test/python/test_simulator_interfaces.py | 20 ++-- test/python/test_skip_translation.py | 19 +--- test/python/test_tomography.py | 20 ++-- test/python/test_unitary_simulator_py.py | 21 ++--- test/python/test_unroller.py | 21 ++--- test/python/test_util.py | 17 +--- test/python/test_visualization.py | 20 ++-- test/schemas/check_schemas.py | 17 +--- tools/ghpages_documentation_deploy.sh | 16 +--- tools/random_qasm_generator.py | 33 +++---- 219 files changed, 957 insertions(+), 2991 deletions(-) rename LICENSE.md => LICENSE.txt (99%) diff --git a/.travis.yml b/.travis.yml index 0bbb7489b4a5..e07d5982be30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,7 @@ -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. notifications: email: false diff --git a/LICENSE.md b/LICENSE.txt similarity index 99% rename from LICENSE.md rename to LICENSE.txt index 1c17794ec161..5333c633bff5 100644 --- a/LICENSE.md +++ b/LICENSE.txt @@ -1,3 +1,5 @@ + Copyright 2017 IBM and its contributors + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +188,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2017 IBM Inc. + Copyright 2017 IBM and its contributors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Make.bat b/Make.bat index e73fd391245a..b46e1c429e07 100644 --- a/Make.bat +++ b/Make.bat @@ -1,17 +1,7 @@ -:: Copyright 2017 IBM RESEARCH. All Rights Reserved. -:: -:: Licensed under the Apache License, Version 2.0 (the "License"); -:: you may not use this file except in compliance with the License. -:: You may obtain a copy of the License at +:: Copyright 2017, IBM. :: -:: 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 source code is licensed under the Apache License, Version 2.0 found in +:: the LICENSE.txt file in the root directory of this source tree. @ECHO OFF @SETLOCAL enabledelayedexpansion diff --git a/Makefile b/Makefile index 7e0d4f4c0c74..378c7996ed75 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,8 @@ -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + .PHONY: env env-dev lint test run doc # Dependencies need to be installed on the Anaconda virtual environment. diff --git a/README.md b/README.md index 30991c5ddf21..70a1ff73e309 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,3 @@ Ali Javadi-Abhari, Paco Martin, Diego Moreda, Jesus Perez, Erick Winston and Chr And continues to grow with the help and work of [many people](CONTRIBUTORS.md) who contribute to the project at different levels. - -## License - -This project uses the [Apache License Version 2.0 software license](https://www.apache.org/licenses/LICENSE-2.0). diff --git a/appveyor.yml b/appveyor.yml index ea47a6b98090..a0ec36d5436b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,17 +1,7 @@ -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. version: 1.0.{build} diff --git a/doc/ko/README.md b/doc/ko/README.md index 4926806fca10..72d69ff673af 100644 --- a/doc/ko/README.md +++ b/doc/ko/README.md @@ -144,9 +144,3 @@ Ali Javadi-Abhari, Paco Martin, Diego Moreda, Jesus Perez, Erick Winston and Chr And continues to grow with the help and work of [many people](https://github.com/QISKit/qiskit-core/tree/master/CONTRIBUTORS.md) who contribute to the project at different levels. - -## License - -본 프로젝트는 다음의 라이센스가 적용됩니다. [Apache License Version 2.0 software license](https://www.apache.org/licenses/LICENSE-2.0). - - diff --git a/doc/zh/README.md b/doc/zh/README.md index c7bdb3668bd3..a51b724f3cda 100644 --- a/doc/zh/README.md +++ b/doc/zh/README.md @@ -197,7 +197,3 @@ Ali Javadi-Abhari, Paco Martin, Diego Moreda, Jesus Perez, Erick Winston and Chr And continues to grow with the help and work of [many people](https://github.com/QISKit/qiskit-core/tree/master/CONTRIBUTORS.md) who contribute to the project at different levels. - -## 版权许可证 - -此项目使用了 [Apache License Version 2.0 software license](https://www.apache.org/licenses/LICENSE-2.0)。 diff --git a/examples/python/basic_optimize.py b/examples/python/basic_optimize.py index 062bec5a2b38..b9cd362fdaaf 100644 --- a/examples/python/basic_optimize.py +++ b/examples/python/basic_optimize.py @@ -1,20 +1,9 @@ -# coding=utf-8 # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Demo basic optimization: Remove Zero Rotations and Remove Double CNOTs. diff --git a/examples/python/ghz.py b/examples/python/ghz.py index 02b7c0fd3a12..c8b7059b1111 100644 --- a/examples/python/ghz.py +++ b/examples/python/ghz.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ GHZ state example illustrating mapping onto the backend. diff --git a/examples/python/initialize.py b/examples/python/initialize.py index 1017c8ffbae5..ab1fbba5e58a 100644 --- a/examples/python/initialize.py +++ b/examples/python/initialize.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Example use of the initialize gate to prepare arbitrary pure states. diff --git a/examples/python/qft.py b/examples/python/qft.py index 579c09ac178c..a729b0b10822 100644 --- a/examples/python/qft.py +++ b/examples/python/qft.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum Fourier Transform examples. diff --git a/examples/python/rippleadd-async.py b/examples/python/rippleadd-async.py index 02a7a1a237c4..cc7965256694 100644 --- a/examples/python/rippleadd-async.py +++ b/examples/python/rippleadd-async.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Ripple adder example based on Cuccaro et al., quant-ph/0410184. diff --git a/examples/python/rippleadd.py b/examples/python/rippleadd.py index a5afc73181fb..9f8b92e1c8d5 100644 --- a/examples/python/rippleadd.py +++ b/examples/python/rippleadd.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Ripple adder example based on Cuccaro et al., quant-ph/0410184. diff --git a/examples/python/teleport.py b/examples/python/teleport.py index 5fd295580b79..f3c21d8c422e 100644 --- a/examples/python/teleport.py +++ b/examples/python/teleport.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum teleportation example based on an OpenQASM example. diff --git a/examples/python/using_qiskit_core_level_0.py b/examples/python/using_qiskit_core_level_0.py index 69e1eb86c043..1f706d668921 100644 --- a/examples/python/using_qiskit_core_level_0.py +++ b/examples/python/using_qiskit_core_level_0.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Example showing how to use QISKit at level 0 (novice). diff --git a/examples/python/using_qiskit_core_level_1.py b/examples/python/using_qiskit_core_level_1.py index 07cd0b5db7cb..827ee7124127 100644 --- a/examples/python/using_qiskit_core_level_1.py +++ b/examples/python/using_qiskit_core_level_1.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Example showing how to use QISKit at level 1 (intermediate). diff --git a/qiskit/__init__.py b/qiskit/__init__.py index 93c7e292e309..6ed9d3b85deb 100644 --- a/qiskit/__init__.py +++ b/qiskit/__init__.py @@ -1,21 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=wrong-import-order -# pylint: disable=redefined-builtin -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=wrong-import-order +# pylint: disable=redefined-builtin """Main QISKit public functionality.""" diff --git a/qiskit/_classicalregister.py b/qiskit/_classicalregister.py index 3f2004c8375c..d532c2a3d1b3 100644 --- a/qiskit/_classicalregister.py +++ b/qiskit/_classicalregister.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Classical register reference object. diff --git a/qiskit/_compiler.py b/qiskit/_compiler.py index 13fe093c52ad..7d1910332c4c 100644 --- a/qiskit/_compiler.py +++ b/qiskit/_compiler.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=redefined-builtin -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=redefined-builtin """Tools for compiling a batch of quantum circuits.""" import logging diff --git a/qiskit/_compositegate.py b/qiskit/_compositegate.py index 52361afaee43..75a68d48b62c 100644 --- a/qiskit/_compositegate.py +++ b/qiskit/_compositegate.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Composite gate, a container for a sequence of unitary gates. diff --git a/qiskit/_gate.py b/qiskit/_gate.py index 91e29e1fea09..800f21a787e4 100644 --- a/qiskit/_gate.py +++ b/qiskit/_gate.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Unitary gate. diff --git a/qiskit/_instruction.py b/qiskit/_instruction.py index ae684dfac189..96ec5859c35f 100644 --- a/qiskit/_instruction.py +++ b/qiskit/_instruction.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum computer instruction. diff --git a/qiskit/_instructionset.py b/qiskit/_instructionset.py index 58b33c6fc462..1d823fbbdfb8 100644 --- a/qiskit/_instructionset.py +++ b/qiskit/_instructionset.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Instruction collection. diff --git a/qiskit/_logging.py b/qiskit/_logging.py index 385fb6d5fc50..721f9ee19660 100644 --- a/qiskit/_logging.py +++ b/qiskit/_logging.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Utilities for logging.""" import logging diff --git a/qiskit/_measure.py b/qiskit/_measure.py index 1f13db48d0d5..2fec61ba9d5b 100644 --- a/qiskit/_measure.py +++ b/qiskit/_measure.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum measurement in the computational basis. diff --git a/qiskit/_openquantumcompiler.py b/qiskit/_openquantumcompiler.py index 6cc0464d5482..32446e21d63b 100644 --- a/qiskit/_openquantumcompiler.py +++ b/qiskit/_openquantumcompiler.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=redefined-builtin -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=redefined-builtin """Tools for compiling Quantum Programs.""" from qiskit.unroll import DagUnroller, JsonBackend diff --git a/qiskit/_qiskiterror.py b/qiskit/_qiskiterror.py index 99979592eae1..c367b9f1d2ab 100644 --- a/qiskit/_qiskiterror.py +++ b/qiskit/_qiskiterror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by the QISKit SDK. diff --git a/qiskit/_quantumcircuit.py b/qiskit/_quantumcircuit.py index 2b2d17e4044e..cc0ad5c4b871 100644 --- a/qiskit/_quantumcircuit.py +++ b/qiskit/_quantumcircuit.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum circuit object. diff --git a/qiskit/_quantumjob.py b/qiskit/_quantumjob.py index b0507798dd17..4a29dd4d397e 100644 --- a/qiskit/_quantumjob.py +++ b/qiskit/_quantumjob.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=missing-param-doc,missing-type-doc -# -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=missing-param-doc,missing-type-doc """Quantum Job class""" import uuid diff --git a/qiskit/_quantumprogram.py b/qiskit/_quantumprogram.py index 33b6f3232763..5aa650ad29a8 100644 --- a/qiskit/_quantumprogram.py +++ b/qiskit/_quantumprogram.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Qasm Program Class diff --git a/qiskit/_quantumregister.py b/qiskit/_quantumregister.py index 566a4bb5e31a..1bb7da7f8777 100644 --- a/qiskit/_quantumregister.py +++ b/qiskit/_quantumregister.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum register reference object. diff --git a/qiskit/_register.py b/qiskit/_register.py index af4fa6557528..e724343a7810 100644 --- a/qiskit/_register.py +++ b/qiskit/_register.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Base register reference object. diff --git a/qiskit/_reset.py b/qiskit/_reset.py index fdb4c7cb848a..1590650fb98a 100644 --- a/qiskit/_reset.py +++ b/qiskit/_reset.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Qubit reset to computational zero. diff --git a/qiskit/_result.py b/qiskit/_result.py index a12df7b85f92..2bbc7ba50dc5 100644 --- a/qiskit/_result.py +++ b/qiskit/_result.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=no-else-return -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=no-else-return """Module for working with Results.""" diff --git a/qiskit/_resulterror.py b/qiskit/_resulterror.py index fe37ef6bdaa3..d8513f9d52f6 100644 --- a/qiskit/_resulterror.py +++ b/qiskit/_resulterror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors when there's an error in the Result diff --git a/qiskit/_util.py b/qiskit/_util.py index 75fc3567f512..886099544412 100644 --- a/qiskit/_util.py +++ b/qiskit/_util.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Common utilities for QISKit.""" import logging diff --git a/qiskit/backends/__init__.py b/qiskit/backends/__init__.py index 7537d08f33a1..71a65bcb1fa8 100644 --- a/qiskit/backends/__init__.py +++ b/qiskit/backends/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Utilities for using backends.""" from .basebackend import BaseBackend diff --git a/qiskit/backends/basebackend.py b/qiskit/backends/basebackend.py index fc136f4c0693..8a4311a522ef 100644 --- a/qiskit/backends/basebackend.py +++ b/qiskit/backends/basebackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """This module implements the abstract base class for backend modules. diff --git a/qiskit/backends/basejob.py b/qiskit/backends/basejob.py index 3ebe8d4914cd..467edac35ee6 100644 --- a/qiskit/backends/basejob.py +++ b/qiskit/backends/basejob.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """This module implements the abstract base class for backend jobs diff --git a/qiskit/backends/baseprovider.py b/qiskit/backends/baseprovider.py index ba2b26483744..ac0771c286bb 100644 --- a/qiskit/backends/baseprovider.py +++ b/qiskit/backends/baseprovider.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=redundant-returns-doc,missing-raises-doc -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=redundant-returns-doc,missing-raises-doc """Base class for a backend provider.""" diff --git a/qiskit/backends/ibmq/__init__.py b/qiskit/backends/ibmq/__init__.py index 04dd5c3629d3..ed80dec7fedc 100644 --- a/qiskit/backends/ibmq/__init__.py +++ b/qiskit/backends/ibmq/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Backends provided by IBM Quantum Experience.""" diff --git a/qiskit/backends/ibmq/ibmqbackend.py b/qiskit/backends/ibmq/ibmqbackend.py index 7bf4bce1f50f..50675f4694af 100644 --- a/qiskit/backends/ibmq/ibmqbackend.py +++ b/qiskit/backends/ibmq/ibmqbackend.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """IbmQ module This module is used for connecting to the Quantum Experience. diff --git a/qiskit/backends/ibmq/ibmqjob.py b/qiskit/backends/ibmq/ibmqjob.py index e0f81bdb523e..ad7586758ecc 100644 --- a/qiskit/backends/ibmq/ibmqjob.py +++ b/qiskit/backends/ibmq/ibmqjob.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """IBMQJob module This module is used for creating asynchronous job objects for the diff --git a/qiskit/backends/ibmq/ibmqprovider.py b/qiskit/backends/ibmq/ibmqprovider.py index 53df8a4477bc..210743904acb 100644 --- a/qiskit/backends/ibmq/ibmqprovider.py +++ b/qiskit/backends/ibmq/ibmqprovider.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Provider for remote IbmQ backends.""" from IBMQuantumExperience import IBMQuantumExperience diff --git a/qiskit/backends/local/__init__.py b/qiskit/backends/local/__init__.py index 1638820eb90f..66f1a8ffd7f5 100644 --- a/qiskit/backends/local/__init__.py +++ b/qiskit/backends/local/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Local Backends.""" diff --git a/qiskit/backends/local/_simulatorerror.py b/qiskit/backends/local/_simulatorerror.py index c3a079c817aa..ffc64c1e6048 100644 --- a/qiskit/backends/local/_simulatorerror.py +++ b/qiskit/backends/local/_simulatorerror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by simulators. diff --git a/qiskit/backends/local/_simulatortools.py b/qiskit/backends/local/_simulatortools.py index 81c6fe61af2f..e8d371d94c0e 100644 --- a/qiskit/backends/local/_simulatortools.py +++ b/qiskit/backends/local/_simulatortools.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Contains functions used by the simulators. diff --git a/qiskit/backends/local/localjob.py b/qiskit/backends/local/localjob.py index c809e1d63d37..381b701cc95c 100644 --- a/qiskit/backends/local/localjob.py +++ b/qiskit/backends/local/localjob.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """This module implements the job class used for LocalBackend objects.""" diff --git a/qiskit/backends/local/localprovider.py b/qiskit/backends/local/localprovider.py index 257dc6e81105..8d3f9d9a07a6 100644 --- a/qiskit/backends/local/localprovider.py +++ b/qiskit/backends/local/localprovider.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Provider for local backends.""" import logging diff --git a/qiskit/backends/local/qasm_simulator_cpp.py b/qiskit/backends/local/qasm_simulator_cpp.py index ff0516c068f0..06bec0d4d26f 100644 --- a/qiskit/backends/local/qasm_simulator_cpp.py +++ b/qiskit/backends/local/qasm_simulator_cpp.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Interface to C++ quantum circuit simulator with realistic noise. diff --git a/qiskit/backends/local/qasm_simulator_projectq.py b/qiskit/backends/local/qasm_simulator_projectq.py index 64816933435a..80d310487131 100644 --- a/qiskit/backends/local/qasm_simulator_projectq.py +++ b/qiskit/backends/local/qasm_simulator_projectq.py @@ -1,23 +1,13 @@ # -*- coding: utf-8 -*- -# pylint: disable=unused-import -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. -"""Backend for the Project Q C++ simulator.""" +# pylint: disable=unused-import +"""Backend for the Project Q C++ simulator.""" import time import itertools diff --git a/qiskit/backends/local/qasm_simulator_py.py b/qiskit/backends/local/qasm_simulator_py.py index db874b405ad9..02c5c15557d5 100644 --- a/qiskit/backends/local/qasm_simulator_py.py +++ b/qiskit/backends/local/qasm_simulator_py.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Contains a (slow) python simulator. diff --git a/qiskit/backends/local/statevector_simulator_cpp.py b/qiskit/backends/local/statevector_simulator_cpp.py index 64f07040cc56..ba0804978942 100644 --- a/qiskit/backends/local/statevector_simulator_cpp.py +++ b/qiskit/backends/local/statevector_simulator_cpp.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Interface to C++ quantum circuit simulator with realistic noise. diff --git a/qiskit/backends/local/statevector_simulator_py.py b/qiskit/backends/local/statevector_simulator_py.py index b2899e2145e7..8a78531c8f20 100644 --- a/qiskit/backends/local/statevector_simulator_py.py +++ b/qiskit/backends/local/statevector_simulator_py.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Contains a (slow) python statevector simulator. diff --git a/qiskit/backends/local/unitary_simulator_py.py b/qiskit/backends/local/unitary_simulator_py.py index 0ccc2bb495cf..ad59bf708f92 100644 --- a/qiskit/backends/local/unitary_simulator_py.py +++ b/qiskit/backends/local/unitary_simulator_py.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Contains a (slow) Python simulator that returns the unitary of the circuit. diff --git a/qiskit/dagcircuit/__init__.py b/qiskit/dagcircuit/__init__.py index 645fecb8e48f..132f6a7e6096 100644 --- a/qiskit/dagcircuit/__init__.py +++ b/qiskit/dagcircuit/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Module for DAG Circuits.""" from ._dagcircuit import DAGCircuit diff --git a/qiskit/dagcircuit/_dagcircuit.py b/qiskit/dagcircuit/_dagcircuit.py index d808a8863ac3..14e0a82805a8 100644 --- a/qiskit/dagcircuit/_dagcircuit.py +++ b/qiskit/dagcircuit/_dagcircuit.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Object to represent a quantum circuit as a directed acyclic graph. diff --git a/qiskit/dagcircuit/_dagcircuiterror.py b/qiskit/dagcircuit/_dagcircuiterror.py index 879c22b3cc44..e9c3850efa75 100644 --- a/qiskit/dagcircuit/_dagcircuiterror.py +++ b/qiskit/dagcircuit/_dagcircuiterror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by the DAGCircuit object. diff --git a/qiskit/extensions/__init__.py b/qiskit/extensions/__init__.py index 44012a723bd7..48025c032e53 100644 --- a/qiskit/extensions/__init__.py +++ b/qiskit/extensions/__init__.py @@ -1,17 +1,8 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Extensions to quantum circuits.""" diff --git a/qiskit/extensions/_extensionerror.py b/qiskit/extensions/_extensionerror.py index 17d3b5f6c004..dfa2422ce783 100644 --- a/qiskit/extensions/_extensionerror.py +++ b/qiskit/extensions/_extensionerror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by extensions module. diff --git a/qiskit/extensions/quantum_initializer/__init__.py b/qiskit/extensions/quantum_initializer/__init__.py index c5ccd6983821..84f31157df68 100644 --- a/qiskit/extensions/quantum_initializer/__init__.py +++ b/qiskit/extensions/quantum_initializer/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Initialize qubit registers to desired arbitrary state.""" from ._initializer import InitializeGate diff --git a/qiskit/extensions/quantum_initializer/_initializer.py b/qiskit/extensions/quantum_initializer/_initializer.py index a8d2b53e901c..6bc396169a64 100644 --- a/qiskit/extensions/quantum_initializer/_initializer.py +++ b/qiskit/extensions/quantum_initializer/_initializer.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """ Initialize qubit registers to desired arbitrary state. """ diff --git a/qiskit/extensions/simulator/__init__.py b/qiskit/extensions/simulator/__init__.py index dcd969668f32..b3b76ae72e63 100644 --- a/qiskit/extensions/simulator/__init__.py +++ b/qiskit/extensions/simulator/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """C++ qasm_simulator gates.""" from .load import load diff --git a/qiskit/extensions/simulator/load.py b/qiskit/extensions/simulator/load.py index cdbc8c442347..fe91ec02d76c 100644 --- a/qiskit/extensions/simulator/load.py +++ b/qiskit/extensions/simulator/load.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Simulator command to load a saved quantum state. diff --git a/qiskit/extensions/simulator/noise.py b/qiskit/extensions/simulator/noise.py index d080280261ca..15e2e80d0df1 100644 --- a/qiskit/extensions/simulator/noise.py +++ b/qiskit/extensions/simulator/noise.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Simulator command to toggle noise off or on. diff --git a/qiskit/extensions/simulator/save.py b/qiskit/extensions/simulator/save.py index ba8237fe3ec5..659b42442819 100644 --- a/qiskit/extensions/simulator/save.py +++ b/qiskit/extensions/simulator/save.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Simulator command to save the quantum state. diff --git a/qiskit/extensions/simulator/snapshot.py b/qiskit/extensions/simulator/snapshot.py index f6f099768277..83281c3965a1 100644 --- a/qiskit/extensions/simulator/snapshot.py +++ b/qiskit/extensions/simulator/snapshot.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Simulator command to snapshot internal simulator representation. diff --git a/qiskit/extensions/simulator/wait.py b/qiskit/extensions/simulator/wait.py index 8ff844209831..ff09348589df 100644 --- a/qiskit/extensions/simulator/wait.py +++ b/qiskit/extensions/simulator/wait.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ local_qasm_simulator single qubit wait gate. diff --git a/qiskit/extensions/standard/__init__.py b/qiskit/extensions/standard/__init__.py index 363aea52312b..76ff70a8a9c8 100644 --- a/qiskit/extensions/standard/__init__.py +++ b/qiskit/extensions/standard/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Standard gates.""" from .barrier import barrier diff --git a/qiskit/extensions/standard/barrier.py b/qiskit/extensions/standard/barrier.py index 7d3da96b1f37..3526e0b7a32b 100644 --- a/qiskit/extensions/standard/barrier.py +++ b/qiskit/extensions/standard/barrier.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Barrier instruction. diff --git a/qiskit/extensions/standard/ccx.py b/qiskit/extensions/standard/ccx.py index b37789580cc5..fa2e35a55e77 100644 --- a/qiskit/extensions/standard/ccx.py +++ b/qiskit/extensions/standard/ccx.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Toffoli gate. Controlled-Controlled-X. diff --git a/qiskit/extensions/standard/ch.py b/qiskit/extensions/standard/ch.py index 77545c97edc6..7f768b92a0ec 100644 --- a/qiskit/extensions/standard/ch.py +++ b/qiskit/extensions/standard/ch.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ controlled-H gate. diff --git a/qiskit/extensions/standard/crz.py b/qiskit/extensions/standard/crz.py index f12a3a2745e0..0ab8815f57c9 100644 --- a/qiskit/extensions/standard/crz.py +++ b/qiskit/extensions/standard/crz.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ controlled-rz gate. diff --git a/qiskit/extensions/standard/cswap.py b/qiskit/extensions/standard/cswap.py index 0a998456f9a7..7b7fa26be1c5 100644 --- a/qiskit/extensions/standard/cswap.py +++ b/qiskit/extensions/standard/cswap.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Fredkin gate. Controlled-SWAP. diff --git a/qiskit/extensions/standard/cu1.py b/qiskit/extensions/standard/cu1.py index d0a9ea9361de..5d1b02456bb4 100644 --- a/qiskit/extensions/standard/cu1.py +++ b/qiskit/extensions/standard/cu1.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ controlled-u1 gate. diff --git a/qiskit/extensions/standard/cu3.py b/qiskit/extensions/standard/cu3.py index 33c815183a5b..8199175a4972 100644 --- a/qiskit/extensions/standard/cu3.py +++ b/qiskit/extensions/standard/cu3.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ controlled-u3 gate. diff --git a/qiskit/extensions/standard/cx.py b/qiskit/extensions/standard/cx.py index 58caebf87ee4..31940d8e51b1 100644 --- a/qiskit/extensions/standard/cx.py +++ b/qiskit/extensions/standard/cx.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ controlled-NOT gate. diff --git a/qiskit/extensions/standard/cxbase.py b/qiskit/extensions/standard/cxbase.py index 7e29a326c6a4..4d31b6b7c9eb 100644 --- a/qiskit/extensions/standard/cxbase.py +++ b/qiskit/extensions/standard/cxbase.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Fundamental controlled-NOT gate. diff --git a/qiskit/extensions/standard/cy.py b/qiskit/extensions/standard/cy.py index 642bccff11ea..51ae09d03c78 100644 --- a/qiskit/extensions/standard/cy.py +++ b/qiskit/extensions/standard/cy.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ controlled-Y gate. diff --git a/qiskit/extensions/standard/cz.py b/qiskit/extensions/standard/cz.py index 44ad1e874427..85bdd644f4a0 100644 --- a/qiskit/extensions/standard/cz.py +++ b/qiskit/extensions/standard/cz.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name + """ controlled-Phase gate. """ diff --git a/qiskit/extensions/standard/gatestools.py b/qiskit/extensions/standard/gatestools.py index 2c5ed8b97bde..13519e60ee47 100644 --- a/qiskit/extensions/standard/gatestools.py +++ b/qiskit/extensions/standard/gatestools.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name + """Gates tools.""" from qiskit import InstructionSet diff --git a/qiskit/extensions/standard/h.py b/qiskit/extensions/standard/h.py index 2cad56e44a41..1144e8dc9b35 100644 --- a/qiskit/extensions/standard/h.py +++ b/qiskit/extensions/standard/h.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Hadamard gate. diff --git a/qiskit/extensions/standard/header.py b/qiskit/extensions/standard/header.py index 0d1ad13301f9..3adda1d46a13 100644 --- a/qiskit/extensions/standard/header.py +++ b/qiskit/extensions/standard/header.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Standard extension's OPENQASM header and definition update. diff --git a/qiskit/extensions/standard/iden.py b/qiskit/extensions/standard/iden.py index 3956c931d142..e400111f4773 100644 --- a/qiskit/extensions/standard/iden.py +++ b/qiskit/extensions/standard/iden.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Identity gate. diff --git a/qiskit/extensions/standard/rx.py b/qiskit/extensions/standard/rx.py index 6ea63c5b95e8..deccdea48e0d 100644 --- a/qiskit/extensions/standard/rx.py +++ b/qiskit/extensions/standard/rx.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Rotation around the x-axis. diff --git a/qiskit/extensions/standard/ry.py b/qiskit/extensions/standard/ry.py index 703f02c919f4..fd444662671a 100644 --- a/qiskit/extensions/standard/ry.py +++ b/qiskit/extensions/standard/ry.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Rotation around the y-axis. diff --git a/qiskit/extensions/standard/rz.py b/qiskit/extensions/standard/rz.py index c63e7bc79365..873339f012d6 100644 --- a/qiskit/extensions/standard/rz.py +++ b/qiskit/extensions/standard/rz.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Rotation around the z-axis. diff --git a/qiskit/extensions/standard/rzz.py b/qiskit/extensions/standard/rzz.py index 7900d9a40824..28b21e8c6c4a 100644 --- a/qiskit/extensions/standard/rzz.py +++ b/qiskit/extensions/standard/rzz.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ two-qubit ZZ-rotation gate. diff --git a/qiskit/extensions/standard/s.py b/qiskit/extensions/standard/s.py index 15b53a501cce..a961816cb20d 100644 --- a/qiskit/extensions/standard/s.py +++ b/qiskit/extensions/standard/s.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ S=diag(1,i) Clifford phase gate or its inverse. diff --git a/qiskit/extensions/standard/swap.py b/qiskit/extensions/standard/swap.py index 4e2a7b0deb4a..1e2ada20681b 100644 --- a/qiskit/extensions/standard/swap.py +++ b/qiskit/extensions/standard/swap.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ SWAP gate. diff --git a/qiskit/extensions/standard/t.py b/qiskit/extensions/standard/t.py index 5bd2f332dddf..80f6b718c23d 100644 --- a/qiskit/extensions/standard/t.py +++ b/qiskit/extensions/standard/t.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ T=sqrt(S) phase gate or its inverse. diff --git a/qiskit/extensions/standard/u0.py b/qiskit/extensions/standard/u0.py index 0e77b7acb95f..052f3a5ee37c 100644 --- a/qiskit/extensions/standard/u0.py +++ b/qiskit/extensions/standard/u0.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Single qubit gate cycle idle. diff --git a/qiskit/extensions/standard/u1.py b/qiskit/extensions/standard/u1.py index 8f2a5d2d416b..df213c27e3ec 100644 --- a/qiskit/extensions/standard/u1.py +++ b/qiskit/extensions/standard/u1.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Diagonal single qubit gate. diff --git a/qiskit/extensions/standard/u2.py b/qiskit/extensions/standard/u2.py index 2ac68a880bda..87702d9e962e 100644 --- a/qiskit/extensions/standard/u2.py +++ b/qiskit/extensions/standard/u2.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ One-pulse single-qubit gate. diff --git a/qiskit/extensions/standard/u3.py b/qiskit/extensions/standard/u3.py index 8bf35bf0fe9f..5346ed9d5667 100644 --- a/qiskit/extensions/standard/u3.py +++ b/qiskit/extensions/standard/u3.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Two-pulse single-qubit gate. diff --git a/qiskit/extensions/standard/ubase.py b/qiskit/extensions/standard/ubase.py index 9934f8e871ad..e8467127624f 100644 --- a/qiskit/extensions/standard/ubase.py +++ b/qiskit/extensions/standard/ubase.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Element of SU(2). diff --git a/qiskit/extensions/standard/x.py b/qiskit/extensions/standard/x.py index a461ec274c12..5dd394565cfe 100644 --- a/qiskit/extensions/standard/x.py +++ b/qiskit/extensions/standard/x.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Pauli X (bit-flip) gate. diff --git a/qiskit/extensions/standard/y.py b/qiskit/extensions/standard/y.py index 7b377d26ec0c..1762a6ab4af4 100644 --- a/qiskit/extensions/standard/y.py +++ b/qiskit/extensions/standard/y.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Pauli Y (bit-phase-flip) gate. diff --git a/qiskit/extensions/standard/z.py b/qiskit/extensions/standard/z.py index dfdc5559c868..8f0fca3f3879 100644 --- a/qiskit/extensions/standard/z.py +++ b/qiskit/extensions/standard/z.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Pauli Z (phase-flip) gate. diff --git a/qiskit/mapper/__init__.py b/qiskit/mapper/__init__.py index 79a004f3204d..027e598fbf74 100644 --- a/qiskit/mapper/__init__.py +++ b/qiskit/mapper/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Utils for mapping.""" diff --git a/qiskit/mapper/_compiling.py b/qiskit/mapper/_compiling.py index e37651f476e9..bac58c75032c 100644 --- a/qiskit/mapper/_compiling.py +++ b/qiskit/mapper/_compiling.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Methods to assist with compiling tasks. diff --git a/qiskit/mapper/_coupling.py b/qiskit/mapper/_coupling.py index 61f72732f683..ad1ad0931d7a 100644 --- a/qiskit/mapper/_coupling.py +++ b/qiskit/mapper/_coupling.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Directed graph object for representing coupling between qubits. diff --git a/qiskit/mapper/_couplingerror.py b/qiskit/mapper/_couplingerror.py index 66cc9bbaf424..68864727e882 100644 --- a/qiskit/mapper/_couplingerror.py +++ b/qiskit/mapper/_couplingerror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by the Coupling object. diff --git a/qiskit/mapper/_mappererror.py b/qiskit/mapper/_mappererror.py index fb1e13519341..71dad4ac1be1 100644 --- a/qiskit/mapper/_mappererror.py +++ b/qiskit/mapper/_mappererror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by mapper module. diff --git a/qiskit/mapper/_mapping.py b/qiskit/mapper/_mapping.py index adaa649ed98f..60b072dff03a 100644 --- a/qiskit/mapper/_mapping.py +++ b/qiskit/mapper/_mapping.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name, inconsistent-return-statements -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name, inconsistent-return-statements """ Layout module to assist with mapping circuit qubits onto physical qubits. diff --git a/qiskit/qasm/__init__.py b/qiskit/qasm/__init__.py index 00e7a2169d71..5cfb933934b5 100644 --- a/qiskit/qasm/__init__.py +++ b/qiskit/qasm/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Tools for QASM. diff --git a/qiskit/qasm/_node/__init__.py b/qiskit/qasm/_node/__init__.py index d64672b2beec..01ee90cddbbe 100644 --- a/qiskit/qasm/_node/__init__.py +++ b/qiskit/qasm/_node/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """QASM nodes.""" from ._barrier import Barrier diff --git a/qiskit/qasm/_node/_barrier.py b/qiskit/qasm/_node/_barrier.py index b01848f464d5..95aae110fccf 100644 --- a/qiskit/qasm/_node/_barrier.py +++ b/qiskit/qasm/_node/_barrier.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM barrier statement. diff --git a/qiskit/qasm/_node/_binaryop.py b/qiskit/qasm/_node/_binaryop.py index fef3c5892ba9..5fb258b81e38 100644 --- a/qiskit/qasm/_node/_binaryop.py +++ b/qiskit/qasm/_node/_binaryop.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM binary operation expression. diff --git a/qiskit/qasm/_node/_binaryoperator.py b/qiskit/qasm/_node/_binaryoperator.py index 8117d7c052c0..31e4115355c1 100644 --- a/qiskit/qasm/_node/_binaryoperator.py +++ b/qiskit/qasm/_node/_binaryoperator.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM binary operator. diff --git a/qiskit/qasm/_node/_cnot.py b/qiskit/qasm/_node/_cnot.py index c0de9ec7fa5c..c8cfe9c292a9 100644 --- a/qiskit/qasm/_node/_cnot.py +++ b/qiskit/qasm/_node/_cnot.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM CNOT statement. diff --git a/qiskit/qasm/_node/_creg.py b/qiskit/qasm/_node/_creg.py index 5890fc82aeff..b777baab62a9 100644 --- a/qiskit/qasm/_node/_creg.py +++ b/qiskit/qasm/_node/_creg.py @@ -1,19 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM creg statement. diff --git a/qiskit/qasm/_node/_customunitary.py b/qiskit/qasm/_node/_customunitary.py index cedcf48bb3e7..f5518cf59af9 100644 --- a/qiskit/qasm/_node/_customunitary.py +++ b/qiskit/qasm/_node/_customunitary.py @@ -1,19 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM custom gate statement. diff --git a/qiskit/qasm/_node/_expressionlist.py b/qiskit/qasm/_node/_expressionlist.py index 11a4d25e3640..8f3c41efe7a6 100644 --- a/qiskit/qasm/_node/_expressionlist.py +++ b/qiskit/qasm/_node/_expressionlist.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM expression list. diff --git a/qiskit/qasm/_node/_external.py b/qiskit/qasm/_node/_external.py index eebc3c71e88a..3968db05e0f9 100644 --- a/qiskit/qasm/_node/_external.py +++ b/qiskit/qasm/_node/_external.py @@ -1,19 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM external function. diff --git a/qiskit/qasm/_node/_format.py b/qiskit/qasm/_node/_format.py index 54a2e0b823d0..922a746e12ce 100644 --- a/qiskit/qasm/_node/_format.py +++ b/qiskit/qasm/_node/_format.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM file identifier/version statement. diff --git a/qiskit/qasm/_node/_gate.py b/qiskit/qasm/_node/_gate.py index 47b33bd2be5e..826017b0ca36 100644 --- a/qiskit/qasm/_node/_gate.py +++ b/qiskit/qasm/_node/_gate.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM gate definition. diff --git a/qiskit/qasm/_node/_gatebody.py b/qiskit/qasm/_node/_gatebody.py index 228f0e6a4933..9bf5cbae5782 100644 --- a/qiskit/qasm/_node/_gatebody.py +++ b/qiskit/qasm/_node/_gatebody.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM custom gate body. diff --git a/qiskit/qasm/_node/_id.py b/qiskit/qasm/_node/_id.py index b7c930c7ca49..5b3b7c263b97 100644 --- a/qiskit/qasm/_node/_id.py +++ b/qiskit/qasm/_node/_id.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM id. diff --git a/qiskit/qasm/_node/_idlist.py b/qiskit/qasm/_node/_idlist.py index 5697ad0aad0b..ddebd0588181 100644 --- a/qiskit/qasm/_node/_idlist.py +++ b/qiskit/qasm/_node/_idlist.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM idlist. diff --git a/qiskit/qasm/_node/_if.py b/qiskit/qasm/_node/_if.py index 1b34b1d2eea2..075e590e7ba4 100644 --- a/qiskit/qasm/_node/_if.py +++ b/qiskit/qasm/_node/_if.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM if statement. diff --git a/qiskit/qasm/_node/_indexedid.py b/qiskit/qasm/_node/_indexedid.py index fc87aadf35a1..729119bb6974 100644 --- a/qiskit/qasm/_node/_indexedid.py +++ b/qiskit/qasm/_node/_indexedid.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM indexed id. diff --git a/qiskit/qasm/_node/_intnode.py b/qiskit/qasm/_node/_intnode.py index c401113dab4b..d8195145f97d 100644 --- a/qiskit/qasm/_node/_intnode.py +++ b/qiskit/qasm/_node/_intnode.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM integer. diff --git a/qiskit/qasm/_node/_measure.py b/qiskit/qasm/_node/_measure.py index 0233637afed5..0b10dc52da16 100644 --- a/qiskit/qasm/_node/_measure.py +++ b/qiskit/qasm/_node/_measure.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM measure statement. diff --git a/qiskit/qasm/_node/_node.py b/qiskit/qasm/_node/_node.py index 4ef846024e3f..52b9def21826 100644 --- a/qiskit/qasm/_node/_node.py +++ b/qiskit/qasm/_node/_node.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Base node object for the OPENQASM syntax tree. diff --git a/qiskit/qasm/_node/_nodeexception.py b/qiskit/qasm/_node/_nodeexception.py index b26b58200229..b42fe5b7e6fd 100644 --- a/qiskit/qasm/_node/_nodeexception.py +++ b/qiskit/qasm/_node/_nodeexception.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised while interpreting nodes. diff --git a/qiskit/qasm/_node/_opaque.py b/qiskit/qasm/_node/_opaque.py index 5a9dccacc9b3..1d826d99bcdf 100644 --- a/qiskit/qasm/_node/_opaque.py +++ b/qiskit/qasm/_node/_opaque.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM opaque gate declaration. diff --git a/qiskit/qasm/_node/_prefix.py b/qiskit/qasm/_node/_prefix.py index fae5fb4a1b74..f2ce9722dc33 100644 --- a/qiskit/qasm/_node/_prefix.py +++ b/qiskit/qasm/_node/_prefix.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM prefix expression. diff --git a/qiskit/qasm/_node/_primarylist.py b/qiskit/qasm/_node/_primarylist.py index f446fc70abfe..2241b5f29cb4 100644 --- a/qiskit/qasm/_node/_primarylist.py +++ b/qiskit/qasm/_node/_primarylist.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM primarylist. diff --git a/qiskit/qasm/_node/_program.py b/qiskit/qasm/_node/_program.py index 503e8be1333b..dc870adf6a1b 100644 --- a/qiskit/qasm/_node/_program.py +++ b/qiskit/qasm/_node/_program.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM program. diff --git a/qiskit/qasm/_node/_qreg.py b/qiskit/qasm/_node/_qreg.py index ee3989dafec3..7d2bce678561 100644 --- a/qiskit/qasm/_node/_qreg.py +++ b/qiskit/qasm/_node/_qreg.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """ Node for an OPENQASM qreg statement. diff --git a/qiskit/qasm/_node/_real.py b/qiskit/qasm/_node/_real.py index 0d7e3865a43b..b8a30e4c03ba 100644 --- a/qiskit/qasm/_node/_real.py +++ b/qiskit/qasm/_node/_real.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM real number. diff --git a/qiskit/qasm/_node/_reset.py b/qiskit/qasm/_node/_reset.py index 050e4fdde22d..a821ecafa7ad 100644 --- a/qiskit/qasm/_node/_reset.py +++ b/qiskit/qasm/_node/_reset.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM reset statement. diff --git a/qiskit/qasm/_node/_unaryoperator.py b/qiskit/qasm/_node/_unaryoperator.py index 4fac06146d14..7635e5cddb61 100644 --- a/qiskit/qasm/_node/_unaryoperator.py +++ b/qiskit/qasm/_node/_unaryoperator.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM unary operator. diff --git a/qiskit/qasm/_node/_universalunitary.py b/qiskit/qasm/_node/_universalunitary.py index 4c2205906001..29d7da500329 100644 --- a/qiskit/qasm/_node/_universalunitary.py +++ b/qiskit/qasm/_node/_universalunitary.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Node for an OPENQASM U statement. diff --git a/qiskit/qasm/_qasm.py b/qiskit/qasm/_qasm.py index d0efc099fd0b..5d45518fcb35 100644 --- a/qiskit/qasm/_qasm.py +++ b/qiskit/qasm/_qasm.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ OPENQASM circuit object. diff --git a/qiskit/qasm/_qasmerror.py b/qiskit/qasm/_qasmerror.py index a577cd1aeef9..1e95a4a5eb9e 100644 --- a/qiskit/qasm/_qasmerror.py +++ b/qiskit/qasm/_qasmerror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised while parsing OPENQASM. diff --git a/qiskit/qasm/_qasmlexer.py b/qiskit/qasm/_qasmlexer.py index 78e087ce1955..6509ca6940ab 100644 --- a/qiskit/qasm/_qasmlexer.py +++ b/qiskit/qasm/_qasmlexer.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ OPENQASM Lexer. diff --git a/qiskit/qasm/_qasmparser.py b/qiskit/qasm/_qasmparser.py index 7dd23e3bdaa2..eac04ecca136 100644 --- a/qiskit/qasm/_qasmparser.py +++ b/qiskit/qasm/_qasmparser.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ OPENQASM parser. diff --git a/qiskit/tools/apps/fermion.py b/qiskit/tools/apps/fermion.py index 3a17b5694d2a..1bb53d53c6f2 100644 --- a/qiskit/tools/apps/fermion.py +++ b/qiskit/tools/apps/fermion.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """ A set of functions to map fermionic Hamiltonians to qubit Hamiltonians. diff --git a/qiskit/tools/apps/optimization.py b/qiskit/tools/apps/optimization.py index 62443d75631d..ae3cb85f724f 100644 --- a/qiskit/tools/apps/optimization.py +++ b/qiskit/tools/apps/optimization.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=unused-import,invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=unused-import,invalid-name + """ These are tools that are used in the classical optimization and chemistry tutorials diff --git a/qiskit/tools/file_io.py b/qiskit/tools/file_io.py index e434c93e6e12..99f8822fae2e 100644 --- a/qiskit/tools/file_io.py +++ b/qiskit/tools/file_io.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Utilities for File Input/Output.""" import copy diff --git a/qiskit/tools/qcvv/fitters.py b/qiskit/tools/qcvv/fitters.py index fd00de3b7085..e92452eedf45 100644 --- a/qiskit/tools/qcvv/fitters.py +++ b/qiskit/tools/qcvv/fitters.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """ Basic plotting methods using matplotlib. diff --git a/qiskit/tools/qcvv/tomography.py b/qiskit/tools/qcvv/tomography.py index af94ffcd489e..a0aab45889ad 100644 --- a/qiskit/tools/qcvv/tomography.py +++ b/qiskit/tools/qcvv/tomography.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name + """ Quantum Tomography Module diff --git a/qiskit/tools/qi/pauli.py b/qiskit/tools/qi/pauli.py index 8351efe8f6e6..0922f5d78c3a 100644 --- a/qiskit/tools/qi/pauli.py +++ b/qiskit/tools/qi/pauli.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name + """ Tools for working with Pauli Operators. diff --git a/qiskit/tools/qi/qi.py b/qiskit/tools/qi/qi.py index 2bd62facddb6..7171ad26aa04 100644 --- a/qiskit/tools/qi/qi.py +++ b/qiskit/tools/qi/qi.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,anomalous-backslash-in-string -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,anomalous-backslash-in-string + """ A collection of useful quantum information functions. diff --git a/qiskit/tools/visualization.py b/qiskit/tools/visualization.py index c1acea6788b0..e44dc492f6b2 100644 --- a/qiskit/tools/visualization.py +++ b/qiskit/tools/visualization.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,anomalous-backslash-in-string -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,anomalous-backslash-in-string + """ Visualization functions for quantum states. """ diff --git a/qiskit/unroll/__init__.py b/qiskit/unroll/__init__.py index 8824cecc5cd0..2e4ad0964091 100644 --- a/qiskit/unroll/__init__.py +++ b/qiskit/unroll/__init__.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Unroll QASM and different backends.""" from ._backenderror import BackendError diff --git a/qiskit/unroll/_backenderror.py b/qiskit/unroll/_backenderror.py index 21efd8426406..0d1094c0b560 100644 --- a/qiskit/unroll/_backenderror.py +++ b/qiskit/unroll/_backenderror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by unroller backends. diff --git a/qiskit/unroll/_circuitbackend.py b/qiskit/unroll/_circuitbackend.py index 301c0d45bbfc..42d5278a99a5 100644 --- a/qiskit/unroll/_circuitbackend.py +++ b/qiskit/unroll/_circuitbackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Backend for the unroller that produces a QuantumCircuit. diff --git a/qiskit/unroll/_dagbackend.py b/qiskit/unroll/_dagbackend.py index 5826ef3be2cc..198dc0e0ec82 100644 --- a/qiskit/unroll/_dagbackend.py +++ b/qiskit/unroll/_dagbackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Backend for the unroller that creates a DAGCircuit object. diff --git a/qiskit/unroll/_dagunroller.py b/qiskit/unroll/_dagunroller.py index 337fb27f8293..58f7435b20a8 100644 --- a/qiskit/unroll/_dagunroller.py +++ b/qiskit/unroll/_dagunroller.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ DAG Unroller diff --git a/qiskit/unroll/_jsonbackend.py b/qiskit/unroll/_jsonbackend.py index faa6ea2f9b16..90b8136710d4 100644 --- a/qiskit/unroll/_jsonbackend.py +++ b/qiskit/unroll/_jsonbackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Backend for the unroller that composes qasm into json file. diff --git a/qiskit/unroll/_printerbackend.py b/qiskit/unroll/_printerbackend.py index 2d476c23dff5..68c944a43848 100644 --- a/qiskit/unroll/_printerbackend.py +++ b/qiskit/unroll/_printerbackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Backend for the unroller that prints OpenQASM. diff --git a/qiskit/unroll/_unroller.py b/qiskit/unroll/_unroller.py index baefb9a6f5b8..74319a279ddb 100644 --- a/qiskit/unroll/_unroller.py +++ b/qiskit/unroll/_unroller.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ OPENQASM interpreter. diff --git a/qiskit/unroll/_unrollerbackend.py b/qiskit/unroll/_unrollerbackend.py index 16483bd5ead3..9944a3220e3d 100644 --- a/qiskit/unroll/_unrollerbackend.py +++ b/qiskit/unroll/_unrollerbackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Base backend object for the unroller that raises BackendError. diff --git a/qiskit/unroll/_unrollererror.py b/qiskit/unroll/_unrollererror.py index 4cd86f904c3b..cccf211152b3 100644 --- a/qiskit/unroll/_unrollererror.py +++ b/qiskit/unroll/_unrollererror.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Exception for errors raised by unroller. diff --git a/qiskit/wrapper/__init__.py b/qiskit/wrapper/__init__.py index 714252c669d2..ce8a66f91ce5 100644 --- a/qiskit/wrapper/__init__.py +++ b/qiskit/wrapper/__init__.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=redefined-builtin -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=redefined-builtin + """Helper module for simplified QISKit usage. The functions in this module provide convenience helpers for accessing commonly diff --git a/qiskit/wrapper/_wrapper.py b/qiskit/wrapper/_wrapper.py index 14d783970fda..1429075635d2 100644 --- a/qiskit/wrapper/_wrapper.py +++ b/qiskit/wrapper/_wrapper.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Helper module for simplified QISKit usage.""" import os diff --git a/qiskit/wrapper/defaultqiskitprovider.py b/qiskit/wrapper/defaultqiskitprovider.py index 21725d591bc7..3d16aabde229 100644 --- a/qiskit/wrapper/defaultqiskitprovider.py +++ b/qiskit/wrapper/defaultqiskitprovider.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """Meta-provider that aggregates several providers.""" import logging diff --git a/setup.py.in b/setup.py.in index a919f6a2b8fc..74573fb2ab33 100755 --- a/setup.py.in +++ b/setup.py.in @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. import sys import os diff --git a/src/qasm-simulator-cpp/README.md b/src/qasm-simulator-cpp/README.md index 5c1058926806..d9dc58af24f0 100644 --- a/src/qasm-simulator-cpp/README.md +++ b/src/qasm-simulator-cpp/README.md @@ -2,7 +2,7 @@ ## A C++ quantum circuit simulator with realistic noise -Copyright (c) 2017 IBM Corporation. All Rights Reserved. +Copyright 2017, IBM. ### Authors @@ -589,15 +589,3 @@ An example of a configuration file for a 2-qubit circuit using all options is gi ## Acknowledgements The development and implementation of approximate noise models in this software was funded by the Intelligence Advanced Research Projects Activity (IARPA), via the Army Research Office contract W911NF-16-1-0114. - -## License - -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](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/src/qasm-simulator-cpp/src/backends/base_backend.hpp b/src/qasm-simulator-cpp/src/backends/base_backend.hpp index dc0d8698d2b7..cea04bad0e5f 100644 --- a/src/qasm-simulator-cpp/src/backends/base_backend.hpp +++ b/src/qasm-simulator-cpp/src/backends/base_backend.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file base_backend.hpp @@ -206,7 +197,7 @@ template class BaseBackend { * Number of threads to use for inner parallelization. */ int num_threads = 1; - + /** * Stores the state of measured classical registers in a QISKIT program. All * bits are initialized in the 0 state, and any unmeasured bits will hence diff --git a/src/qasm-simulator-cpp/src/backends/clifford_backend.hpp b/src/qasm-simulator-cpp/src/backends/clifford_backend.hpp index 501033c44006..dd10c60f24ec 100644 --- a/src/qasm-simulator-cpp/src/backends/clifford_backend.hpp +++ b/src/qasm-simulator-cpp/src/backends/clifford_backend.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file clifford_backend.hpp diff --git a/src/qasm-simulator-cpp/src/backends/ideal_backend.hpp b/src/qasm-simulator-cpp/src/backends/ideal_backend.hpp index 61d306240270..9650855a2f61 100644 --- a/src/qasm-simulator-cpp/src/backends/ideal_backend.hpp +++ b/src/qasm-simulator-cpp/src/backends/ideal_backend.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file ideal_backend.hpp @@ -303,7 +294,7 @@ const gateset_t IdealBackend::gateset({// Core gates {"wait", gate_t::Wait}, {"snapshot", gate_t::Snapshot}, {"noise", gate_t::Noise}, - {"save", gate_t::Save}, + {"save", gate_t::Save}, {"load", gate_t::Load}}); //------------------------------------------------------------------------------ @@ -452,7 +443,7 @@ void IdealBackend::qc_measure(const uint_t qubit, const uint_t cbit) { const std::pair meas = qc_measure_outcome(qubit); creg[cbit] = meas.first; // Update register outcome - // Implement measurement + // Implement measurement cvector_t mdiag(2, 0.); mdiag[meas.first] = 1. / std::sqrt(meas.second); qreg.apply_matrix(qubit, mdiag); @@ -464,7 +455,7 @@ std::pair IdealBackend::qc_measure_outcome(const uint_t qubit) { double p0 = qreg.probability(qubit, 0); rvector_t probs = {p0, 1. - p0}; // randomly pick outcome - const uint_t n = rng.rand_int(probs); + const uint_t n = rng.rand_int(probs); return std::pair(n, probs[n]); } @@ -479,7 +470,7 @@ void IdealBackend::qc_reset(const uint_t qubit, const uint_t state) { std::clog << ss.str() << std::endl; #endif // Simulate unobserved measurement - const std::pair meas = qc_measure_outcome(qubit); + const std::pair meas = qc_measure_outcome(qubit); cvector_t mdiag(2, 0.); mdiag[meas.first] = 1. / std::sqrt(meas.second); qreg.apply_matrix(qubit, mdiag); diff --git a/src/qasm-simulator-cpp/src/backends/noise_models.hpp b/src/qasm-simulator-cpp/src/backends/noise_models.hpp index 05264af16b56..5bc706c373f3 100644 --- a/src/qasm-simulator-cpp/src/backends/noise_models.hpp +++ b/src/qasm-simulator-cpp/src/backends/noise_models.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file noise_models.hpp diff --git a/src/qasm-simulator-cpp/src/backends/qubit_backend.hpp b/src/qasm-simulator-cpp/src/backends/qubit_backend.hpp index 7d9cdd718dc0..cada313d4334 100644 --- a/src/qasm-simulator-cpp/src/backends/qubit_backend.hpp +++ b/src/qasm-simulator-cpp/src/backends/qubit_backend.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file qubit_backend.hpp @@ -290,7 +281,7 @@ void QubitBackend::qc_measure(const uint_t qubit, const uint_t cbit) { ? measure_error(meas.first) : meas.first; - // Implement measurement + // Implement measurement cvector_t mdiag(2, 0.); mdiag[meas.first] = 1. / std::sqrt(meas.second); qreg.apply_matrix(qubit, mdiag); diff --git a/src/qasm-simulator-cpp/src/backends/rng_engine.hpp b/src/qasm-simulator-cpp/src/backends/rng_engine.hpp index 608370353eea..64d8c3ee3499 100644 --- a/src/qasm-simulator-cpp/src/backends/rng_engine.hpp +++ b/src/qasm-simulator-cpp/src/backends/rng_engine.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file rng_engine.hpp diff --git a/src/qasm-simulator-cpp/src/engines/base_engine.hpp b/src/qasm-simulator-cpp/src/engines/base_engine.hpp index c3fe73ede38c..5d521c31475e 100644 --- a/src/qasm-simulator-cpp/src/engines/base_engine.hpp +++ b/src/qasm-simulator-cpp/src/engines/base_engine.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file default_engine.hpp @@ -36,7 +27,7 @@ namespace QISKIT { * This base class implements basic computation of simulator results for the * BaseBackend class and subclasses. This includes getting the bitstring values * from the classical register and basic functions for recording the final - * quantum state, classical state, and snapshots of the quantum state, for each + * quantum state, classical state, and snapshots of the quantum state, for each * shot of the simulation. * * This is done using default JSON conversion for the StateType, so if no such @@ -83,7 +74,7 @@ template class BaseEngine { // Quantum state snapshots std::map> snapshots; // final qreg state for each shot - + // Classical states std::vector output_creg; // creg string for each shot @@ -259,7 +250,7 @@ inline void to_json(json_t &js, const BaseEngine &engine) { js["classical_state"] = engine.output_creg; if (engine.show_snapshots && engine.snapshots.empty() == false) { - + try { // use try incase state class doesn't have json conversion method for (const auto& pair: engine.snapshots) diff --git a/src/qasm-simulator-cpp/src/engines/vector_engine.hpp b/src/qasm-simulator-cpp/src/engines/vector_engine.hpp index b8eea1e50859..111f699b5183 100644 --- a/src/qasm-simulator-cpp/src/engines/vector_engine.hpp +++ b/src/qasm-simulator-cpp/src/engines/vector_engine.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file state_vector_engine.hpp @@ -48,7 +39,7 @@ namespace QISKIT { * shot * - The inner product with a set of target states of the snapshoted quantum states * of the system for each shot. - * - The expectation values of a set of target states of the snapshoted quantum + * - The expectation values of a set of target states of the snapshoted quantum * states of the system averaged over shots. * ******************************************************************************/ @@ -201,7 +192,7 @@ void VectorEngine::execute(const Circuit &prog, BaseBackend *be, meas_qubits.push_back(op.qubits[0]); // sort the qubits and delete duplicates - sort(meas_qubits.begin(),meas_qubits.end()); + sort(meas_qubits.begin(),meas_qubits.end()); meas_qubits.erase(unique(meas_qubits.begin(), meas_qubits.end() ), meas_qubits.end()); // Allow option to get probabilities in place be overwriting QubitVector @@ -227,7 +218,7 @@ void VectorEngine::execute(const Circuit &prog, BaseBackend *be, // Templated so works for real or complex probability vector template void VectorEngine::sample_counts(const Circuit &prog, BaseBackend *be, uint_t nshots, - const std::vector &probs, const std::vector &meas, + const std::vector &probs, const std::vector &meas, const std::vector &meas_qubits) { // Map to store measured outcome after std::map outcomes; diff --git a/src/qasm-simulator-cpp/src/main.cpp b/src/qasm-simulator-cpp/src/main.cpp index 218e38b021ab..49138f5d4195 100644 --- a/src/qasm-simulator-cpp/src/main.cpp +++ b/src/qasm-simulator-cpp/src/main.cpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file main.cpp diff --git a/src/qasm-simulator-cpp/src/simulator.hpp b/src/qasm-simulator-cpp/src/simulator.hpp index 812adefe558d..70070bee00f9 100644 --- a/src/qasm-simulator-cpp/src/simulator.hpp +++ b/src/qasm-simulator-cpp/src/simulator.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file simulator.hpp @@ -84,12 +75,12 @@ class Simulator { // Initialize a simulator from a qobj void load_qobj_json(const json_t &input); - + inline void load_qobj_file(const std::string file) { json_t js = JSON::load(file); load_qobj_json(js); }; - + inline void load_qobj_string(const std::string &input) { json_t js = json_t::parse(input); load_qobj_json(js); @@ -130,7 +121,7 @@ json_t Simulator::execute_json(){ circ_res = run_circuit(circ); else circ_res = run_circuit(circ); - + // Check results qobj_success &= circ_res["success"].get(); ret["result"].push_back(circ_res); @@ -237,7 +228,7 @@ json_t Simulator::run_circuit(Circuit &circ) const { backend.set_rng_seed(rng_seed); engine.run_program(circ, &backend, circ.shots); #endif - + // Return results ret["data"] = engine; // add engine output to return diff --git a/src/qasm-simulator-cpp/src/utilities/binary_vector.hpp b/src/qasm-simulator-cpp/src/utilities/binary_vector.hpp index 3ced9637882a..47f97e07258c 100644 --- a/src/qasm-simulator-cpp/src/utilities/binary_vector.hpp +++ b/src/qasm-simulator-cpp/src/utilities/binary_vector.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file BinaryVector.hpp @@ -30,7 +21,7 @@ limitations under the License. #include namespace BV { - + // Types using uint_t = uint64_t; diff --git a/src/qasm-simulator-cpp/src/utilities/circuit.hpp b/src/qasm-simulator-cpp/src/utilities/circuit.hpp index b7e3c46d150b..424de36f3c6f 100644 --- a/src/qasm-simulator-cpp/src/utilities/circuit.hpp +++ b/src/qasm-simulator-cpp/src/utilities/circuit.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file circuit.hpp @@ -93,7 +84,7 @@ class Circuit { reglist clbit_labels; std::vector operations; - + reglist qubit_sizes; std::string name = ""; int_t rng_seed = -1; // backend rng seed @@ -382,7 +373,7 @@ bool Circuit::check_opt_meas() { } // Check all remaining operations are measurements while (start != operations.end()) { - if (start->id != gate_t::Measure) + if (start->id != gate_t::Measure) return false; ++start; } diff --git a/src/qasm-simulator-cpp/src/utilities/clifford.hpp b/src/qasm-simulator-cpp/src/utilities/clifford.hpp index 23c6fd5f153e..a9f55d68f402 100644 --- a/src/qasm-simulator-cpp/src/utilities/clifford.hpp +++ b/src/qasm-simulator-cpp/src/utilities/clifford.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file Clifford.hpp diff --git a/src/qasm-simulator-cpp/src/utilities/matrix.hpp b/src/qasm-simulator-cpp/src/utilities/matrix.hpp index f40b391ac146..6f042e926d00 100644 --- a/src/qasm-simulator-cpp/src/utilities/matrix.hpp +++ b/src/qasm-simulator-cpp/src/utilities/matrix.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file matrix.h @@ -215,7 +206,7 @@ class matrix { // sqrt(dims) matrix(const matrix &m); matrix(const matrix &m, const char uplo); - + // Initialize an empty matrix() to matrix(size_t rows, size_t cols) void initialize(size_t rows, size_t cols); // Clear used memory diff --git a/src/qasm-simulator-cpp/src/utilities/misc.hpp b/src/qasm-simulator-cpp/src/utilities/misc.hpp index ae810adc1264..910210d3a614 100644 --- a/src/qasm-simulator-cpp/src/utilities/misc.hpp +++ b/src/qasm-simulator-cpp/src/utilities/misc.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file misc.h diff --git a/src/qasm-simulator-cpp/src/utilities/qubit_vector.hpp b/src/qasm-simulator-cpp/src/utilities/qubit_vector.hpp index 8b06c9de9224..3d0528cebe92 100644 --- a/src/qasm-simulator-cpp/src/utilities/qubit_vector.hpp +++ b/src/qasm-simulator-cpp/src/utilities/qubit_vector.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2018 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2018, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file qubit_vector.hpp @@ -113,7 +104,7 @@ class QubitVector { void apply_matrix(const std::vector &qubits, const cvector_t &mat); template void apply_matrix(const std::array &qubits, const cvector_t &mat); - + // Specialized gates void apply_cnot(const uint_t qctrl, const uint_t qtrgt); void apply_cz(const uint_t q0, const uint_t q1); @@ -129,7 +120,7 @@ class QubitVector { double norm(const std::vector &qubits, const cvector_t &mat) const; template double norm(const std::array &qubits, const cvector_t &mat) const; - + /************************ * Expectation Values ************************/ @@ -151,7 +142,7 @@ class QubitVector { // Element access complex_t &operator[](uint_t element); complex_t operator[](uint_t element) const; - + // Scalar multiplication QubitVector &operator*=(const complex_t &lambda); QubitVector &operator*=(const double &lambda); @@ -159,11 +150,11 @@ class QubitVector { friend QubitVector operator*(const double &lambda, const QubitVector &qv); friend QubitVector operator*(const QubitVector &qv, const complex_t &lambda); friend QubitVector operator*(const QubitVector &qv, const double &lambda); - + // Vector addition QubitVector &operator+=(const QubitVector &qv); QubitVector operator+(const QubitVector &qv) const; - + // Vector subtraction QubitVector &operator-=(const QubitVector &qv); QubitVector operator-(const QubitVector &qv) const; @@ -307,7 +298,7 @@ complex_t &QubitVector::operator[](uint_t element) { #endif return state_vector[element]; } - + complex_t QubitVector::operator[](uint_t element) const { // Error checking @@ -321,16 +312,16 @@ complex_t QubitVector::operator[](uint_t element) const { #endif return state_vector[element]; } - + // Equal operators QubitVector &QubitVector::operator=(const cvector_t &vec) { - + num_states = vec.size(); // Get qubit number uint_t size = num_states; num_qubits = 0; while (size >>= 1) ++num_qubits; - + // Error handling #ifdef DEBUG if (num_states != 1ULL << num_qubits) { @@ -345,13 +336,13 @@ QubitVector &QubitVector::operator=(const cvector_t &vec) { } QubitVector &QubitVector::operator=(const rvector_t &vec) { - + num_states = vec.size(); // Get qubit number uint_t size = num_states; num_qubits = 0; while (size >>= 1) ++num_qubits; - + // Error handling #ifdef DEBUG if (num_states != 1ULL << num_qubits) { @@ -560,7 +551,7 @@ void QubitVector::apply_matrix(const uint_t qubit, const cvector_t &mat) { } void QubitVector::apply_matrix_col_major(const uint_t qubit, const cvector_t &mat) { - + // Error checking #ifdef DEBUG check_vector(mat, 2); @@ -589,13 +580,13 @@ void QubitVector::apply_matrix_col_major(const uint_t qubit, const cvector_t &ma } void QubitVector::apply_matrix_diagonal(const uint_t qubit, const cvector_t &diag) { - + // Error checking #ifdef DEBUG check_vector(diag, 1); check_qubit(qubit); #endif - + const omp_int_t end1 = num_states; // end for k1 loop const omp_int_t end2 = 1LL << qubit; // end for k2 loop const omp_int_t step1 = end2 << 1; // step for k1 loop @@ -617,7 +608,7 @@ void QubitVector::apply_matrix_diagonal(const uint_t qubit, const cvector_t &dia } void QubitVector::apply_x(const uint_t qubit) { - + // Error checking #ifdef DEBUG check_qubit(qubit); @@ -675,12 +666,12 @@ void QubitVector::apply_y(const uint_t qubit) { } void QubitVector::apply_z(const uint_t qubit) { - + // Error checking #ifdef DEBUG check_qubit(qubit); #endif - + // Optimized ideal Pauli-Z gate const omp_int_t end1 = num_states; // end for k1 loop const omp_int_t end2 = 1LL << qubit; // end for k2 loop @@ -900,7 +891,7 @@ void QubitVector::apply_matrix(const std::array &qs, const cvector_t template void QubitVector::apply_matrix_col_major(const std::array &qs, const cvector_t &mat) { - + // Error checking #ifdef DEBUG check_vector(mat, 2 * N); @@ -937,7 +928,7 @@ void QubitVector::apply_matrix_col_major(const std::array &qs, template void QubitVector::apply_matrix_diagonal(const std::array &qs, const cvector_t &diag) { - + // Error checking #ifdef DEBUG check_vector(diag, N); @@ -963,7 +954,7 @@ void QubitVector::apply_matrix_diagonal(const std::array &qs, } void QubitVector::apply_cnot(const uint_t qubit_ctrl, const uint_t qubit_trgt) { - + // Error checking #ifdef DEBUG check_qubit(qubit_ctrl); @@ -1028,7 +1019,7 @@ double QubitVector::norm(const std::array &qs, const cvector_t &mat) template double QubitVector::norm_matrix(const std::array &qs, const cvector_t &mat) const { - + // Error checking #ifdef DEBUG check_vector(mat, 2 * N); @@ -1063,7 +1054,7 @@ double QubitVector::norm_matrix(const std::array &qs, const cvector_t template double QubitVector::norm_matrix_diagonal(const std::array &qs, const cvector_t &mat) const { - + // Error checking #ifdef DEBUG check_vector(mat, N); @@ -1106,7 +1097,7 @@ complex_t QubitVector::expectation_value(const std::array &qs, const template complex_t QubitVector::expectation_value_matrix(const std::array &qs, const cvector_t &mat) const { - + // Error checking #ifdef DEBUG check_vector(mat, 2 * N); @@ -1143,7 +1134,7 @@ complex_t QubitVector::expectation_value_matrix(const std::array &qs, template complex_t QubitVector::expectation_value_matrix_diagonal(const std::array &qs, const cvector_t &mat) const { - + // Error checking #ifdef DEBUG check_vector(mat, N); @@ -1223,7 +1214,7 @@ void QubitVector::apply_matrix_col_major(const std::vector &qubits, cons #endif const omp_int_t end = num_states >> N; - + auto qss = qubits; std::sort(qss.begin(), qss.end()); const auto &qubits_sorted = qss; @@ -1250,7 +1241,7 @@ void QubitVector::apply_matrix_col_major(const std::vector &qubits, cons void QubitVector::apply_matrix_diagonal(const std::vector &qubits, const cvector_t &diag) { - + const auto N = qubits.size(); const uint_t dim = 1ULL << N; // Error checking @@ -1303,7 +1294,7 @@ double QubitVector::norm(const std::vector &qs, const cvector_t &mat) co } double QubitVector::norm_matrix(const std::vector &qs, const cvector_t &mat) const { - + // Error checking const uint_t N = qs.size(); #ifdef DEBUG @@ -1337,7 +1328,7 @@ double QubitVector::norm_matrix(const std::vector &qs, const cvector_t & } double QubitVector::norm_matrix_diagonal(const std::vector &qs, const cvector_t &mat) const { - + // Error checking const uint_t N = qs.size(); #ifdef DEBUG @@ -1394,7 +1385,7 @@ complex_t QubitVector::expectation_value(const std::vector &qs, const cv } complex_t QubitVector::expectation_value_matrix(const std::vector &qs, const cvector_t &mat) const { - + // Error checking const uint_t N = qs.size(); #ifdef DEBUG @@ -1430,7 +1421,7 @@ complex_t QubitVector::expectation_value_matrix(const std::vector &qs, c } complex_t QubitVector::expectation_value_matrix_diagonal(const std::vector &qs, const cvector_t &mat) const { - + // Error checking const uint_t N = qs.size(); #ifdef DEBUG @@ -1507,14 +1498,14 @@ rvector_t QubitVector::probabilities(const uint_t qubit) const { const auto k = k1 | k2; p0 += probability(k); p1 += probability(k | end2); - } + } } // end omp parallel return rvector_t({p0, p1}); } template rvector_t QubitVector::probabilities(const std::array &qs) const { - + // Error checking #ifdef DEBUG for (const auto &qubit : qs) @@ -1523,7 +1514,7 @@ rvector_t QubitVector::probabilities(const std::array &qs) const { if (N == 0) return rvector_t({norm()}); - + const uint_t dim = 1ULL << N; const uint_t end = (1ULL << num_qubits) >> N; auto qss = qs; @@ -1632,7 +1623,7 @@ double QubitVector::probability(const uint_t qubit, const uint_t outcome) const template double QubitVector::probability(const std::array &qs, const uint_t outcome) const { - + // Error checking #ifdef DEBUG for (const auto &qubit : qs) @@ -1656,7 +1647,7 @@ double QubitVector::probability(const std::array &qs, double QubitVector::probability(const std::vector &qs, const uint_t outcome) const { - + // Special cases using faster static indexing const uint_t N = qs.size(); switch (N) { diff --git a/src/qasm-simulator-cpp/src/utilities/tensor_index.hpp b/src/qasm-simulator-cpp/src/utilities/tensor_index.hpp index b083b3a11a7b..703f05ce7f78 100644 --- a/src/qasm-simulator-cpp/src/utilities/tensor_index.hpp +++ b/src/qasm-simulator-cpp/src/utilities/tensor_index.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2018 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2018, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file tensor_index.hpp @@ -33,7 +24,7 @@ limitations under the License. // TODO -- add support for qudit indexing namespace TI { - + using uint_t = uint64_t; /******************************************************************************* diff --git a/src/qasm-simulator-cpp/src/utilities/types.hpp b/src/qasm-simulator-cpp/src/utilities/types.hpp index 250d27a986b7..984e75624844 100644 --- a/src/qasm-simulator-cpp/src/utilities/types.hpp +++ b/src/qasm-simulator-cpp/src/utilities/types.hpp @@ -1,18 +1,9 @@ -/* -Copyright (c) 2017 IBM Corporation. All Rights Reserved. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - 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. -*/ +/** + * Copyright 2017, IBM. + * + * This source code is licensed under the Apache License, Version 2.0 found in + * the LICENSE.txt file in the root directory of this source tree. + */ /** * @file types.h diff --git a/test/__init__.py b/test/__init__.py index 29a4f324db53..5fbc90bca4ab 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,16 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. diff --git a/test/performance/state_tomography.py b/test/performance/state_tomography.py index 750ebf5dfefc..dd7441bf344f 100644 --- a/test/performance/state_tomography.py +++ b/test/performance/state_tomography.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Quantum State Tomography. diff --git a/test/performance/vqe.py b/test/performance/vqe.py index d7e6fe88d1ab..63304128e4f7 100644 --- a/test/performance/vqe.py +++ b/test/performance/vqe.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Variational Quantum Eigensolver (VQE). diff --git a/test/python/__init__.py b/test/python/__init__.py index ea4572c71c79..7065d594f110 100644 --- a/test/python/__init__.py +++ b/test/python/__init__.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """QISKit unit tests.""" import os diff --git a/test/python/_dummybackend.py b/test/python/_dummybackend.py index 386cd35d03c3..8c42800f799c 100644 --- a/test/python/_dummybackend.py +++ b/test/python/_dummybackend.py @@ -1,19 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Dummy backend simulator. diff --git a/test/python/_random_circuit_generator.py b/test/python/_random_circuit_generator.py index 2ead54c4e65c..e975494e360c 100644 --- a/test/python/_random_circuit_generator.py +++ b/test/python/_random_circuit_generator.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Generate random circuits.""" import random diff --git a/test/python/_random_qasm_generator.py b/test/python/_random_qasm_generator.py index d03c7ca896f4..5b9415c6edd3 100644 --- a/test/python/_random_qasm_generator.py +++ b/test/python/_random_qasm_generator.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=missing-docstring import random import uuid diff --git a/test/python/common.py b/test/python/common.py index 7dc28a19ebfe..0d68e5006de9 100644 --- a/test/python/common.py +++ b/test/python/common.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Shared functionality and helpers for the unit tests.""" from enum import Enum diff --git a/test/python/test_api_ibmq.py b/test/python/test_api_ibmq.py index 64a2e7dd9fad..ee493a9a7333 100644 --- a/test/python/test_api_ibmq.py +++ b/test/python/test_api_ibmq.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring,no-member -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring,no-member + """Test API hub, groups and projects related functionality.""" import os from unittest import skipIf diff --git a/test/python/test_apps.py b/test/python/test_apps.py index bd907ac56c89..eb811be66039 100644 --- a/test/python/test_apps.py +++ b/test/python/test_apps.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Quick program to test the apps tools modules.""" diff --git a/test/python/test_backends.py b/test/python/test_backends.py index c3136c96b027..4f293d856551 100644 --- a/test/python/test_backends.py +++ b/test/python/test_backends.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Backends Test.""" diff --git a/test/python/test_compiler.py b/test/python/test_compiler.py index d7169e7810f6..d806eaf56c3f 100644 --- a/test/python/test_compiler.py +++ b/test/python/test_compiler.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name """Compiler Test.""" diff --git a/test/python/test_dagcircuit.py b/test/python/test_dagcircuit.py index ef40762f1df8..4eb1bc5ce570 100644 --- a/test/python/test_dagcircuit.py +++ b/test/python/test_dagcircuit.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring + """Test for the DAGCircuit object""" import unittest diff --git a/test/python/test_extensions_simulator.py b/test/python/test_extensions_simulator.py index 92deb9c40276..c7c88302280c 100644 --- a/test/python/test_extensions_simulator.py +++ b/test/python/test_extensions_simulator.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,unused-import -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,unused-import + """Tests for verifying the correctness of simulator extension instructions.""" import unittest diff --git a/test/python/test_extensions_standard.py b/test/python/test_extensions_standard.py index 3abeb046071a..82f21d89bc11 100644 --- a/test/python/test_extensions_standard.py +++ b/test/python/test_extensions_standard.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring import unittest diff --git a/test/python/test_ibmqjob.py b/test/python/test_ibmqjob.py index 75a52ce0cbd1..838da4168582 100644 --- a/test/python/test_ibmqjob.py +++ b/test/python/test_ibmqjob.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring,broad-except -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring,broad-except """IBMQJob Test.""" diff --git a/test/python/test_identifiers.py b/test/python/test_identifiers.py index 5512bb9c0f3e..22048b9f5efb 100644 --- a/test/python/test_identifiers.py +++ b/test/python/test_identifiers.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring,broad-except -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring,broad-except """Non-string identifiers for circuit and record identifiers test""" diff --git a/test/python/test_initializer.py b/test/python/test_initializer.py index 5a2be970b037..0b9f22880d99 100644 --- a/test/python/test_initializer.py +++ b/test/python/test_initializer.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring + """ InitializeGate (CompositeGate instance) test. """ diff --git a/test/python/test_jsonoutput.py b/test/python/test_jsonoutput.py index 1bad96f3205d..c9e3f06c204b 100644 --- a/test/python/test_jsonoutput.py +++ b/test/python/test_jsonoutput.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring """Quick program to test json backend """ diff --git a/test/python/test_localjob.py b/test/python/test_localjob.py index be95ba92b0ba..10b5313e218e 100644 --- a/test/python/test_localjob.py +++ b/test/python/test_localjob.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring + """LocalJob creation and test suite.""" from os import path diff --git a/test/python/test_mapper.py b/test/python/test_mapper.py index 373b41f7b357..475ca5d2b7be 100644 --- a/test/python/test_mapper.py +++ b/test/python/test_mapper.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring import unittest diff --git a/test/python/test_qasm_parser.py b/test/python/test_qasm_parser.py index 7df471a648e6..226ae64b8b3c 100644 --- a/test/python/test_qasm_parser.py +++ b/test/python/test_qasm_parser.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring + """Test for the QASM parser""" import unittest diff --git a/test/python/test_qasm_simulator_cpp.py b/test/python/test_qasm_simulator_cpp.py index e12391bb59ac..8a326b41e0c8 100644 --- a/test/python/test_qasm_simulator_cpp.py +++ b/test/python/test_qasm_simulator_cpp.py @@ -1,21 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. -# ============================================================================= +# pylint: disable=invalid-name,missing-docstring from test.python.common import QiskitTestCase diff --git a/test/python/test_qasm_simulator_projectq.py b/test/python/test_qasm_simulator_projectq.py index d8435648cdbb..3a9218954e63 100644 --- a/test/python/test_qasm_simulator_projectq.py +++ b/test/python/test_qasm_simulator_projectq.py @@ -1,21 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring,broad-except -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. -# ============================================================================= +# pylint: disable=invalid-name,missing-docstring,broad-except import random import unittest diff --git a/test/python/test_qasm_simulator_py.py b/test/python/test_qasm_simulator_py.py index 508e7ca3fac7..c4cdfac6efe7 100644 --- a/test/python/test_qasm_simulator_py.py +++ b/test/python/test_qasm_simulator_py.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring from sys import version_info import cProfile diff --git a/test/python/test_qi.py b/test/python/test_qi.py index 3da007ca4a97..05411bb08905 100644 --- a/test/python/test_qi.py +++ b/test/python/test_qi.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring """Quick program to test the qi tools modules.""" diff --git a/test/python/test_quantumprogram.py b/test/python/test_quantumprogram.py index 1cd646a55deb..2bcbc68f7074 100644 --- a/test/python/test_quantumprogram.py +++ b/test/python/test_quantumprogram.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring,broad-except -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring,broad-except """Quantum Program QISKit Test.""" diff --git a/test/python/test_reordering.py b/test/python/test_reordering.py index 5aa17453602e..18a2ea4869ed 100644 --- a/test/python/test_reordering.py +++ b/test/python/test_reordering.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,no-value-for-parameter,broad-except -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,no-value-for-parameter,broad-except + """Tests for bit reordering fix.""" import unittest diff --git a/test/python/test_simulator_interfaces.py b/test/python/test_simulator_interfaces.py index d8288b78c86a..404df3f987b7 100644 --- a/test/python/test_simulator_interfaces.py +++ b/test/python/test_simulator_interfaces.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,unused-import -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,unused-import + """Tests for checking qiskit interfaces to simulators.""" import unittest diff --git a/test/python/test_skip_translation.py b/test/python/test_skip_translation.py index 4f5e1d2fe69d..db62aa0ee130 100644 --- a/test/python/test_skip_translation.py +++ b/test/python/test_skip_translation.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring import unittest diff --git a/test/python/test_tomography.py b/test/python/test_tomography.py index 0f07a4b33e97..bce3a2b09781 100644 --- a/test/python/test_tomography.py +++ b/test/python/test_tomography.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring + """Test of QCVV/tomography module.""" import unittest diff --git a/test/python/test_unitary_simulator_py.py b/test/python/test_unitary_simulator_py.py index 74b121485e19..fc1663ae27a3 100644 --- a/test/python/test_unitary_simulator_py.py +++ b/test/python/test_unitary_simulator_py.py @@ -1,21 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# pylint: disable=redefined-builtin -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring +# pylint: disable=redefined-builtin import cProfile import io diff --git a/test/python/test_unroller.py b/test/python/test_unroller.py index abbbb77d791b..5fd410ef22d1 100644 --- a/test/python/test_unroller.py +++ b/test/python/test_unroller.py @@ -1,20 +1,11 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring from sys import version_info import unittest diff --git a/test/python/test_util.py b/test/python/test_util.py index 5bfedc0ad15b..1802721b386c 100644 --- a/test/python/test_util.py +++ b/test/python/test_util.py @@ -1,19 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + """Tests for qiskit/_util.py""" from qiskit._util import _check_ibmqx_version diff --git a/test/python/test_visualization.py b/test/python/test_visualization.py index 879c633d9702..ded1cd036b56 100644 --- a/test/python/test_visualization.py +++ b/test/python/test_visualization.py @@ -1,20 +1,12 @@ # -*- coding: utf-8 -*- -# pylint: disable=invalid-name,missing-docstring -# Copyright 2017 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. + +# pylint: disable=invalid-name,missing-docstring + """Tests for visualization tools.""" import os diff --git a/test/schemas/check_schemas.py b/test/schemas/check_schemas.py index 23c63980691a..f2ef4163d2e8 100644 --- a/test/schemas/check_schemas.py +++ b/test/schemas/check_schemas.py @@ -1,18 +1,9 @@ # -*- coding: utf-8 -*- -# Copyright 2018 IBM RESEARCH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 + +# Copyright 2018, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. """ Created on Sat Apr 21 01:58:06 2018 diff --git a/tools/ghpages_documentation_deploy.sh b/tools/ghpages_documentation_deploy.sh index 2de5f3209e41..d5b53022b644 100755 --- a/tools/ghpages_documentation_deploy.sh +++ b/tools/ghpages_documentation_deploy.sh @@ -1,19 +1,9 @@ #!/bin/bash -# Copyright 2017 IBM RESEARCH. All Rights Reserved. +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. # Authors: Diego M. Rodriguez diff --git a/tools/random_qasm_generator.py b/tools/random_qasm_generator.py index 050e58f45243..ab32ab09e2cc 100755 --- a/tools/random_qasm_generator.py +++ b/tools/random_qasm_generator.py @@ -1,25 +1,18 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# 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 + +# Copyright 2017, IBM. # -# 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 source code is licensed under the Apache License, Version 2.0 found in +# the LICENSE.txt file in the root directory of this source tree. # This tool will print on the standard output a QASM program which instructions # were generated randonmly. The program is valid from the point of view of -# QASM syntax but it has no valid logic. The main purpose of this tool is to +# QASM syntax but it has no valid logic. The main purpose of this tool is to # help in benchmarking and testing Quantum simulators. # Usage example: -# Creates a QASM circuit file called circuit.qasm with ~100 operations +# Creates a QASM circuit file called circuit.qasm with ~100 operations # (CX and U3 gates), 16 Qubits, and a seed of 169 # ./random_qasm_generator.py -s 169 -d 100 -q 16 > circuit.qasm @@ -58,7 +51,7 @@ def __init__(self, seed=None, qubits=16, depth=40): 'cr', qubits) if seed is not None: random.seed(a=seed) - + def create_circuit(self, do_measure=True): """Creates a circuit @@ -73,8 +66,8 @@ def create_circuit(self, do_measure=True): A string representing the QASM circuit """ circuit_name = str(uuid.uuid4()) - circuit = self.quantum_program.create_circuit(circuit_name, - [self.quantum_register], + circuit = self.quantum_program.create_circuit(circuit_name, + [self.quantum_register], [self.classical_register]) for j in range(self.depth): @@ -88,16 +81,16 @@ def create_circuit(self, do_measure=True): self.quantum_register[qind]) elif op_ind == 1: # CX source, target = random.sample(range(self.qubits), 2) - circuit.cx(self.quantum_register[source], + circuit.cx(self.quantum_register[source], self.quantum_register[target]) if do_measure: - nmeasure = random.randint(1, self.qubits) + nmeasure = random.randint(1, self.qubits) for j in range(nmeasure): qind = random.randint(0, self.qubits - 1) # doing this if here keeps the RNG from depending on # whether measurements are done. - circuit.measure(self.quantum_register[qind], + circuit.measure(self.quantum_register[qind], self.classical_register[qind]) return circuit.qasm() @@ -107,7 +100,7 @@ def create_circuit(self, do_measure=True): parser = argparse.ArgumentParser(description=''' Generates a random QASM circuit program. This is useful for profiling/benchmarking.''') - parser.add_argument('-s', '--seed', type=int, + parser.add_argument('-s', '--seed', type=int, help='an integer for the seed') parser.add_argument('-d', '--depth', type=int, help='an integer for the number of opertions present in'