Repository: Qiskit/qiskit

Issue:
No module named 'vcr': requirement is missing (vcrpy) 
<!-- ⚠️ If you do not respect this template, your issue will be closed -->
<!-- ⚠️ Make sure to browse the opened and closed issues -->

### Information

- **Qiskit Terra version**: 0.10.1
- **Python version**: 3.7.3
- **Operating system**: windows 10

### What is the current behavior?
Fresh qiskit installation inside a new environment on windows 10. 
In one of the terra tutorial (using_the_transpiler) `from qiskit.test.mock import FakeTokyo` is failing 'ModuleNotFoundError: No module named vcr'

### Suggested solutions
'pip install vcrpy' 
'vcrpy' needs to be added in requirements.



Discussion:

Resolving patch:
diff --git a/qiskit/util.py b/qiskit/util.py
--- a/qiskit/util.py
+++ b/qiskit/util.py
@@ -97,7 +97,7 @@ def _has_connection(hostname, port):
     """
     try:
         host = socket.gethostbyname(hostname)
-        socket.create_connection((host, port), 2)
+        socket.create_connection((host, port), 2).close()
         return True
     except Exception:  # pylint: disable=broad-except
         return False


Test patch:
diff --git a/qiskit/test/__init__.py b/qiskit/test/__init__.py
--- a/qiskit/test/__init__.py
+++ b/qiskit/test/__init__.py
@@ -15,6 +15,6 @@
 """Functionality and helpers for testing Qiskit."""
 
 from .base import QiskitTestCase
-from .decorators import requires_aer_provider, requires_qe_access, slow_test
+from .decorators import requires_aer_provider, online_test, slow_test, requires_qe_access
 from .reference_circuits import ReferenceCircuits
 from .utils import Path
diff --git a/qiskit/test/decorators.py b/qiskit/test/decorators.py
--- a/qiskit/test/decorators.py
+++ b/qiskit/test/decorators.py
@@ -18,11 +18,13 @@
 import os
 import sys
 import unittest
+from warnings import warn
 
-from .utils import Path
-from .http_recorder import http_recorder
+from qiskit.util import _has_connection
 from .testing_options import get_test_options
 
+HAS_NET_CONNECTION = None
+
 
 def is_aer_provider_available():
     """Check if the C++ simulator can be instantiated.
@@ -137,7 +139,27 @@ def _get_credentials(test_object, test_options):
 
 
 def requires_qe_access(func):
-    """Decorator that signals that the test uses the online API:
+    """Deprecated in favor of `online_test`"""
+    warn("`requires_qe_access` is going to be replaced in favor of `online_test`",
+         DeprecationWarning)
+
+    @functools.wraps(func)
+    def _wrapper(self, *args, **kwargs):
+        if TEST_OPTIONS['skip_online']:
+            raise unittest.SkipTest('Skipping online tests')
+
+        credentials = _get_credentials(self, TEST_OPTIONS)
+        self.using_ibmq_credentials = credentials.is_ibmq()
+        kwargs.update({'qe_token': credentials.token,
+                       'qe_url': credentials.url})
+
+        return func(self, *args, **kwargs)
+
+    return _wrapper
+
+
+def online_test(func):
+    """Decorator that signals that the test uses the network (and the online API):
 
     It involves:
         * determines if the test should be skipped by checking environment
@@ -159,23 +181,24 @@ def requires_qe_access(func):
 
     @functools.wraps(func)
     def _wrapper(self, *args, **kwargs):
+        # To avoid checking the connection in each test
+        global HAS_NET_CONNECTION  # pylint: disable=global-statement
+
         if TEST_OPTIONS['skip_online']:
             raise unittest.SkipTest('Skipping online tests')
 
+        if HAS_NET_CONNECTION is None:
+            HAS_NET_CONNECTION = _has_connection('qiskit.org', 443)
+
+        if not HAS_NET_CONNECTION:
+            raise unittest.SkipTest("Test requires internet connection.")
+
         credentials = _get_credentials(self, TEST_OPTIONS)
         self.using_ibmq_credentials = credentials.is_ibmq()
         kwargs.update({'qe_token': credentials.token,
                        'qe_url': credentials.url})
 
-        decorated_func = func
-        if TEST_OPTIONS['rec'] or TEST_OPTIONS['mock_online']:
-            # For recording or for replaying existing cassettes, the test
-            # should be decorated with @use_cassette.
-            vcr_mode = 'new_episodes' if TEST_OPTIONS['rec'] else 'none'
-            decorated_func = http_recorder(
-                vcr_mode, Path.CASSETTES.value).use_cassette()(decorated_func)
-
-        return decorated_func(self, *args, **kwargs)
+        return func(self, *args, **kwargs)
 
     return _wrapper
 
