diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 18f7fe5abfb8..bc4223d7a1da 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -26,6 +26,10 @@ Changed - The ``Exception`` subclasses have been moved to an ``.exceptions`` module within each package (for example, ``qiskit.exceptions.QiskitError``). (#1600). +Removed +------- + +- Removed the wrapper folder as part of the post 0.7 cleanup `0.7.0`_ - 2018-12-19 ===================== diff --git a/qiskit/__init__.py b/qiskit/__init__.py index 00bef50b4e58..09bc1b3cf105 100644 --- a/qiskit/__init__.py +++ b/qiskit/__init__.py @@ -46,7 +46,4 @@ except ImportError: pass -# TODO: Remove -from .wrapper._wrapper import (load_qasm_string, load_qasm_file) - from .version import __version__ diff --git a/qiskit/wrapper/__init__.py b/qiskit/wrapper/__init__.py deleted file mode 100644 index afb3a89d623f..000000000000 --- a/qiskit/wrapper/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- - -# 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. - -"""Helper module for simplified Qiskit usage. - -The functions in this module provide convenience helpers for accessing commonly -used features of the SDK in a simplified way. They support a small subset of -scenarios and flows: for more advanced usage, it is encouraged to instead -refer to the documentation of each component and use them separately. -""" - -from ._wrapper import (load_qasm_string, load_qasm_file) diff --git a/qiskit/wrapper/_wrapper.py b/qiskit/wrapper/_wrapper.py deleted file mode 100644 index 71a24dbd1781..000000000000 --- a/qiskit/wrapper/_wrapper.py +++ /dev/null @@ -1,54 +0,0 @@ -# -*- coding: utf-8 -*- - -# 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. - -"""Helper module for simplified Qiskit usage.""" -import logging -import warnings -from qiskit.circuit.quantumcircuit import QuantumCircuit - -logger = logging.getLogger(__name__) - -# Functions for importing qasm - - -def load_qasm_string(qasm_string, name=None): - """Construct a quantum circuit from a qasm representation (string). - - Args: - qasm_string (str): a string of qasm, or a filename containing qasm. - name (str or None): the name of the quantum circuit after loading qasm - text into it. If no name given, assign automatically. - Returns: - QuantumCircuit: circuit constructed from qasm. - """ - warnings.warn('The load_qasm_string() function is deprecated and will be ' - 'removed in a future release. Instead use ' - 'QuantumCircuit.from_qasm_str().', DeprecationWarning) - qc = QuantumCircuit.from_qasm_str(qasm_string) - if name: - qc.name = name - return qc - - -def load_qasm_file(qasm_file, name=None): - """Construct a quantum circuit from a qasm representation (file). - - Args: - qasm_file (str): a string for the filename including its location. - name (str or None): the name of the quantum circuit after - loading qasm text into it. If no name is give the name is of - the text file. - Returns: - QuantumCircuit: circuit constructed from qasm. - """ - warnings.warn('The load_qasm_file() function is deprecated and will be ' - 'removed in a future release. Instead use ' - 'QuantumCircuit.from_qasm_file().', DeprecationWarning) - qc = QuantumCircuit.from_qasm_file(qasm_file) - if name: - qc.name = name - return qc