diff --git a/qiskit/test/http_recorder.py b/qiskit/test/http_recorder.py
deleted file mode 100644
--- a/qiskit/test/http_recorder.py
+++ /dev/null
@@ -1,289 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# This code is part of Qiskit.
-#
-# (C) Copyright IBM 2017, 2018.
-#
-# This code is licensed under the Apache License, Version 2.0. You may
-# obtain a copy of this license in the LICENSE.txt file in the root directory
-# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
-#
-# Any modifications or derivative works of this code must retain this
-# copyright notice, and modified files need to carry a notice indicating
-# that they have been altered from the originals.
-
-"""Utilities (based on VCRpy) to record remote requests and allow testing offline/cached."""
-
-import json
-from contextlib import suppress
-from vcr.persisters.filesystem import FilesystemPersister
-from vcr import VCR
-
-
-class IdRemoverPersister(FilesystemPersister):
-    """VCR Persister for Qiskit.
-
-    IdRemoverPersister is a VCR persister. This is, it implements a way to save and load cassettes.
-    This persister in particular inherits load_cassette from FilesystemPersister (basically, it
-    loads a standard cassette in the standard way from the file system). On the saving side, it
-    replaces some fields in the JSON content of the responses with dummy values.
-    """
-
-    @staticmethod
-    def get_responses_with(string_to_find, cassette_dict):
-        """Filters the requests from cassette_dict
-
-        Args:
-            string_to_find (str): request path
-            cassette_dict (dict): a VCR cassette dictionary
-
-        Returns:
-            Request: VCR's representation of a request.
-        """
-        return [response for response, request in
-                zip(cassette_dict['responses'], cassette_dict['requests'])
-                if string_to_find in request.path]
-
-    @staticmethod
-    def get_new_id(field, path, id_tracker, type_=str):
-        """Creates a new dummy id (or value) for replacing an existing id (or value).
-
-        Args:
-            field (str): field name is used, in same cases, to create a dummy value.
-            path (str): path of the request is used, in same cases, to create a dummy value.
-            id_tracker (dict): a map of already assigned ids and generated ids.
-            type_ (type): type of the value.
-
-        Returns:
-            str: that is used to replace a value.
-        """
-
-        if type_ == float:
-            return 0.42
-        if type_ == int:
-            return 42
-        dummy_name = 'dummy%s%s' % (path.replace('/', ''), field)
-        count = len(list(filter(lambda x: str(x).startswith(dummy_name), id_tracker.values())))
-        return "%s%02d" % (dummy_name, count + 1)
-
-    @staticmethod
-    def get_matching_dicts(data_dict, map_list):
-        """Find subdicts that are described in map_list.
-
-        Args:
-            data_dict (dict): in which the map_list is going to be searched.
-            map_list (list): the list of nested keys to find in the data_dict
-
-        Returns:
-            list: a list of dictionaries, each of them matches map_list.
-        """
-        ret = []
-        if not map_list:
-            return ret
-        if isinstance(data_dict, list):
-            for sub_data_dict in data_dict:
-                ret.extend(IdRemoverPersister.get_matching_dicts(sub_data_dict, map_list))
-        if isinstance(data_dict, dict):
-            if map_list[0] in data_dict.keys():
-                if len(map_list) == 1:
-                    return [data_dict]
-                else:
-                    ret.extend(
-                        IdRemoverPersister.get_matching_dicts(data_dict[map_list[0]], map_list[1:]))
-        return ret
-
-    @staticmethod
-    def remove_id_in_a_json(jsonobj, field, path, id_tracker):
-        """Replaces ids with dummy values in a json.
-
-        Replaces in jsonobj (in-place) the field with dummy value (which is constructed with
-        id_tracker, if it was already replaced, or path, if it needs to be created).
-
-        Args:
-            jsonobj (dict): json dictionary from the response body
-            field (str): string with the field in the response to by replaced
-            path (str): request path
-            id_tracker (dict): a dictionary of the ids already assigned.
-        """
-
-        map_list = field.split('.')
-        for matching_dict in IdRemoverPersister.get_matching_dicts(jsonobj, map_list):
-            with suppress(KeyError):
-                old_id = matching_dict[map_list[-1]]
-                if old_id not in id_tracker:
-                    new_id = IdRemoverPersister.get_new_id(field, path, id_tracker, type(old_id))
-                    id_tracker[old_id] = new_id
-                matching_dict[map_list[-1]] = id_tracker[old_id]
-
-    @staticmethod
-    def remove_ids_in_a_response(response, fields, path, id_tracker):
-        """Replaces ids with dummy values in a response.
-
-        Replaces in response (in-place) the fields with dummy values (which is constructed with
-        id_tracker, if it was already replaced, or path, if it needs to be created).
-
-        Args:
-            response (dict): dictionary of the response body
-            fields (list): list of fields in the response to by replaced
-            path (str): request path
-            id_tracker (dict): a dictionary of the ids already assigned.
-        """
-        body = json.loads(response['body']['string'].decode('utf-8'))
-        for field in fields:
-            IdRemoverPersister.remove_id_in_a_json(body, field, path, id_tracker)
-        response['body']['string'] = json.dumps(body).encode('utf-8')
-
-    @staticmethod
-    def remove_ids(ids2remove, cassette_dict):
-        """Replaces ids with dummy values in a cassette.
-
-        Replaces in cassette_dict (in-place) the fields defined by ids2remove with dummy values.
-        Internally, it used a map (id_tracker) between real values and dummy values to keep
-        consistency during the renaming.
-
-        Args:
-            ids2remove (dict): {request_path: [json_fields]}
-            cassette_dict (dict): a VCR cassette dictionary.
-        """
-
-        id_tracker = {}  # {old_id: new_id}
-        for path, fields in ids2remove.items():
-            responses = IdRemoverPersister.get_responses_with(path, cassette_dict)
-            for response in responses:
-                IdRemoverPersister.remove_ids_in_a_response(response, fields, path, id_tracker)
-        for old_id, new_id in id_tracker.items():
-            if isinstance(old_id, str):
-                for request in cassette_dict['requests']:
-                    request.uri = request.uri.replace(old_id, new_id)
-
-    @staticmethod
-    def save_cassette(cassette_path, cassette_dict, serializer):
-        """Extends FilesystemPersister.save_cassette
-
-        Extends FilesystemPersister.save_cassette. Replaces particular values (defined by
-        ids2remove) which are replaced by a dummy value. The full manipulation is in
-        cassette_dict, before saving it using FilesystemPersister.save_cassette
-
-        Args:
-            cassette_path (str): the file location where the cassette will be saved.
-            cassette_dict (dict): a VCR cassette dictionary. This is the information that will
-            be dump in cassette_path, using serializer.
-            serializer (callable): the serializer for dumping cassette_dict in cassette_path.
-        """
-        ids2remove = {'/api/users/loginWithToken': ['id',
-                                                    'userId',
-                                                    'created'],
-                      '/api/Jobs': ['id',
-                                    'userId',
-                                    'creationDate',
-                                    'qasms.executionId',
-                                    'qasms.result.date',
-                                    'qasms.result.data.time',
-                                    'qasms.result.data.additionalData.seed'],
-                      '/api/Backends': ['internalId',
-                                        'topologyId'],
-                      '/api/Backends/ibmqx5/queue/status': ['lengthQueue'],
-                      '/api/Backends/ibmqx4/queue/status': ['lengthQueue']}
-        IdRemoverPersister.remove_ids(ids2remove, cassette_dict)
-        super(IdRemoverPersister, IdRemoverPersister).save_cassette(cassette_path,
-                                                                    cassette_dict,
-                                                                    serializer)
-
-
-def http_recorder(vcr_mode, cassette_dir):
-    """Creates a VCR object in vcr_mode mode.
-
-    Args:
-        vcr_mode (string): the parameter for record_mode.
-        cassette_dir (string): path to the cassettes.
-
-    Returns:
-        VCR: a VCR object.
-    """
-    my_vcr = VCR(
-        cassette_library_dir=cassette_dir,
-        record_mode=vcr_mode,
-        match_on=['method', 'scheme', 'host', 'port', 'path', 'unordered_query'],
-        filter_headers=['x-qx-client-application', 'User-Agent'],
-        filter_query_parameters=[('access_token', 'dummyapiusersloginWithTokenid01')],
-        filter_post_data_parameters=[('apiToken', 'apiToken_dummy')],
-        decode_compressed_response=True,
-        before_record_response=_purge_headers_cb(['Date',
-                                                  ('Set-Cookie', 'dummy_cookie'),
-                                                  'X-Global-Transaction-ID',
-                                                  'Etag',
-                                                  'Content-Security-Policy',
-                                                  'X-Content-Security-Policy',
-                                                  'X-Webkit-Csp',
-                                                  'content-length']))
-    my_vcr.register_matcher('unordered_query', _unordered_query_matcher)
-    my_vcr.register_persister(IdRemoverPersister)
-    return my_vcr
-
-
-def _purge_headers_cb(headers):
-    """Remove headers from the response.
-
-    Args:
-        headers (list): headers to remove from the response
-
-    Returns:
-        callable: for been used in before_record_response VCR constructor.
-    """
-    header_list = []
-    for item in headers:
-        if not isinstance(item, tuple):
-            item = (item, None)
-        header_list.append(item[0:2])  # ensure the tuple is a pair
-
-    def before_record_response_cb(response):
-        """Purge headers from response.
-
-        Args:
-            response (dict): a VCR response
-
-        Returns:
-            dict: a VCR response
-        """
-        for (header, value) in header_list:
-            with suppress(KeyError):
-                if value:
-                    response['headers'][header] = value
-                else:
-                    del response['headers'][header]
-        return response
-
-    return before_record_response_cb
-
-
-def _unordered_query_matcher(request1, request2):
-    """A VCR matcher that ignores the order of values in the query string.
-
-    A VCR matcher (a la VCR.matcher) that ignores the order of the values in the query string.
-    Useful for filter params, for example.
-
-    Args:
-        request1 (Request): a VCR request
-        request2 (Request): a VCR request
-
-    Returns:
-        bool: True if they match.
-    """
-    if request1.query == request2.query:
-        return True
-
-    dict1 = dict(request1.query)
-    dict2 = dict(request2.query)
-
-    if dict1 == dict2:
-        return True
-
-    if dict1.keys() != dict2.keys():
-        return False
-
-    for key, value in dict1.items():
-        with suppress(ValueError):
-            dict1[key] = json.loads(value)
-            dict2[key] = json.loads(dict2[key])
-
-    return dict1 == dict2
diff --git a/qiskit/test/utils.py b/qiskit/test/utils.py
--- a/qiskit/test/utils.py
+++ b/qiskit/test/utils.py
@@ -33,8 +33,6 @@ class Path(Enum):
     EXAMPLES = os.path.normpath(os.path.join(SDK, '..', 'examples'))
     # Schemas path:     qiskit/schemas
     SCHEMAS = os.path.normpath(os.path.join(SDK, 'schemas'))
-    # VCR cassettes path: qiskit/test/cassettes/
-    CASSETTES = os.path.normpath(os.path.join(TEST, '..', 'cassettes'))
     # Sample QASMs path: qiskit/test/python/qasm
     QASMS = os.path.normpath(os.path.join(TEST, 'qasm'))
 
diff --git a/test/cassettes/test_backend_monitor b/test/cassettes/test_backend_monitor
deleted file mode 100644
--- a/test/cassettes/test_backend_monitor
+++ /dev/null
@@ -1,381 +0,0 @@
-interactions:
-- request:
-    body: apiToken=apiToken_dummy
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-      Content-Length: ['137']
-      Content-Type: [application/x-www-form-urlencoded]
-    method: POST
-    uri: https://quantumexperience.ng.bluemix.net/api/users/loginWithToken
-  response:
-    body: {string: '{"created": "dummyapiusersloginWithTokencreated01", "userId":
-        "dummyapiusersloginWithTokenuserId01", "id": "dummyapiusersloginWithTokenid01",
-        "ttl": 1209600}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmqx4/queue/status
-  response:
-    body: {string: '{"state": true, "status": "active", "backend_version": "1.0.0",
-        "lengthQueue": 42}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmqx4/properties?access_token=dummyapiusersloginWithTokenid01&version=1
-  response:
-    body: {string: '{"backend_name": "ibmqx4", "backend_version": "1.0.0", "qubits":
-        [[{"date": "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value":
-        40.23580728497557}, {"date": "2019-02-05T02:16:42Z", "unit": "\u00b5s", "name":
-        "T2", "value": 28.053796455696148}, {"date": "2019-02-05T02:54:28Z", "unit":
-        "GHz", "name": "frequency", "value": 5.2498546876946115}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.08450000000000002}], [{"date":
-        "2019-02-04T10:14:24Z", "unit": "\u00b5s", "name": "T1", "value": 67.39179431370326},
-        {"date": "2019-02-05T02:17:25Z", "unit": "\u00b5s", "name": "T2", "value":
-        10.763705758897595}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.295772109235333}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.07925000000000004}], [{"date":
-        "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value": 43.393200515665946},
-        {"date": "2019-02-05T02:18:06Z", "unit": "\u00b5s", "name": "T2", "value":
-        27.3542760576606}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.3533332743669355}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.03699999999999992}], [{"date":
-        "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value": 55.541546751266985},
-        {"date": "2019-02-05T02:17:25Z", "unit": "\u00b5s", "name": "T2", "value":
-        14.846271380938276}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.434936834513384}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.03875000000000006}], [{"date":
-        "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value": 53.860484623965284},
-        {"date": "2019-02-05T02:16:42Z", "unit": "\u00b5s", "name": "T2", "value":
-        4.983364732947786}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.175855462568935}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.26875000000000004}]], "gates":
-        [{"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error",
-        "value": 0}], "qubits": [0], "gate": "u1"}, {"parameters": [{"date": "2019-02-05T10:57:11Z",
-        "unit": "", "name": "gate_error", "value": 0.0006867731322012238}], "qubits":
-        [0], "gate": "u2"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit":
-        "", "name": "gate_error", "value": 0.0013735462644024476}], "qubits": [0],
-        "gate": "u3"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "",
-        "name": "gate_error", "value": 0}], "qubits": [1], "gate": "u1"}, {"parameters":
-        [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value":
-        0.00128782749692391}], "qubits": [1], "gate": "u2"}, {"parameters": [{"date":
-        "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value": 0.00257565499384782}],
-        "qubits": [1], "gate": "u3"}, {"parameters": [{"date": "2019-02-05T10:57:11Z",
-        "unit": "", "name": "gate_error", "value": 0}], "qubits": [2], "gate": "u1"},
-        {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error",
-        "value": 0.00128782749692391}], "qubits": [2], "gate": "u2"}, {"parameters":
-        [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value":
-        0.00257565499384782}], "qubits": [2], "gate": "u3"}, {"parameters": [{"date":
-        "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value": 0}], "qubits":
-        [3], "gate": "u1"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit":
-        "", "name": "gate_error", "value": 0.001803112096824766}], "qubits": [3],
-        "gate": "u2"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "",
-        "name": "gate_error", "value": 0.003606224193649532}], "qubits": [3], "gate":
-        "u3"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "", "name":
-        "gate_error", "value": 0}], "qubits": [4], "gate": "u1"}, {"parameters": [{"date":
-        "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value": 0.006444645993361475}],
-        "qubits": [4], "gate": "u2"}, {"parameters": [{"date": "2019-02-05T10:57:11Z",
-        "unit": "", "name": "gate_error", "value": 0.01288929198672295}], "qubits":
-        [4], "gate": "u3"}, {"parameters": [{"date": "2019-02-05T02:25:32Z", "unit":
-        "", "name": "gate_error", "value": 0.03594617578113263}], "qubits": [1, 0],
-        "name": "CX1_0", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:31:04Z",
-        "unit": "", "name": "gate_error", "value": 0.03205473341614962}], "qubits":
-        [2, 0], "name": "CX2_0", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:36:21Z",
-        "unit": "", "name": "gate_error", "value": 0.048500617566183984}], "qubits":
-        [2, 1], "name": "CX2_1", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:41:40Z",
-        "unit": "", "name": "gate_error", "value": 0.07474221943376097}], "qubits":
-        [3, 2], "name": "CX3_2", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:47:44Z",
-        "unit": "", "name": "gate_error", "value": 0.07660114123887399}], "qubits":
-        [3, 4], "name": "CX3_4", "gate": "cx"}, {"parameters": [{"date": "2019-02-04T10:53:35Z",
-        "unit": "", "name": "gate_error", "value": 0.06824929220587475}], "qubits":
-        [4, 2], "name": "CX4_2", "gate": "cx"}], "last_update_date": "2019-02-05T02:54:28.000Z",
-        "general": []}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-version: 1
diff --git a/test/cassettes/test_backend_overview b/test/cassettes/test_backend_overview
deleted file mode 100644
--- a/test/cassettes/test_backend_overview
+++ /dev/null
@@ -1,976 +0,0 @@
-interactions:
-- request:
-    body: apiToken=apiToken_dummy
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-      Content-Length: ['137']
-      Content-Type: [application/x-www-form-urlencoded]
-    method: POST
-    uri: https://quantumexperience.ng.bluemix.net/api/users/loginWithToken
-  response:
-    body: {string: '{"created": "dummyapiusersloginWithTokencreated01", "userId":
-        "dummyapiusersloginWithTokenuserId01", "id": "dummyapiusersloginWithTokenid01",
-        "ttl": 1209600}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmqx4/queue/status
-  response:
-    body: {string: '{"state": true, "status": "active", "backend_version": "1.0.0",
-        "lengthQueue": 42}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmq_16_melbourne/queue/status
-  response:
-    body: {string: '{"state": true, "status": "active", "backend_version": "1.0.0",
-        "lengthQueue": 40}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmq_16_melbourne/queue/status
-  response:
-    body: {string: '{"state": true, "status": "active", "backend_version": "1.0.0",
-        "lengthQueue": 40}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmqx4/queue/status
-  response:
-    body: {string: '{"state": true, "status": "active", "backend_version": "1.0.0",
-        "lengthQueue": 42}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmq_16_melbourne/properties?access_token=dummyapiusersloginWithTokenid01&version=1
-  response:
-    body: {string: '{"backend_name": "ibmq_16_melbourne", "backend_version": "1.0.0",
-        "qubits": [[{"date": "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1",
-        "value": 75.96106177842839}, {"date": "2019-02-08T07:26:00Z", "unit": "\u00b5s",
-        "name": "T2", "value": 20.8057158459146}, {"date": "2019-02-08T09:22:04Z",
-        "unit": "GHz", "name": "frequency", "value": 5.1000759392113855}, {"date":
-        "2019-02-08T07:24:20Z", "unit": "", "name": "readout_error", "value": 0.0867}],
-        [{"date": "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value":
-        48.35498967351742}, {"date": "2019-02-08T07:27:01Z", "unit": "\u00b5s", "name":
-        "T2", "value": 106.19700447796879}, {"date": "2019-02-08T09:22:04Z", "unit":
-        "GHz", "name": "frequency", "value": 5.238659501129794}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.07750000000000001}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 83.33016929069103},
-        {"date": "2019-02-08T07:28:02Z", "unit": "\u00b5s", "name": "T2", "value":
-        143.9968400517331}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 5.03300771358076}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.08389999999999997}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 61.35153237405397},
-        {"date": "2019-02-08T07:29:05Z", "unit": "\u00b5s", "name": "T2", "value":
-        59.591728676307696}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.896170097816411}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.2329}], [{"date": "2019-02-08T07:24:46Z",
-        "unit": "\u00b5s", "name": "T1", "value": 58.37651453120168}, {"date": "2019-02-08T07:26:00Z",
-        "unit": "\u00b5s", "name": "T2", "value": 39.26840578288146}, {"date": "2019-02-08T09:22:04Z",
-        "unit": "GHz", "name": "frequency", "value": 5.0272302387915655}, {"date":
-        "2019-02-08T07:24:20Z", "unit": "", "name": "readout_error", "value": 0.02300000000000002}],
-        [{"date": "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value":
-        22.72871799765391}, {"date": "2019-02-08T07:27:01Z", "unit": "\u00b5s", "name":
-        "T2", "value": 37.79789351697824}, {"date": "2019-02-08T09:22:04Z", "unit":
-        "GHz", "name": "frequency", "value": 5.067144859702533}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.05010000000000003}], [{"date":
-        "2019-02-07T07:31:24Z", "unit": "\u00b5s", "name": "T1", "value": 55.96731254275887},
-        {"date": "2019-02-08T07:28:02Z", "unit": "\u00b5s", "name": "T2", "value":
-        50.2573329320607}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.92380186054606}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.03970000000000007}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 43.23735783723179},
-        {"date": "2019-02-08T07:29:05Z", "unit": "\u00b5s", "name": "T2", "value":
-        97.48037449118453}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.974517320613159}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.053300000000000014}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 56.847309252980956},
-        {"date": "2019-02-08T07:26:00Z", "unit": "\u00b5s", "name": "T2", "value":
-        92.92386230529024}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.7397852983601725}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.06499999999999995}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 33.31011991217951},
-        {"date": "2019-02-08T07:28:02Z", "unit": "\u00b5s", "name": "T2", "value":
-        75.07465442414373}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.963366733569522}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.12109999999999999}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 40.028390636704025},
-        {"date": "2019-02-08T07:27:01Z", "unit": "\u00b5s", "name": "T2", "value":
-        49.201566672903326}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.945087520892438}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.05059999999999998}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 65.67291748177534},
-        {"date": "2019-02-08T07:28:02Z", "unit": "\u00b5s", "name": "T2", "value":
-        119.6563074422006}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 5.005281828430722}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.10749999999999993}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 78.93072850344592},
-        {"date": "2019-02-08T07:27:01Z", "unit": "\u00b5s", "name": "T2", "value":
-        75.83757478264616}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.760146329316313}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.05049999999999999}], [{"date":
-        "2019-02-08T07:24:46Z", "unit": "\u00b5s", "name": "T1", "value": 27.14948595011101},
-        {"date": "2019-02-08T07:26:00Z", "unit": "\u00b5s", "name": "T2", "value":
-        53.26526727648976}, {"date": "2019-02-08T09:22:04Z", "unit": "GHz", "name":
-        "frequency", "value": 4.9684746329685225}, {"date": "2019-02-08T07:24:20Z",
-        "unit": "", "name": "readout_error", "value": 0.04730000000000001}]], "gates":
-        [{"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error",
-        "value": 0}], "qubits": [0], "gate": "u1"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0.001679428505927727}], "qubits":
-        [0], "gate": "u2"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit":
-        "", "name": "gate_error", "value": 0.003358857011855454}], "qubits": [0],
-        "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "",
-        "name": "gate_error", "value": 0}], "qubits": [1], "gate": "u1"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.006080477938646023}], "qubits": [1], "gate": "u2"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0.012160955877292046}],
-        "qubits": [1], "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0}], "qubits": [2], "gate": "u1"},
-        {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error",
-        "value": 0.004801001301362573}], "qubits": [2], "gate": "u2"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.009602002602725146}], "qubits": [2], "gate": "u3"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0}], "qubits":
-        [3], "gate": "u1"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit":
-        "", "name": "gate_error", "value": 0.0019100464965977615}], "qubits": [3],
-        "gate": "u2"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "",
-        "name": "gate_error", "value": 0.003820092993195523}], "qubits": [3], "gate":
-        "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name":
-        "gate_error", "value": 0}], "qubits": [4], "gate": "u1"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0.0016789859784202}],
-        "qubits": [4], "gate": "u2"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0.0033579719568404}], "qubits":
-        [4], "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit":
-        "", "name": "gate_error", "value": 0}], "qubits": [5], "gate": "u1"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.0024183102041727134}], "qubits": [5], "gate": "u2"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0.004836620408345427}],
-        "qubits": [5], "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0}], "qubits": [6], "gate": "u1"},
-        {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error",
-        "value": 0.0014604602446032233}], "qubits": [6], "gate": "u2"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.0029209204892064466}], "qubits": [6], "gate": "u3"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0}], "qubits":
-        [7], "gate": "u1"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit":
-        "", "name": "gate_error", "value": 0.0031350322639342454}], "qubits": [7],
-        "gate": "u2"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "",
-        "name": "gate_error", "value": 0.006270064527868491}], "qubits": [7], "gate":
-        "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name":
-        "gate_error", "value": 0}], "qubits": [8], "gate": "u1"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0.0024551154718702173}],
-        "qubits": [8], "gate": "u2"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0.0049102309437404346}], "qubits":
-        [8], "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit":
-        "", "name": "gate_error", "value": 0}], "qubits": [9], "gate": "u1"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.003478010867496828}], "qubits": [9], "gate": "u2"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0.006956021734993656}],
-        "qubits": [9], "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0}], "qubits": [10], "gate": "u1"},
-        {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error",
-        "value": 0.002305088055136073}], "qubits": [10], "gate": "u2"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.004610176110272146}], "qubits": [10], "gate": "u3"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0}], "qubits":
-        [11], "gate": "u1"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit":
-        "", "name": "gate_error", "value": 0.0014647255665026226}], "qubits": [11],
-        "gate": "u2"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "",
-        "name": "gate_error", "value": 0.0029294511330052453}], "qubits": [11], "gate":
-        "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name":
-        "gate_error", "value": 0}], "qubits": [12], "gate": "u1"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.0034429776451645466}], "qubits": [12], "gate": "u2"}, {"parameters": [{"date":
-        "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value": 0.006885955290329093}],
-        "qubits": [12], "gate": "u3"}, {"parameters": [{"date": "2019-02-09T07:42:54Z",
-        "unit": "", "name": "gate_error", "value": 0}], "qubits": [13], "gate": "u1"},
-        {"parameters": [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error",
-        "value": 0.006289145077929659}], "qubits": [13], "gate": "u2"}, {"parameters":
-        [{"date": "2019-02-09T07:42:54Z", "unit": "", "name": "gate_error", "value":
-        0.012578290155859317}], "qubits": [13], "gate": "u3"}, {"parameters": [{"date":
-        "2019-02-08T08:22:17Z", "unit": "", "name": "gate_error", "value": 0.03992150159559102}],
-        "qubits": [1, 0], "name": "CX1_0", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:25:30Z", "unit": "", "name": "gate_error", "value": 0.02898713750680537}],
-        "qubits": [1, 2], "name": "CX1_2", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:29:06Z", "unit": "", "name": "gate_error", "value": 0.03636241333882234}],
-        "qubits": [2, 3], "name": "CX2_3", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:32:22Z", "unit": "", "name": "gate_error", "value": 0.030334963393280623}],
-        "qubits": [4, 3], "name": "CX4_3", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:35:36Z", "unit": "", "name": "gate_error", "value": 0.03885429984423519}],
-        "qubits": [4, 10], "name": "CX4_10", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:38:49Z", "unit": "", "name": "gate_error", "value": 0.05486455397851017}],
-        "qubits": [5, 4], "name": "CX5_4", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:42:15Z", "unit": "", "name": "gate_error", "value": 0.0637315588872944}],
-        "qubits": [5, 6], "name": "CX5_6", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:46:04Z", "unit": "", "name": "gate_error", "value": 0.06629596672877747}],
-        "qubits": [5, 9], "name": "CX5_9", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:49:36Z", "unit": "", "name": "gate_error", "value": 0.038006868775274066}],
-        "qubits": [6, 8], "name": "CX6_8", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:53:04Z", "unit": "", "name": "gate_error", "value": 0.033951635142591974}],
-        "qubits": [7, 8], "name": "CX7_8", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T08:56:16Z", "unit": "", "name": "gate_error", "value": 0.041215682504731455}],
-        "qubits": [9, 8], "name": "CX9_8", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T09:00:12Z", "unit": "", "name": "gate_error", "value": 0.046416114232033484}],
-        "qubits": [9, 10], "name": "CX9_10", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-06T09:11:14Z", "unit": "", "name": "gate_error", "value": 0.04309999280284493}],
-        "qubits": [11, 3], "name": "CX11_3", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T09:03:39Z", "unit": "", "name": "gate_error", "value": 0.034499732994308}],
-        "qubits": [11, 10], "name": "CX11_10", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T09:06:56Z", "unit": "", "name": "gate_error", "value": 0.0574353496208172}],
-        "qubits": [11, 12], "name": "CX11_12", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T09:13:31Z", "unit": "", "name": "gate_error", "value": 0.05926881901365755}],
-        "qubits": [12, 2], "name": "CX12_2", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T09:18:08Z", "unit": "", "name": "gate_error", "value": 0.1110388544989424}],
-        "qubits": [13, 1], "name": "CX13_1", "gate": "cx"}, {"parameters": [{"date":
-        "2019-02-08T09:22:04Z", "unit": "", "name": "gate_error", "value": 0.04073863017965598}],
-        "qubits": [13, 12], "name": "CX13_12", "gate": "cx"}], "last_update_date":
-        "2019-02-08T09:22:04.000Z", "general": []}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/v/1?access_token=dummyapiusersloginWithTokenid01
-  response:
-    body: {string: '[{"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmqx4",
-        "max_shots": 8192, "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "simulator": false, "sample_name": "raven", "max_experiments": 75,
-        "local": false, "backend_version": "1.0.0", "n_qubits": 5, "basis_gates":
-        ["u1", "u2", "u3", "cx", "id"], "conditional": false, "url": "None", "gates":
-        [{"qasm_def": "gate id q { U(0,0,0) q; }", "parameters": [], "coupling_map":
-        [[0], [1], [2], [3], [4]], "name": "id"}, {"qasm_def": "gate u1(lambda) q
-        { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3],
-        [4]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda) q { U(theta,phi,lambda)
-        q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4]], "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }",
-        "parameters": [], "coupling_map": [[1, 0], [2, 0], [2, 1], [3, 2], [3, 4],
-        [4, 2]], "name": "cx"}], "description": "5 qubit device", "open_pulse": false,
-        "memory": true, "credits_required": true, "allow_q_object": true, "n_registers":
-        1}, {"online_date": "2018-11-06T05:00:00Z", "backend_name": "ibmq_16_melbourne",
-        "max_shots": 8192, "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10],
-        [5, 4], [5, 6], [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10],
-        [11, 12], [12, 2], [13, 1], [13, 12]], "simulator": false, "sample_name":
-        "albatross", "max_experiments": 75, "local": false, "backend_version": "1.0.0",
-        "n_qubits": 14, "basis_gates": ["u1", "u2", "u3", "cx", "id"], "conditional":
-        false, "url": "None", "gates": [{"qasm_def": "gate id q { U(0,0,0) q; }",
-        "parameters": [], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "id"}, {"qasm_def": "gate u1(lambda)
-        q { U(0,0,lambda) q; }", "parameters": ["lambda"], "coupling_map": [[0], [1],
-        [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]], "name": "u1"},
-        {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda) q; }", "parameters":
-        ["phi", "lambda"], "coupling_map": [[0], [1], [2], [3], [4], [5], [6], [7],
-        [8], [9], [10], [11], [12], [13]], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "coupling_map":
-        [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13]],
-        "name": "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [],
-        "coupling_map": [[1, 0], [1, 2], [2, 3], [4, 3], [4, 10], [5, 4], [5, 6],
-        [5, 9], [6, 8], [7, 8], [9, 8], [9, 10], [11, 3], [11, 10], [11, 12], [12,
-        2], [13, 1], [13, 12]], "name": "cx"}], "description": "14 qubit device",
-        "open_pulse": false, "memory": false, "credits_required": true, "allow_q_object":
-        true, "n_registers": 1}, {"backend_name": "ibmq_qasm_simulator", "backend_version":
-        "0.1.547", "simulator": true, "max_experiments": 300, "local": false, "max_shots":
-        8192, "n_qubits": 32, "basis_gates": ["u1", "u2", "u3", "cx"], "conditional":
-        true, "gates": [{"qasm_def": "gate u1(lambda) q { U(0,0,lambda) q; }", "parameters":
-        ["lambda"], "name": "u1"}, {"qasm_def": "gate u2(phi,lambda) q { U(pi/2,phi,lambda)
-        q; }", "parameters": ["phi", "lambda"], "name": "u2"}, {"qasm_def": "u3(theta,phi,lambda)
-        q { U(theta,phi,lambda) q; }", "parameters": ["theta", "phi", "lambda"], "name":
-        "u3"}, {"qasm_def": "gate cx q1,q2 { CX q1,q2; }", "parameters": [], "name":
-        "cx"}], "open_pulse": false, "memory": true, "allow_q_object": true}]'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-- request:
-    body: null
-    headers:
-      Accept: ['*/*']
-      Accept-Encoding: ['gzip, deflate']
-      Connection: [keep-alive]
-    method: GET
-    uri: https://quantumexperience.ng.bluemix.net/api/Backends/ibmqx4/properties?access_token=dummyapiusersloginWithTokenid01&version=1
-  response:
-    body: {string: '{"backend_name": "ibmqx4", "backend_version": "1.0.0", "qubits":
-        [[{"date": "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value":
-        40.23580728497557}, {"date": "2019-02-05T02:16:42Z", "unit": "\u00b5s", "name":
-        "T2", "value": 28.053796455696148}, {"date": "2019-02-05T02:54:28Z", "unit":
-        "GHz", "name": "frequency", "value": 5.2498546876946115}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.08450000000000002}], [{"date":
-        "2019-02-04T10:14:24Z", "unit": "\u00b5s", "name": "T1", "value": 67.39179431370326},
-        {"date": "2019-02-05T02:17:25Z", "unit": "\u00b5s", "name": "T2", "value":
-        10.763705758897595}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.295772109235333}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.07925000000000004}], [{"date":
-        "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value": 43.393200515665946},
-        {"date": "2019-02-05T02:18:06Z", "unit": "\u00b5s", "name": "T2", "value":
-        27.3542760576606}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.3533332743669355}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.03699999999999992}], [{"date":
-        "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value": 55.541546751266985},
-        {"date": "2019-02-05T02:17:25Z", "unit": "\u00b5s", "name": "T2", "value":
-        14.846271380938276}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.434936834513384}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.03875000000000006}], [{"date":
-        "2019-02-05T02:15:59Z", "unit": "\u00b5s", "name": "T1", "value": 53.860484623965284},
-        {"date": "2019-02-05T02:16:42Z", "unit": "\u00b5s", "name": "T2", "value":
-        4.983364732947786}, {"date": "2019-02-05T02:54:28Z", "unit": "GHz", "name":
-        "frequency", "value": 5.175855462568935}, {"date": "2019-02-05T02:15:40Z",
-        "unit": "", "name": "readout_error", "value": 0.26875000000000004}]], "gates":
-        [{"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error",
-        "value": 0}], "qubits": [0], "gate": "u1"}, {"parameters": [{"date": "2019-02-05T10:57:11Z",
-        "unit": "", "name": "gate_error", "value": 0.0006867731322012238}], "qubits":
-        [0], "gate": "u2"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit":
-        "", "name": "gate_error", "value": 0.0013735462644024476}], "qubits": [0],
-        "gate": "u3"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "",
-        "name": "gate_error", "value": 0}], "qubits": [1], "gate": "u1"}, {"parameters":
-        [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value":
-        0.00128782749692391}], "qubits": [1], "gate": "u2"}, {"parameters": [{"date":
-        "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value": 0.00257565499384782}],
-        "qubits": [1], "gate": "u3"}, {"parameters": [{"date": "2019-02-05T10:57:11Z",
-        "unit": "", "name": "gate_error", "value": 0}], "qubits": [2], "gate": "u1"},
-        {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error",
-        "value": 0.00128782749692391}], "qubits": [2], "gate": "u2"}, {"parameters":
-        [{"date": "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value":
-        0.00257565499384782}], "qubits": [2], "gate": "u3"}, {"parameters": [{"date":
-        "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value": 0}], "qubits":
-        [3], "gate": "u1"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit":
-        "", "name": "gate_error", "value": 0.001803112096824766}], "qubits": [3],
-        "gate": "u2"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "",
-        "name": "gate_error", "value": 0.003606224193649532}], "qubits": [3], "gate":
-        "u3"}, {"parameters": [{"date": "2019-02-05T10:57:11Z", "unit": "", "name":
-        "gate_error", "value": 0}], "qubits": [4], "gate": "u1"}, {"parameters": [{"date":
-        "2019-02-05T10:57:11Z", "unit": "", "name": "gate_error", "value": 0.006444645993361475}],
-        "qubits": [4], "gate": "u2"}, {"parameters": [{"date": "2019-02-05T10:57:11Z",
-        "unit": "", "name": "gate_error", "value": 0.01288929198672295}], "qubits":
-        [4], "gate": "u3"}, {"parameters": [{"date": "2019-02-05T02:25:32Z", "unit":
-        "", "name": "gate_error", "value": 0.03594617578113263}], "qubits": [1, 0],
-        "name": "CX1_0", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:31:04Z",
-        "unit": "", "name": "gate_error", "value": 0.03205473341614962}], "qubits":
-        [2, 0], "name": "CX2_0", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:36:21Z",
-        "unit": "", "name": "gate_error", "value": 0.048500617566183984}], "qubits":
-        [2, 1], "name": "CX2_1", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:41:40Z",
-        "unit": "", "name": "gate_error", "value": 0.07474221943376097}], "qubits":
-        [3, 2], "name": "CX3_2", "gate": "cx"}, {"parameters": [{"date": "2019-02-05T02:47:44Z",
-        "unit": "", "name": "gate_error", "value": 0.07660114123887399}], "qubits":
-        [3, 4], "name": "CX3_4", "gate": "cx"}, {"parameters": [{"date": "2019-02-04T10:53:35Z",
-        "unit": "", "name": "gate_error", "value": 0.06824929220587475}], "qubits":
-        [4, 2], "name": "CX4_2", "gate": "cx"}], "last_update_date": "2019-02-05T02:54:28.000Z",
-        "general": []}'}
-    headers:
-      Access-Control-Allow-Credentials: ['true']
-      Access-Control-Allow-Origin: ['https://quantumexperience.mybluemix.net/']
-      Cache-Control: ['no-store, no-cache, must-revalidate, proxy-revalidate']
-      Connection: [Keep-Alive]
-      Content-Type: [application/json; charset=utf-8]
-      Expires: ['0']
-      Pragma: [no-cache]
-      Set-Cookie: dummy_cookie
-      Strict-Transport-Security: [max-age=86400]
-      Surrogate-Control: [no-store]
-      Transfer-Encoding: [chunked]
-      Vary: ['Origin, Accept-Encoding']
-      X-Backside-Transport: [OK OK]
-      X-Content-Type-Options: [nosniff]
-      X-Download-Options: [noopen]
-      X-Frame-Options: [SAMEORIGIN]
-      X-Xss-Protection: [1; mode=block]
-    status: {code: 200, message: OK}
-version: 1
diff --git a/test/python/compiler/test_transpiler.py b/test/python/compiler/test_transpiler.py
--- a/test/python/compiler/test_transpiler.py
+++ b/test/python/compiler/test_transpiler.py
@@ -16,6 +16,7 @@
 
 import math
 import unittest
+from unittest.mock import patch
 
 from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
 from qiskit import BasicAer
@@ -33,8 +34,6 @@
 class TestTranspile(QiskitTestCase):
     """Test transpile function."""
 
-    barrier_pass = BarrierBeforeFinalMeasurements()
-
     def test_pass_manager_none(self):
         """Test passing the default (None) pass manager to the transpiler.
 
@@ -430,16 +429,16 @@ def test_parameterized_circuit_for_device(self):
 
         self.assertEqual(expected_qc, transpiled_qc)
 
-    @unittest.mock.patch.object(BarrierBeforeFinalMeasurements, 'run', wraps=barrier_pass.run)
-    def test_final_measurement_barrier_for_devices(self, mock_pass):
+    def test_final_measurement_barrier_for_devices(self):
         """Verify BarrierBeforeFinalMeasurements pass is called in default pipeline for devices."""
 
         circ = QuantumCircuit.from_qasm_file(self._get_resource_path('example.qasm', Path.QASMS))
         layout = Layout.generate_trivial_layout(*circ.qregs)
-        transpile(circ, coupling_map=FakeRueschlikon().configuration().coupling_map,
-                  initial_layout=layout)
-
-        self.assertTrue(mock_pass.called)
+        orig_pass = BarrierBeforeFinalMeasurements()
+        with patch.object(BarrierBeforeFinalMeasurements, 'run', wraps=orig_pass.run) as mock_pass:
+            transpile(circ, coupling_map=FakeRueschlikon().configuration().coupling_map,
+                      initial_layout=layout)
+            self.assertTrue(mock_pass.called)
 
     def test_do_not_run_cxdirection_with_symmetric_cm(self):
         """When the coupling map is symmetric, do not run CXDirection."""
@@ -451,8 +450,8 @@ def test_do_not_run_cxdirection_with_symmetric_cm(self):
             coupling_map.append([node1, node2])
             coupling_map.append([node2, node1])
 
-        cxdir_pass = CXDirection(CouplingMap(coupling_map))
-        with unittest.mock.patch.object(CXDirection, 'run', wraps=cxdir_pass.run) as mock_pass:
+        orig_pass = CXDirection(CouplingMap(coupling_map))
+        with patch.object(CXDirection, 'run', wraps=orig_pass.run) as mock_pass:
             transpile(circ, coupling_map=coupling_map, initial_layout=layout)
             self.assertFalse(mock_pass.called)
 
diff --git a/test/python/tools/jupyter/test_notebooks.py b/test/python/tools/jupyter/test_notebooks.py
--- a/test/python/tools/jupyter/test_notebooks.py
+++ b/test/python/tools/jupyter/test_notebooks.py
@@ -20,7 +20,7 @@
 import nbformat
 from nbconvert.preprocessors import ExecutePreprocessor
 from qiskit.tools.visualization import HAS_MATPLOTLIB
-from qiskit.test import (Path, QiskitTestCase, requires_qe_access, slow_test)
+from qiskit.test import (Path, QiskitTestCase, online_test, slow_test)
 
 
 # Timeout (in seconds) for a single notebook.
@@ -64,7 +64,7 @@ def test_jupyter_jobs_pbars(self):
             'notebooks/test_pbar_status.ipynb'))
 
     @unittest.skipIf(not HAS_MATPLOTLIB, 'matplotlib not available.')
-    @requires_qe_access
+    @online_test
     @slow_test
     def test_backend_tools(self, qe_token, qe_url):
         """Test Jupyter backend tools."""
diff --git a/test/python/tools/monitor/test_backend_monitor.py b/test/python/tools/monitor/test_backend_monitor.py
--- a/test/python/tools/monitor/test_backend_monitor.py
+++ b/test/python/tools/monitor/test_backend_monitor.py
@@ -19,17 +19,13 @@
 from io import StringIO
 
 from qiskit.tools.monitor import backend_overview, backend_monitor
-from qiskit.test import QiskitTestCase, requires_qe_access
-from qiskit.util import _has_connection
-# Check if internet connection exists
-HAS_NET_CONNECTION = _has_connection('qiskit.org', 443)
+from qiskit.test import QiskitTestCase, online_test
 
 
 class TestBackendOverview(QiskitTestCase):
     """Tools test case."""
 
-    @unittest.skipIf(not HAS_NET_CONNECTION, "requries internet connection.")
-    @requires_qe_access
+    @online_test
     def test_backend_overview(self, qe_token, qe_url):
         """Test backend_overview"""
         from qiskit import IBMQ  # pylint: disable: import-error
@@ -42,8 +38,7 @@ def test_backend_overview(self, qe_token, qe_url):
         self.assertIn('Avg. T1:', stdout)
         self.assertIn('Num. Qubits:', stdout)
 
-    @unittest.skipIf(not HAS_NET_CONNECTION, "requries internet connection.")
-    @requires_qe_access
+    @online_test
     def test_backend_monitor(self, qe_token, qe_url):
         """Test backend_monitor"""
         from qiskit import IBMQ  # pylint: disable: import-error