From 52c314fd05d19069a7666d01562f7b6514e2cae9 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Sat, 14 Sep 2019 15:07:48 +0200 Subject: [PATCH 01/20] test --- test/python/transpiler/test_layout.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/python/transpiler/test_layout.py b/test/python/transpiler/test_layout.py index 95d90f98acd3..0b7149f8c12c 100644 --- a/test/python/transpiler/test_layout.py +++ b/test/python/transpiler/test_layout.py @@ -17,6 +17,7 @@ import copy import unittest import warnings +import numpy from qiskit.circuit import QuantumRegister, Qubit from qiskit.transpiler.layout import Layout @@ -325,6 +326,20 @@ def test_layout_from_intlist(self): self.assertDictEqual(layout._p2v, expected._p2v) self.assertDictEqual(layout._v2p, expected._v2p) + def test_layout_from_intlist_numpy(self): + """Create a layout from a list of numpy integers. See #3097 + """ + qr1 = QuantumRegister(1, 'qr1') + qr2 = QuantumRegister(2, 'qr2') + qr3 = QuantumRegister(3, 'qr3') + intlist_layout = list(numpy.array([0, 1, 2, 3, 4, 5])) + layout = Layout.from_intlist(intlist_layout, qr1, qr2, qr3) + + expected = Layout.generate_trivial_layout(qr1, qr2, qr3) + self.maxDiff = None + self.assertDictEqual(layout._p2v, expected._p2v) + self.assertDictEqual(layout._v2p, expected._v2p) + def test_layout_from_intlist_short(self): """If the intlist is longer that your quantum register, map them to None. virtual physical From 53bbbcd36b50ed79b585d432e796dd13d81ae73a Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Sat, 14 Sep 2019 16:18:48 +0200 Subject: [PATCH 02/20] cast in insinstance --- qiskit/compiler/transpile.py | 10 +++++++--- qiskit/converters/__init__.py | 21 +++++++++++++++++++++ qiskit/transpiler/layout.py | 11 ++++++----- test/python/transpiler/test_layout.py | 3 +-- 4 files changed, 35 insertions(+), 10 deletions(-) diff --git a/qiskit/compiler/transpile.py b/qiskit/compiler/transpile.py index aa14d3ffeaa0..4aa8792d9c5d 100644 --- a/qiskit/compiler/transpile.py +++ b/qiskit/compiler/transpile.py @@ -24,7 +24,7 @@ from qiskit.circuit.quantumregister import Qubit from qiskit import user_config from qiskit.transpiler.exceptions import TranspilerError - +from qiskit.converters import isinstanceint, isinstancelist def transpile(circuits, backend=None, @@ -330,13 +330,17 @@ def _parse_initial_layout(initial_layout, circuits): # initial_layout could be None, or a list of ints, e.g. [0, 5, 14] # or a list of tuples/None e.g. [qr[0], None, qr[1]] or a dict e.g. {qr[0]: 0} def _layout_from_raw(initial_layout, circuit): - if isinstance(initial_layout, list): - if all(isinstance(elem, int) for elem in initial_layout): + if initial_layout is None: + return initial_layout + elif isinstancelist(initial_layout): + if all(isinstanceint(elem) for elem in initial_layout): initial_layout = Layout.from_intlist(initial_layout, *circuit.qregs) elif all(elem is None or isinstance(elem, Qubit) for elem in initial_layout): initial_layout = Layout.from_qubit_list(initial_layout) elif isinstance(initial_layout, dict): initial_layout = Layout(initial_layout) + else: + raise TranspilerError("The initial_layout parameter could not be parsed") return initial_layout # multiple layouts? diff --git a/qiskit/converters/__init__.py b/qiskit/converters/__init__.py index 2c3fa89968f5..f24c77e73ac4 100644 --- a/qiskit/converters/__init__.py +++ b/qiskit/converters/__init__.py @@ -21,3 +21,24 @@ from .dag_to_circuit import dag_to_circuit from .ast_to_dag import ast_to_dag from .circuit_to_instruction import circuit_to_instruction + + +def isinstanceint(obj): + """ Like isinstance(obj,int), but with casting. Except for strings.""" + if isinstance(obj, str): + return False + try: + int(obj) + return True + except TypeError: + return False + +def isinstancelist(obj): + """ Like isinstance(obj, list), but with casting. Except for strings and dicts.""" + if isinstance(obj, (str, dict)): + return False + try: + list(obj) + return True + except TypeError: + return False diff --git a/qiskit/transpiler/layout.py b/qiskit/transpiler/layout.py index 4b10e72774a8..8a1143a1a5ff 100644 --- a/qiskit/transpiler/layout.py +++ b/qiskit/transpiler/layout.py @@ -23,6 +23,7 @@ from qiskit.circuit.quantumregister import Qubit from qiskit.transpiler.exceptions import LayoutError +from qiskit.converters import isinstanceint class Layout(): @@ -87,11 +88,11 @@ def from_dict(self, input_dict): @staticmethod def order_based_on_type(value1, value2): """decides which one is physical/virtual based on the type. Returns (virtual, physical)""" - if isinstance(value1, int) and isinstance(value2, (Qubit, type(None))): - physical = value1 + if isinstanceint(value1) and isinstance(value2, (Qubit, type(None))): + physical = int(value1) virtual = value2 - elif isinstance(value2, int) and isinstance(value1, (Qubit, type(None))): - physical = value2 + elif isinstanceint(value2) and isinstance(value1, (Qubit, type(None))): + physical = int(value2) virtual = value1 else: raise LayoutError('The map (%s -> %s) has to be a (Bit -> integer)' @@ -272,7 +273,7 @@ def from_intlist(int_list, *qregs): Raises: LayoutError: Invalid input layout. """ - if not all(isinstance(i, int) for i in int_list): + if not all(isinstanceint(i) for i in int_list): raise LayoutError('Expected a list of ints') if len(int_list) != len(set(int_list)): raise LayoutError('Duplicate values not permitted; Layout is bijective.') diff --git a/test/python/transpiler/test_layout.py b/test/python/transpiler/test_layout.py index 0b7149f8c12c..cd8b99bc88d5 100644 --- a/test/python/transpiler/test_layout.py +++ b/test/python/transpiler/test_layout.py @@ -332,11 +332,10 @@ def test_layout_from_intlist_numpy(self): qr1 = QuantumRegister(1, 'qr1') qr2 = QuantumRegister(2, 'qr2') qr3 = QuantumRegister(3, 'qr3') - intlist_layout = list(numpy.array([0, 1, 2, 3, 4, 5])) + intlist_layout = numpy.array([0, 1, 2, 3, 4, 5]) layout = Layout.from_intlist(intlist_layout, qr1, qr2, qr3) expected = Layout.generate_trivial_layout(qr1, qr2, qr3) - self.maxDiff = None self.assertDictEqual(layout._p2v, expected._p2v) self.assertDictEqual(layout._v2p, expected._v2p) From 2113b49b3d2a55de72e3420d499fdca5819cdc84 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Sat, 14 Sep 2019 16:32:39 +0200 Subject: [PATCH 03/20] style --- qiskit/compiler/transpile.py | 1 + qiskit/converters/__init__.py | 1 + 2 files changed, 2 insertions(+) diff --git a/qiskit/compiler/transpile.py b/qiskit/compiler/transpile.py index 4aa8792d9c5d..9b178089853a 100644 --- a/qiskit/compiler/transpile.py +++ b/qiskit/compiler/transpile.py @@ -26,6 +26,7 @@ from qiskit.transpiler.exceptions import TranspilerError from qiskit.converters import isinstanceint, isinstancelist + def transpile(circuits, backend=None, basis_gates=None, coupling_map=None, backend_properties=None, diff --git a/qiskit/converters/__init__.py b/qiskit/converters/__init__.py index f24c77e73ac4..ca668d3a2d0a 100644 --- a/qiskit/converters/__init__.py +++ b/qiskit/converters/__init__.py @@ -33,6 +33,7 @@ def isinstanceint(obj): except TypeError: return False + def isinstancelist(obj): """ Like isinstance(obj, list), but with casting. Except for strings and dicts.""" if isinstance(obj, (str, dict)): From 8b4a124b0b4004bd9c413bdd00280b517f7bec0a Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Sun, 15 Sep 2019 22:55:26 +0200 Subject: [PATCH 04/20] layouts are already layouts :) --- qiskit/compiler/transpile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qiskit/compiler/transpile.py b/qiskit/compiler/transpile.py index 9b178089853a..2fcacc993d54 100644 --- a/qiskit/compiler/transpile.py +++ b/qiskit/compiler/transpile.py @@ -331,7 +331,7 @@ def _parse_initial_layout(initial_layout, circuits): # initial_layout could be None, or a list of ints, e.g. [0, 5, 14] # or a list of tuples/None e.g. [qr[0], None, qr[1]] or a dict e.g. {qr[0]: 0} def _layout_from_raw(initial_layout, circuit): - if initial_layout is None: + if initial_layout is None or isinstance(initial_layout, Layout): return initial_layout elif isinstancelist(initial_layout): if all(isinstanceint(elem) for elem in initial_layout): From 23bba70a5d14494b31a4281610998d26853aec9f Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 17:18:43 +0200 Subject: [PATCH 05/20] style['plotbarrier'] is being deprecated --- qiskit/visualization/circuit_visualization.py | 1 - qiskit/visualization/qcstyle.py | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 8b304d9fc9b6..9a84a325efdd 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -327,7 +327,6 @@ def qx_color_scheme(): "latexdrawerstyle": True, "usepiformat": False, "cregbundle": False, - "plotbarrier": False, "showindex": False, "compress": True, "margin": [2.0, 0.0, 0.0, 0.3], diff --git a/qiskit/visualization/qcstyle.py b/qiskit/visualization/qcstyle.py index 64c6239342c8..b32b3ced49c3 100644 --- a/qiskit/visualization/qcstyle.py +++ b/qiskit/visualization/qcstyle.py @@ -14,6 +14,7 @@ # pylint: disable=invalid-name,missing-docstring +import warnings class DefaultStyle: """IBM Design Style colors @@ -88,7 +89,6 @@ def __init__(self): self.latexmode = False self.fold = 25 self.bundle = True - self.barrier = True self.index = False self.figwidth = -1 self.dpi = 150 @@ -113,12 +113,14 @@ def set_style(self, dic): if self.fold < 2: self.fold = -1 self.bundle = dic.get('cregbundle', self.bundle) - self.barrier = dic.get('plotbarrier', self.barrier) self.index = dic.get('showindex', self.index) self.figwidth = dic.get('figwidth', self.figwidth) self.dpi = dic.get('dpi', self.dpi) self.margin = dic.get('margin', self.margin) self.cline = dic.get('creglinestyle', self.cline) + if 'plotbarrier' in dic: + warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' + ' argument "plot_barriers"', DeprecationWarning, 5) class BWStyle: @@ -184,7 +186,6 @@ def __init__(self): self.latexmode = False self.fold = 25 self.bundle = True - self.barrier = True self.index = False self.figwidth = -1 self.dpi = 150 @@ -211,9 +212,11 @@ def set_style(self, dic): if self.fold < 2: self.fold = -1 self.bundle = dic.get('cregbundle', self.bundle) - self.barrier = dic.get('plotbarrier', self.barrier) self.index = dic.get('showindex', self.index) self.figwidth = dic.get('figwidth', self.figwidth) self.dpi = dic.get('dpi', self.dpi) self.margin = dic.get('margin', self.margin) self.cline = dic.get('creglinestyle', self.cline) + if 'plotbarrier' in dic: + warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' + ' argument "plot_barriers"', DeprecationWarning, 5) From 37894e526e41057834ae77ba9035e3171e7f655a Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 17:20:33 +0200 Subject: [PATCH 06/20] internal param for text drawer renamed to plot_barriers --- qiskit/visualization/circuit_visualization.py | 8 ++++---- test/python/visualization/test_circuit_text_drawer.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 9a84a325efdd..d0e320622446 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -225,7 +225,7 @@ def circuit_drawer(circuit, return _text_circuit_drawer(circuit, filename=filename, line_length=line_length, reverse_bits=reverse_bits, - plotbarriers=plot_barriers, + plot_barriers=plot_barriers, justify=justify, vertical_compression=vertical_compression, idle_wires=idle_wires, @@ -341,7 +341,7 @@ def qx_color_scheme(): def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits=False, - plotbarriers=True, justify=None, vertical_compression='high', + plot_barriers=True, justify=None, vertical_compression='high', idle_wires=True, with_layout=True): """ Draws a circuit using ascii art. @@ -354,7 +354,7 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= shutil.get_terminal_size(). If you don't want pagination at all, set line_length=-1. reverse_bits (bool): Rearrange the bits in reverse order. - plotbarriers (bool): Draws the barriers when they are there. + plot_barriers (bool): Draws the barriers when they are there. justify (str) : `left`, `right` or `none`. Defaults to `left`. Says how the circuit should be justified. vertical_compression (string): `high`, `medium`, or `low`. It merges the @@ -374,7 +374,7 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= else: layout = None text_drawing = _text.TextDrawing(qregs, cregs, ops, layout=layout) - text_drawing.plotbarriers = plotbarriers + text_drawing.plotbarriers = plot_barriers text_drawing.line_length = line_length text_drawing.vertical_compression = vertical_compression diff --git a/test/python/visualization/test_circuit_text_drawer.py b/test/python/visualization/test_circuit_text_drawer.py index fc1ef42c09fb..cb7c0726a2eb 100644 --- a/test/python/visualization/test_circuit_text_drawer.py +++ b/test/python/visualization/test_circuit_text_drawer.py @@ -536,7 +536,7 @@ def test_text_no_barriers(self): circuit.barrier(qr1) circuit.barrier(qr2[1]) circuit.h(qr2) - self.assertEqual(str(_text_circuit_drawer(circuit, plotbarriers=False)), expected) + self.assertEqual(str(_text_circuit_drawer(circuit, plot_barriers=False)), expected) def test_text_measure_html(self): """ The measure operator. HTML representation. """ From 21fa04ee1f67afe9c80224175f9898a20848d402 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 20:50:54 +0200 Subject: [PATCH 07/20] error when style contains unknown options --- qiskit/visualization/qcstyle.py | 96 +++++++++++-------- .../test_circuit_matplotlib_drawer.py | 2 +- 2 files changed, 55 insertions(+), 43 deletions(-) diff --git a/qiskit/visualization/qcstyle.py b/qiskit/visualization/qcstyle.py index b32b3ced49c3..ac0f6381b1e8 100644 --- a/qiskit/visualization/qcstyle.py +++ b/qiskit/visualization/qcstyle.py @@ -15,10 +15,15 @@ # pylint: disable=invalid-name,missing-docstring import warnings +from copy import copy + +from qiskit.visualization.exceptions import VisualizationError + class DefaultStyle: """IBM Design Style colors """ + def __init__(self): # Set colors basis_color = '#FA74A6' @@ -95,32 +100,36 @@ def __init__(self): self.margin = [2.0, 0.1, 0.1, 0.3] self.cline = 'doublet' - def set_style(self, dic): - self.tc = dic.get('textcolor', self.tc) - self.sc = dic.get('subtextcolor', self.sc) - self.lc = dic.get('linecolor', self.lc) - self.cc = dic.get('creglinecolor', self.cc) - self.gt = dic.get('gatetextcolor', self.tc) - self.gc = dic.get('gatefacecolor', self.gc) - self.bc = dic.get('barrierfacecolor', self.bc) - self.bg = dic.get('backgroundcolor', self.bg) - self.fs = dic.get('fontsize', self.fs) - self.sfs = dic.get('subfontsize', self.sfs) - self.disptex = dic.get('displaytext', self.disptex) - self.dispcol = dic.get('displaycolor', self.dispcol) - self.latexmode = dic.get('latexdrawerstyle', self.latexmode) - self.fold = dic.get('fold', self.fold) + def set_style(self, style_dic): + dic = copy(style_dic) + self.tc = dic.pop('textcolor', self.tc) + self.sc = dic.pop('subtextcolor', self.sc) + self.lc = dic.pop('linecolor', self.lc) + self.cc = dic.pop('creglinecolor', self.cc) + self.gt = dic.pop('gatetextcolor', self.tc) + self.gc = dic.pop('gatefacecolor', self.gc) + self.bc = dic.pop('barrierfacecolor', self.bc) + self.bg = dic.pop('backgroundcolor', self.bg) + self.fs = dic.pop('fontsize', self.fs) + self.sfs = dic.pop('subfontsize', self.sfs) + self.disptex = dic.pop('displaytext', self.disptex) + self.dispcol = dic.pop('displaycolor', self.dispcol) + self.latexmode = dic.pop('latexdrawerstyle', self.latexmode) + self.fold = dic.pop('fold', self.fold) if self.fold < 2: self.fold = -1 - self.bundle = dic.get('cregbundle', self.bundle) - self.index = dic.get('showindex', self.index) - self.figwidth = dic.get('figwidth', self.figwidth) - self.dpi = dic.get('dpi', self.dpi) - self.margin = dic.get('margin', self.margin) - self.cline = dic.get('creglinestyle', self.cline) + self.bundle = dic.pop('cregbundle', self.bundle) + self.index = dic.pop('showindex', self.index) + self.figwidth = dic.pop('figwidth', self.figwidth) + self.dpi = dic.pop('dpi', self.dpi) + self.margin = dic.pop('margin', self.margin) + self.cline = dic.pop('creglinestyle', self.cline) if 'plotbarrier' in dic: warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' ' argument "plot_barriers"', DeprecationWarning, 5) + dic.pop('plotbarrier') + if dic: + raise VisualizationError('style option/s {} are/is not supported'.format(dic)) class BWStyle: @@ -192,31 +201,34 @@ def __init__(self): self.margin = [2.0, 0.0, 0.0, 0.3] self.cline = 'doublet' - def set_style(self, dic): - self.tc = dic.get('textcolor', self.tc) - self.sc = dic.get('subtextcolor', self.sc) - self.lc = dic.get('linecolor', self.lc) - self.cc = dic.get('creglinecolor', self.cc) - self.gt = dic.get('gatetextcolor', self.tc) - self.gc = dic.get('gatefacecolor', self.gc) - self.bc = dic.get('barrierfacecolor', self.bc) - self.bg = dic.get('backgroundcolor', self.bg) - self.fs = dic.get('fontsize', self.fs) - self.sfs = dic.get('subfontsize', self.sfs) - self.disptex = dic.get('displaytext', self.disptex) + def set_style(self, style_dic): + dic = copy(style_dic) + self.tc = dic.pop('textcolor', self.tc) + self.sc = dic.pop('subtextcolor', self.sc) + self.lc = dic.pop('linecolor', self.lc) + self.cc = dic.pop('creglinecolor', self.cc) + self.gt = dic.pop('gatetextcolor', self.tc) + self.gc = dic.pop('gatefacecolor', self.gc) + self.bc = dic.pop('barrierfacecolor', self.bc) + self.bg = dic.pop('backgroundcolor', self.bg) + self.fs = dic.pop('fontsize', self.fs) + self.sfs = dic.pop('subfontsize', self.sfs) + self.disptex = dic.pop('displaytext', self.disptex) for key in self.dispcol.keys(): self.dispcol[key] = self.gc - self.dispcol = dic.get('displaycolor', self.dispcol) - self.latexmode = dic.get('latexdrawerstyle', self.latexmode) - self.fold = dic.get('fold', self.fold) + self.dispcol = dic.pop('displaycolor', self.dispcol) + self.latexmode = dic.pop('latexdrawerstyle', self.latexmode) + self.fold = dic.pop('fold', self.fold) if self.fold < 2: self.fold = -1 - self.bundle = dic.get('cregbundle', self.bundle) - self.index = dic.get('showindex', self.index) - self.figwidth = dic.get('figwidth', self.figwidth) - self.dpi = dic.get('dpi', self.dpi) - self.margin = dic.get('margin', self.margin) - self.cline = dic.get('creglinestyle', self.cline) + self.bundle = dic.pop('cregbundle', self.bundle) + self.index = dic.pop('showindex', self.index) + self.figwidth = dic.pop('figwidth', self.figwidth) + self.dpi = dic.pop('dpi', self.dpi) + self.margin = dic.pop('margin', self.margin) + self.cline = dic.pop('creglinestyle', self.cline) if 'plotbarrier' in dic: warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' ' argument "plot_barriers"', DeprecationWarning, 5) + if dic: + raise VisualizationError('style option/s {} are/is not supported'.format(dic)) diff --git a/test/python/visualization/test_circuit_matplotlib_drawer.py b/test/python/visualization/test_circuit_matplotlib_drawer.py index f38b92a6eb82..279b45564c04 100644 --- a/test/python/visualization/test_circuit_matplotlib_drawer.py +++ b/test/python/visualization/test_circuit_matplotlib_drawer.py @@ -132,7 +132,7 @@ def test_long_name(self): filename = self._get_resource_path('current_%s_long_name_matplotlib.png' % os.name) visualization.circuit_drawer(circuit, output='mpl', filename=filename) - # self.addCleanup(os.remove, filename) + self.addCleanup(os.remove, filename) ref_filename = self._get_resource_path( 'visualization/references/%s_long_name_matplotlib.png' % os.name) From acfec7f474435d2d386992c79a36cfb657f4f4af Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 21:12:18 +0200 Subject: [PATCH 08/20] better error message --- qiskit/visualization/qcstyle.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qiskit/visualization/qcstyle.py b/qiskit/visualization/qcstyle.py index ac0f6381b1e8..a6b810d8a254 100644 --- a/qiskit/visualization/qcstyle.py +++ b/qiskit/visualization/qcstyle.py @@ -129,7 +129,8 @@ def set_style(self, style_dic): ' argument "plot_barriers"', DeprecationWarning, 5) dic.pop('plotbarrier') if dic: - raise VisualizationError('style option/s {} are/is not supported'.format(dic)) + raise VisualizationError('style option/s ({}) is/are not ' + 'supported'.format(', '.join(dic.keys()))) class BWStyle: @@ -231,4 +232,6 @@ def set_style(self, style_dic): warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' ' argument "plot_barriers"', DeprecationWarning, 5) if dic: - raise VisualizationError('style option/s {} are/is not supported'.format(dic)) + raise VisualizationError('style option/s ({}) is/are not ' + 'supported'.format(', '.join(dic.keys()))) + From e622a627cbc153cfd5b7865666b0bddbc05bc58a Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 22:55:14 +0200 Subject: [PATCH 09/20] deprecated style option --- qiskit/visualization/matplotlib.py | 28 ++++++++++++++++------------ qiskit/visualization/qcstyle.py | 22 +++++++++++++++------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/qiskit/visualization/matplotlib.py b/qiskit/visualization/matplotlib.py index 6c43743aeed3..d4faaad57750 100644 --- a/qiskit/visualization/matplotlib.py +++ b/qiskit/visualization/matplotlib.py @@ -102,7 +102,7 @@ def get_index(self): class MatplotlibDrawer: def __init__(self, qregs, cregs, ops, - scale=1.0, style=None, plot_barriers=True, + scale=1.0, style=None, fold=25, plot_barriers=True, reverse_bits=False, layout=None): if not HAS_MATPLOTLIB: @@ -146,6 +146,10 @@ def __init__(self, qregs, cregs, ops, dic = json.load(infile) self._style.set_style(dic) + self.fold = self._style.fold or fold # self._style.fold should be removed after 0.10 + if self.fold < 2: + self.fold = -1 + self.figure = plt.figure() self.figure.patch.set_facecolor(color=self._style.bg) self.ax = self.figure.add_subplot(111) @@ -443,8 +447,8 @@ def _barrier(self, config, anc): y_reg.append(qreg['y']) x0 = xys[0][0] - box_y0 = min(y_reg) - int(anc / self._style.fold) * (self._cond['n_lines'] + 1) - 0.5 - box_y1 = max(y_reg) - int(anc / self._style.fold) * (self._cond['n_lines'] + 1) + 0.5 + box_y0 = min(y_reg) - int(anc / self.fold) * (self._cond['n_lines'] + 1) - 0.5 + box_y1 = max(y_reg) - int(anc / self.fold) * (self._cond['n_lines'] + 1) + 0.5 box = patches.Rectangle(xy=(x0 - 0.3 * WID, box_y0), width=0.6 * WID, height=box_y1 - box_y0, fc=self._style.bc, ec=None, alpha=0.6, @@ -602,7 +606,7 @@ def _draw_regs_sub(self, n_fold, feedline_l=False, feedline_r=False): # lf line if feedline_r: - self._linefeed_mark((self._style.fold + 1 - 0.1, + self._linefeed_mark((self.fold + 1 - 0.1, - n_fold * (self._cond['n_lines'] + 1))) if feedline_l: self._linefeed_mark((0.1, @@ -619,12 +623,12 @@ def _draw_ops(self, verbose=False): for key, qreg in self._qreg_dict.items(): q_anchors[key] = Anchor(reg_num=self._cond['n_lines'], yind=qreg['y'], - fold=self._style.fold) + fold=self.fold) c_anchors = {} for key, creg in self._creg_dict.items(): c_anchors[key] = Anchor(reg_num=self._cond['n_lines'], yind=creg['y'], - fold=self._style.fold) + fold=self.fold) # # draw gates # @@ -933,10 +937,10 @@ def _draw_ops(self, verbose=False): max_anc = max(anchors) else: max_anc = 0 - n_fold = max(0, max_anc - 1) // self._style.fold + n_fold = max(0, max_anc - 1) // self.fold # window size - if max_anc > self._style.fold > 0: - self._cond['xmax'] = self._style.fold + 1 + self.x_offset + if max_anc > self.fold > 0: + self._cond['xmax'] = self.fold + 1 + self.x_offset self._cond['ymax'] = (n_fold + 1) * (self._cond['n_lines'] + 1) - 1 else: self._cond['xmax'] = max_anc + 1 + self.x_offset @@ -949,9 +953,9 @@ def _draw_ops(self, verbose=False): # draw gate number if self._style.index: for ii in range(max_anc): - if self._style.fold > 0: - x_coord = ii % self._style.fold + 1 - y_coord = - (ii // self._style.fold) * (self._cond['n_lines'] + 1) + 0.7 + if self.fold > 0: + x_coord = ii % self.fold + 1 + y_coord = - (ii // self.fold) * (self._cond['n_lines'] + 1) + 0.7 else: x_coord = ii + 1 y_coord = 0.7 diff --git a/qiskit/visualization/qcstyle.py b/qiskit/visualization/qcstyle.py index a6b810d8a254..f7ff0170f9a4 100644 --- a/qiskit/visualization/qcstyle.py +++ b/qiskit/visualization/qcstyle.py @@ -92,7 +92,7 @@ def __init__(self): 'meas': non_gate_color } self.latexmode = False - self.fold = 25 + self.fold = None # To be removed after 0.10 is released self.bundle = True self.index = False self.figwidth = -1 @@ -115,9 +115,6 @@ def set_style(self, style_dic): self.disptex = dic.pop('displaytext', self.disptex) self.dispcol = dic.pop('displaycolor', self.dispcol) self.latexmode = dic.pop('latexdrawerstyle', self.latexmode) - self.fold = dic.pop('fold', self.fold) - if self.fold < 2: - self.fold = -1 self.bundle = dic.pop('cregbundle', self.bundle) self.index = dic.pop('showindex', self.index) self.figwidth = dic.pop('figwidth', self.figwidth) @@ -128,6 +125,12 @@ def set_style(self, style_dic): warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' ' argument "plot_barriers"', DeprecationWarning, 5) dic.pop('plotbarrier') + if 'fold' in dic: + warnings.warn('The key "fold" in the argument "style" is being replaced by the' + ' argument "fold"', DeprecationWarning, 5) + self.fold = dic.pop('fold', self.fold) + if self.fold < 2: + self.fold = -1 if dic: raise VisualizationError('style option/s ({}) is/are not ' 'supported'.format(', '.join(dic.keys()))) @@ -219,9 +222,6 @@ def set_style(self, style_dic): self.dispcol[key] = self.gc self.dispcol = dic.pop('displaycolor', self.dispcol) self.latexmode = dic.pop('latexdrawerstyle', self.latexmode) - self.fold = dic.pop('fold', self.fold) - if self.fold < 2: - self.fold = -1 self.bundle = dic.pop('cregbundle', self.bundle) self.index = dic.pop('showindex', self.index) self.figwidth = dic.pop('figwidth', self.figwidth) @@ -229,8 +229,16 @@ def set_style(self, style_dic): self.margin = dic.pop('margin', self.margin) self.cline = dic.pop('creglinestyle', self.cline) if 'plotbarrier' in dic: + # To be removed after 0.10 is released warnings.warn('The key "plotbarrier" in the argument "style" is being replaced by the' ' argument "plot_barriers"', DeprecationWarning, 5) + if 'fold' in dic: + # To be removed after 0.10 is released + warnings.warn('The key "fold" in the argument "style" is being replaced by the' + ' argument "fold"', DeprecationWarning, 5) + self.fold = dic.pop('fold', self.fold) + if self.fold < 2: + self.fold = -1 if dic: raise VisualizationError('style option/s ({}) is/are not ' 'supported'.format(', '.join(dic.keys()))) From f2f5cf00236abc2a2cac490e38217008a7e32d27 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 23:07:24 +0200 Subject: [PATCH 10/20] mp karg fold --- qiskit/circuit/quantumcircuit.py | 6 ++++-- qiskit/visualization/circuit_visualization.py | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/qiskit/circuit/quantumcircuit.py b/qiskit/circuit/quantumcircuit.py index 38aae6b2506e..1332391fc805 100644 --- a/qiskit/circuit/quantumcircuit.py +++ b/qiskit/circuit/quantumcircuit.py @@ -523,8 +523,8 @@ def qasm(self): def draw(self, scale=0.7, filename=None, style=None, output=None, interactive=False, line_length=None, plot_barriers=True, - reverse_bits=False, justify=None, vertical_compression='medium', idle_wires=True, - with_layout=True): + reverse_bits=False, justify=None, fold=None, vertical_compression='medium', + idle_wires=True, with_layout=True): """Draw the quantum circuit Using the output parameter you can specify the format. The choices are: @@ -561,6 +561,7 @@ def draw(self, scale=0.7, filename=None, style=None, output=None, gates should be placed in the output circuit if there is an option. `none` results in each gate being placed in its own column. Currently only supported by text drawer. + fold (int): In MPL is the amount of operations before folding. Default is 25. vertical_compression (string): `high`, `medium` or `low`. It merges the lines generated by `text` so the drawing will take less vertical room. Default is `medium`. It is ignored if output is not `text`. @@ -590,6 +591,7 @@ def draw(self, scale=0.7, filename=None, style=None, output=None, plot_barriers=plot_barriers, reverse_bits=reverse_bits, justify=justify, + fold=fold, vertical_compression=vertical_compression, idle_wires=idle_wires, with_layout=with_layout) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index d0e320622446..690e91336f29 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -54,6 +54,7 @@ def circuit_drawer(circuit, plot_barriers=True, reverse_bits=False, justify=None, + fold=None, vertical_compression='medium', idle_wires=True, with_layout=True): @@ -96,6 +97,7 @@ def circuit_drawer(circuit, gates should be placed in the output circuit if there is an option. `none` results in each gate being placed in its own column. Currently only supported by text drawer. + fold (int): In MPL is the amount of operations before folding. Default is 25. vertical_compression (string): `high`, `medium` or `low`. It merges the lines generated by `text` so the drawing will take less vertical room. Default is `medium`. It is ignored if output is not `text`. @@ -253,6 +255,7 @@ def circuit_drawer(circuit, plot_barriers=plot_barriers, reverse_bits=reverse_bits, justify=justify, + fold=fold, idle_wires=idle_wires, with_layout=with_layout) else: @@ -529,6 +532,7 @@ def _matplotlib_circuit_drawer(circuit, plot_barriers=True, reverse_bits=False, justify=None, + fold=None, idle_wires=True, with_layout=True): """Draw a quantum circuit based on matplotlib. @@ -544,8 +548,9 @@ def _matplotlib_circuit_drawer(circuit, registers for the output visualization. plot_barriers (bool): Enable/disable drawing barriers in the output circuit. Defaults to True. - justify (str) : `left`, `right` or `none`. Defaults to `left`. Says how + justify (str): `left`, `right` or `none`. Defaults to `left`. Says how the circuit should be justified. + fold (int): amount ops allowed before folding. Default is 25. idle_wires (bool): Include idle wires. Default is True. with_layout (bool): Include layout information, with labels on the physical layout. Default: True. @@ -562,7 +567,10 @@ def _matplotlib_circuit_drawer(circuit, else: layout = None + if fold is None: + fold = 25 + qcd = _matplotlib.MatplotlibDrawer(qregs, cregs, ops, scale=scale, style=style, - plot_barriers=plot_barriers, + plot_barriers=plot_barriers, fold=fold, reverse_bits=reverse_bits, layout=layout) return qcd.draw(filename) From 8c65c509289b7b18d70771e9672e688c18b17e1c Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 23:22:05 +0200 Subject: [PATCH 11/20] text fold --- qiskit/visualization/circuit_visualization.py | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 690e91336f29..0126dd5088ae 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -27,6 +27,7 @@ import os import subprocess import tempfile +from warnings import warn try: from PIL import Image @@ -82,12 +83,7 @@ def circuit_drawer(circuit, supporting this). Note when used with either the `text` or the `latex_source` output type this has no effect and will be silently ignored. - line_length (int): Sets the length of the lines generated by `text` - output type. This useful when the drawing does not fit in the - console. If None (default), it will try to guess the console width - using shutil.get_terminal_size(). However, if you're running in - jupyter the default line length is set to 80 characters. If you - don't want pagination at all, set `line_length=-1`. + line_length (int): Deprecated. See `fold`. reverse_bits (bool): When set to True reverse the bit order inside registers for the output visualization. plot_barriers (bool): Enable/disable drawing barriers in the output @@ -97,7 +93,12 @@ def circuit_drawer(circuit, gates should be placed in the output circuit if there is an option. `none` results in each gate being placed in its own column. Currently only supported by text drawer. - fold (int): In MPL is the amount of operations before folding. Default is 25. + fold (int): Sets pagination. It can be disabled using -1. + In `text`, sets the length of the lines. This useful when the + drawing does not fit in the console. If None (default), it will try to + guess the console width using `shutil.get_terminal_size()`. However, if + you're running in jupyter the default line length is set to 80 characters. + In MPL is the amount of operations before folding. Default is 25. vertical_compression (string): `high`, `medium` or `low`. It merges the lines generated by `text` so the drawing will take less vertical room. Default is `medium`. It is ignored if output is not `text`. @@ -229,6 +230,7 @@ def circuit_drawer(circuit, reverse_bits=reverse_bits, plot_barriers=plot_barriers, justify=justify, + fold=fold, vertical_compression=vertical_compression, idle_wires=idle_wires, with_layout=with_layout) @@ -344,22 +346,23 @@ def qx_color_scheme(): def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits=False, - plot_barriers=True, justify=None, vertical_compression='high', - idle_wires=True, with_layout=True): + plot_barriers=True, justify=None, fold=None, + vertical_compression='high', idle_wires=True, with_layout=True): """ Draws a circuit using ascii art. Args: circuit (QuantumCircuit): Input circuit filename (str): optional filename to write the result - line_length (int): Optional. Breaks the circuit drawing to this length. This - useful when the drawing does not fit in the console. If - None (default), it will try to guess the console width using - shutil.get_terminal_size(). If you don't want pagination - at all, set line_length=-1. + line_length (int): Deprecated. See `fold`. reverse_bits (bool): Rearrange the bits in reverse order. plot_barriers (bool): Draws the barriers when they are there. justify (str) : `left`, `right` or `none`. Defaults to `left`. Says how the circuit should be justified. + fold (int): Optional. Breaks the circuit drawing to this length. This + useful when the drawing does not fit in the console. If + None (default), it will try to guess the console width using + `shutil.get_terminal_size()`. If you don't want pagination + at all, set `fold=-1`. vertical_compression (string): `high`, `medium`, or `low`. It merges the lines so the drawing will take less vertical room. Default is `high`. idle_wires (bool): Include idle wires. Default is True. @@ -376,9 +379,12 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= layout = circuit._layout else: layout = None + if line_length: + warn('The parameter "line_length" is being replaced by "fold"', DeprecationWarning, 3) + fold = line_length text_drawing = _text.TextDrawing(qregs, cregs, ops, layout=layout) text_drawing.plotbarriers = plot_barriers - text_drawing.line_length = line_length + text_drawing.line_length = fold text_drawing.vertical_compression = vertical_compression if filename: From 58b230d060feac3009beeaef0a1aa6a89c538823 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 23:27:30 +0200 Subject: [PATCH 12/20] lint --- qiskit/visualization/qcstyle.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qiskit/visualization/qcstyle.py b/qiskit/visualization/qcstyle.py index f7ff0170f9a4..e4b38d39a155 100644 --- a/qiskit/visualization/qcstyle.py +++ b/qiskit/visualization/qcstyle.py @@ -92,7 +92,7 @@ def __init__(self): 'meas': non_gate_color } self.latexmode = False - self.fold = None # To be removed after 0.10 is released + self.fold = None # To be removed after 0.10 is released self.bundle = True self.index = False self.figwidth = -1 @@ -242,4 +242,3 @@ def set_style(self, style_dic): if dic: raise VisualizationError('style option/s ({}) is/are not ' 'supported'.format(', '.join(dic.keys()))) - From b9316f272a6a744daa9d3cefbe717a2525a71e65 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 23:39:10 +0200 Subject: [PATCH 13/20] docstring --- qiskit/visualization/circuit_visualization.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 0126dd5088ae..60efece02c76 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -359,9 +359,9 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= justify (str) : `left`, `right` or `none`. Defaults to `left`. Says how the circuit should be justified. fold (int): Optional. Breaks the circuit drawing to this length. This - useful when the drawing does not fit in the console. If - None (default), it will try to guess the console width using - `shutil.get_terminal_size()`. If you don't want pagination + useful when the drawing does not fit in the console. If + None (default), it will try to guess the console width using + `shutil.get_terminal_size()`. If you don't want pagination at all, set `fold=-1`. vertical_compression (string): `high`, `medium`, or `low`. It merges the lines so the drawing will take less vertical room. Default is `high`. From bba055fb2c481e46f002fd2d751f855c30369880 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 16 Sep 2019 23:42:39 +0200 Subject: [PATCH 14/20] cregbundle text option --- qiskit/visualization/circuit_visualization.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 0126dd5088ae..c3d7dd5cd8bf 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -346,7 +346,7 @@ def qx_color_scheme(): def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits=False, - plot_barriers=True, justify=None, fold=None, + plot_barriers=True, justify=None, fold=None, cregbundle=False, vertical_compression='high', idle_wires=True, with_layout=True): """ Draws a circuit using ascii art. @@ -386,6 +386,7 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= text_drawing.plotbarriers = plot_barriers text_drawing.line_length = fold text_drawing.vertical_compression = vertical_compression + text_drawing.cregbundle = cregbundle if filename: text_drawing.dump(filename) From 90a839b75bcb60074a9f279a019f2c6bbfba8d3f Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Tue, 17 Sep 2019 06:29:38 -0400 Subject: [PATCH 15/20] Revert "cregbundle text option" This reverts commit bba055fb2c481e46f002fd2d751f855c30369880. --- qiskit/visualization/circuit_visualization.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index aad00665252c..60efece02c76 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -346,7 +346,7 @@ def qx_color_scheme(): def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits=False, - plot_barriers=True, justify=None, fold=None, cregbundle=False, + plot_barriers=True, justify=None, fold=None, vertical_compression='high', idle_wires=True, with_layout=True): """ Draws a circuit using ascii art. @@ -386,7 +386,6 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= text_drawing.plotbarriers = plot_barriers text_drawing.line_length = fold text_drawing.vertical_compression = vertical_compression - text_drawing.cregbundle = cregbundle if filename: text_drawing.dump(filename) From d7f7e6f78aaecd313de9746da4680942899adce2 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Tue, 17 Sep 2019 06:31:51 -0400 Subject: [PATCH 16/20] revert 3100 --- qiskit/compiler/transpile.py | 9 ++------- qiskit/converters/__init__.py | 22 ---------------------- qiskit/transpiler/layout.py | 11 +++++------ test/python/transpiler/test_layout.py | 14 -------------- 4 files changed, 7 insertions(+), 49 deletions(-) diff --git a/qiskit/compiler/transpile.py b/qiskit/compiler/transpile.py index 2fcacc993d54..aa14d3ffeaa0 100644 --- a/qiskit/compiler/transpile.py +++ b/qiskit/compiler/transpile.py @@ -24,7 +24,6 @@ from qiskit.circuit.quantumregister import Qubit from qiskit import user_config from qiskit.transpiler.exceptions import TranspilerError -from qiskit.converters import isinstanceint, isinstancelist def transpile(circuits, @@ -331,17 +330,13 @@ def _parse_initial_layout(initial_layout, circuits): # initial_layout could be None, or a list of ints, e.g. [0, 5, 14] # or a list of tuples/None e.g. [qr[0], None, qr[1]] or a dict e.g. {qr[0]: 0} def _layout_from_raw(initial_layout, circuit): - if initial_layout is None or isinstance(initial_layout, Layout): - return initial_layout - elif isinstancelist(initial_layout): - if all(isinstanceint(elem) for elem in initial_layout): + if isinstance(initial_layout, list): + if all(isinstance(elem, int) for elem in initial_layout): initial_layout = Layout.from_intlist(initial_layout, *circuit.qregs) elif all(elem is None or isinstance(elem, Qubit) for elem in initial_layout): initial_layout = Layout.from_qubit_list(initial_layout) elif isinstance(initial_layout, dict): initial_layout = Layout(initial_layout) - else: - raise TranspilerError("The initial_layout parameter could not be parsed") return initial_layout # multiple layouts? diff --git a/qiskit/converters/__init__.py b/qiskit/converters/__init__.py index ca668d3a2d0a..2c3fa89968f5 100644 --- a/qiskit/converters/__init__.py +++ b/qiskit/converters/__init__.py @@ -21,25 +21,3 @@ from .dag_to_circuit import dag_to_circuit from .ast_to_dag import ast_to_dag from .circuit_to_instruction import circuit_to_instruction - - -def isinstanceint(obj): - """ Like isinstance(obj,int), but with casting. Except for strings.""" - if isinstance(obj, str): - return False - try: - int(obj) - return True - except TypeError: - return False - - -def isinstancelist(obj): - """ Like isinstance(obj, list), but with casting. Except for strings and dicts.""" - if isinstance(obj, (str, dict)): - return False - try: - list(obj) - return True - except TypeError: - return False diff --git a/qiskit/transpiler/layout.py b/qiskit/transpiler/layout.py index 8a1143a1a5ff..4b10e72774a8 100644 --- a/qiskit/transpiler/layout.py +++ b/qiskit/transpiler/layout.py @@ -23,7 +23,6 @@ from qiskit.circuit.quantumregister import Qubit from qiskit.transpiler.exceptions import LayoutError -from qiskit.converters import isinstanceint class Layout(): @@ -88,11 +87,11 @@ def from_dict(self, input_dict): @staticmethod def order_based_on_type(value1, value2): """decides which one is physical/virtual based on the type. Returns (virtual, physical)""" - if isinstanceint(value1) and isinstance(value2, (Qubit, type(None))): - physical = int(value1) + if isinstance(value1, int) and isinstance(value2, (Qubit, type(None))): + physical = value1 virtual = value2 - elif isinstanceint(value2) and isinstance(value1, (Qubit, type(None))): - physical = int(value2) + elif isinstance(value2, int) and isinstance(value1, (Qubit, type(None))): + physical = value2 virtual = value1 else: raise LayoutError('The map (%s -> %s) has to be a (Bit -> integer)' @@ -273,7 +272,7 @@ def from_intlist(int_list, *qregs): Raises: LayoutError: Invalid input layout. """ - if not all(isinstanceint(i) for i in int_list): + if not all(isinstance(i, int) for i in int_list): raise LayoutError('Expected a list of ints') if len(int_list) != len(set(int_list)): raise LayoutError('Duplicate values not permitted; Layout is bijective.') diff --git a/test/python/transpiler/test_layout.py b/test/python/transpiler/test_layout.py index cd8b99bc88d5..95d90f98acd3 100644 --- a/test/python/transpiler/test_layout.py +++ b/test/python/transpiler/test_layout.py @@ -17,7 +17,6 @@ import copy import unittest import warnings -import numpy from qiskit.circuit import QuantumRegister, Qubit from qiskit.transpiler.layout import Layout @@ -326,19 +325,6 @@ def test_layout_from_intlist(self): self.assertDictEqual(layout._p2v, expected._p2v) self.assertDictEqual(layout._v2p, expected._v2p) - def test_layout_from_intlist_numpy(self): - """Create a layout from a list of numpy integers. See #3097 - """ - qr1 = QuantumRegister(1, 'qr1') - qr2 = QuantumRegister(2, 'qr2') - qr3 = QuantumRegister(3, 'qr3') - intlist_layout = numpy.array([0, 1, 2, 3, 4, 5]) - layout = Layout.from_intlist(intlist_layout, qr1, qr2, qr3) - - expected = Layout.generate_trivial_layout(qr1, qr2, qr3) - self.assertDictEqual(layout._p2v, expected._p2v) - self.assertDictEqual(layout._v2p, expected._v2p) - def test_layout_from_intlist_short(self): """If the intlist is longer that your quantum register, map them to None. virtual physical From 77ee3d5ff7bfe91e0a4b8d550a8547c31a57e2fa Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Thu, 26 Sep 2019 15:13:18 -0400 Subject: [PATCH 17/20] new pickles --- .../pickles/TestsBasicSwap_a_cx_to_map.pickle | Bin 1225 -> 1225 bytes .../TestsBasicSwap_handle_measurement.pickle | Bin 1480 -> 1480 bytes .../TestsBasicSwap_initial_layout.pickle | Bin 1530 -> 1530 bytes .../TestsLookaheadSwap_a_cx_to_map.pickle | Bin 1705 -> 1705 bytes ...stsLookaheadSwap_handle_measurement.pickle | Bin 2406 -> 2406 bytes .../TestsLookaheadSwap_initial_layout.pickle | Bin 2224 -> 2224 bytes .../TestsStochasticSwap_a_cx_to_map.pickle | Bin 1225 -> 1225 bytes ...tsStochasticSwap_handle_measurement.pickle | Bin 1533 -> 1533 bytes .../TestsStochasticSwap_initial_layout.pickle | Bin 1530 -> 1530 bytes 9 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/python/pickles/TestsBasicSwap_a_cx_to_map.pickle b/test/python/pickles/TestsBasicSwap_a_cx_to_map.pickle index 57db27eb8e74918d02327048f44659441db324a7..4a71dd77ef3c4aa4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tq<{cwrQ->Pu7hK#CB2Qk|}fx zRJYX&m}0~#3DQ}Rw$oy?E;9Wto0LL@JGj!t)xCJUj!_HSNyc)GSgI1&dn_el@jAG% zljG(#$1PJ-#1wJd?&40)k@u^`S)4}PSni#;OW5}$?kj=SO!OY$0ihSEf}*P6;Wqjs zF-9^y-i_-8ERKDT1$nQHnwm8OPY8cT;wkC*+F5noP|pq6RLcj6kJ`(n!us`t^NTBriY3E diff --git a/test/python/pickles/TestsBasicSwap_handle_measurement.pickle b/test/python/pickles/TestsBasicSwap_handle_measurement.pickle index 33861bf47b7cc7bb3cc2657bbdb15347c7f4a0c5..2ef7e2373a78f5510f51f77067b0a6c7933611dc 100644 GIT binary patch literal 1480 zcma)6XLHj)5Oqvw3Y`#oFOdl`y>~)4m=2-{bCNHtK$i0?2@Eqg1E2i2**ob1I825w z*7#{(*<$}#5+X`JM_E0LdST8_U!%cl}c+)^h8Hy zve(K)5KAnOn=df$oyWHRxh{7w%5qB;mU+vxTA{IAVMQ8vOBo4!@?(mXKAhp0VJy-# z3PsEnQOW_F8H+r%2*y}_mBMP*8)dPClVXiGqII#>Kxy<{VqIg@n6-i^OR?U^2KRs5 zxZ1%+b{JRK;lSkfY4$1Xcd3{NaDaFa#O)tk z(EdU-)BGXUm{f3e(h4Wt$6acyrf}GHX|XAVBeqM6O)J!GmyDS%_10T$kqI32acn+` z>}N7bqi&Mc(@Z37(QDVkzB7|_vpXW=LpsjBClpS)W=>%@$$H%wr<$I_f=S+KAvfzi z-Kfq(VQio?ye~6cbE_%N`Z!nIV=Mw0<9w56RArg4j|<+I2`FcyB+57sE;jSP$0e60 zsV03~9^i^y#=k<7bGHb5l>=W>xbD)aCY|Ps;26Z#H^}(uD<#ZOA%Bymg^ybU++IvO z{VL|1XZ%q(++l~i3inEfs&%+uIOv~*W}s1;JaB26rnrZP12jnw^pV2jVfGWlrVAzM zsY_F)@n-`(CvEvc;pH&tRY9^&o+Z5=;Ei#5tMG1^=<&9BmwMSH0kZ64mL_?^A8A|+K&07`!l%F4#ALFB&osq^ zn6@yXV+e^tcM-yz*&%2f6MBY_DrAcga;mYz7uvyuuaa|b&^N)yAInx5zax_j{XD4u E0t;Z_3;+NC literal 1480 zcma)6Ygf}i5N(Sn22@m3d?ARB;G@3ZZ&5)jRTMR%v2N4ViKZ#HNu+wto}-`ox1HT2 z7CFfAOWK{;J9p;p-Tm3;!H>TBaoO|RUc$dfL>MQ{Y-!D>%jq<0p)mCeMTL^>Y$y~8 zp=e6CT1B>*lar+b%j9GWdN&6eNKtjUI&AY#ec%2Swm9y;|N2Q(w~qQn9!C= z!P%tYOQJ2B5w^P6W&&O-jN7dM!&PTc=Ns~qANn!(gYDI%?qbKEPFJbYmY@A7mTi`W zDJ<;dK1URG+0FnL%Cp#=5BhJo5&1=44tu!JsKQ>GM=WwFV4o2<@_$I|uVhM^u@1O6 zXwwL3?lFZ!HtnWSqqHA3WC!DwVp2ER35CNZOXHPN7MoN!lE?azy5#V9rNG}Y>EdV? z$MV+KIwP`X)AKpb+_u7$P3BN^$Al9!R4EdxPOS7v8m>~R<|&#KE>3q*UaxkvES9X7 z{7D(kFvD4ea~Xp+o8E!*Oj628F7!w)+B8WMJj10fE|d1p6@{xQng&;buJu6IZJIEH z-{|5dY06s)w=>XROm}*qyE*7y7xxX*w8De6m>%{(k8B#F5pHj$i`iU;+#T7SvF6gd zW8pD(@t>e!;fyF8{1sblXI+&s3@ zkfMtZq=l#{d}Jb8F+8o9UC;#2UMGhEo&huz=7wDj4L{94pvQ4b{AtF<=olHOqQ)^q(#>E(jn gZXx2~V}&Gr1JfGc6qciU`m6=wdn<|2;U}y78@oi<;{X5v diff --git a/test/python/pickles/TestsBasicSwap_initial_layout.pickle b/test/python/pickles/TestsBasicSwap_initial_layout.pickle index 107008ffaa35ac4f13e08e69033df2f5605dc8bc..97538a54401700c8148acc03ac7d98f3a4632c8e 100644 GIT binary patch literal 1530 zcma)6`*+kt6y7Z@kMIx`5fM>=YIv=sC|GJiEl^-#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TestsLookaheadSwap_a_cx_to_map.pickle b/test/python/pickles/TestsLookaheadSwap_a_cx_to_map.pickle index 4e77b3b21c8da2f3b2596e4de8c9855f53d19e55..fcb5b956a958d52722d32e3ee7431792709d01ff 100644 GIT binary patch literal 1705 zcma)*`=8T96vf-}4j_n#yc9&&&4N}$5qYSzAdr7 zv&0Mw!nnxsqK^&k|Cz?s4qoC38woGFrbC?eg(CY`hO6Yp^EHsM{@WDyP0A{!*w+w~l7l$QMfr8%zmI?b^ZB}UrEk_pi4UXJ&D zd{9LwGTx^BK0Y+o4-h`GI69((ghL#W8i#Y(RR>Jv5yHn7@?Z`A3E@)<$r?lQ!EwNP za!rGy-fDv_uf=Ix#Df&ax@G9&xSA3^X4OV9!e{n4<*<-x&P91UFGSiCS+A{}Qzu2i z_vCZ-cY<)zRr@%8COV~#b=BUkVt&O$Ul^aK2_5TG6P+QPT|m@zP2D-dc}sqVc}^Sk z0^y=1VznZwE@mP^ncz~lULb|b8skef%@|*eaOHUn`AsqJT;iXK#A9Dq317RF`<4az zMw#~dqUta3Ed%NyzN@CxwDj@a2*LB_L_=pb9Te4+?|F(KgyX!Tab7K*SFZ{}60X@G zbYOD?wIHzARnmm>1L3-jcCKE5gwVHvv1S5OiL5|c3=$2IYKDPkm|=$b5uo&HXN0^? zpveg|^^q3ZSZSu+Al&?~uOZ>q0$;aXb;DHtNchS68rHsu@U!*Bnq5tGw2t%_vwnBf zW?sL$#?C#$uZ!*6*LEJ5ArA>7+fc{!i12uUohMbCzY%`7wjb4I{viBm4QlP-gq^2q fhS%sXwUzDsEqTTCr4d0i42nU}=T-Qp4BP(#gL^44 literal 1705 zcma)7`Fj*a5Zz6<91x-+A__)~abk4QsE7xkgiBXeE_GCfv1hhPkIc^I%^}NC5ENK1 z@c4_Z?wL-q;rqZ}vf0;rQ-c!qUuCp_zVo0!p_V#njJ z8&}WTba;*v?Ib*}3vO~MV3%<;kFQC*&>pWGH1)mcW4EieE6u%!@RF-`sGa6KPP=k| z$#%00&FRa8z2;O+w#Uj)GCbLCl%Xg?AFr5@DZ;BdMDtG*USoc>OEIBh8rM}*CTfQ8 zx{jLW`!@M3;SGz8B=_;=+VZ1Bs~o%G3`FWTb$_s+^Msy*!DKxpCi0u zZHw@(75|>A_9>lzKjD2XbgmY!u>*t;EH)y3h!3q0IVfbB^K|5`ybx(uWZjl>PM#2j zbnp=;`IvCf^)~2HOGGFW9O~5FQ#h=6GS!xLL-F{1qPBI^L`U&peQNwXLYUX|+V!J^ zVj7WS+3#I z5DQ8#8%2n9dZ+GNQ}^x16-Ac~RYK@lK`Eg>B52W7iHQOs(^2UvK{=tY*lIzhZ>5^z zzWt>3iy^KUIRnDghvZyak#pS;-5`*abCYmuM9xy>;cddtI_73QMtW=fLbziw{hV)9 zn}Ky1Id|18%ekixu$-Z+79&609KZVbO-&1fLCspP6oA6H_R{J~=SNmmwe>-K^`VTRQBU=Cf diff --git a/test/python/pickles/TestsLookaheadSwap_handle_measurement.pickle b/test/python/pickles/TestsLookaheadSwap_handle_measurement.pickle index c8338c7673bb2a17d489f6c046f6aaba69dc09b6..b0c291c2988b10ea98e92a14742cfa43638f1a69 100644 GIT binary patch literal 2406 zcma)-`F|5t6vfj}76(*BL`2+h>D1b~p@1TaRY5C}Qq;J_I7x@Tkz~@7nUR8CEhxl& zLEQIU5ygE)+;>IX*FVO4-^>e5>c@{iwE5)Z=Dzd2=g!OUm?FGjr5AP;y=pPyS455< zM&;zK)f>OMLfXzwPNh=$L8t1J-O#P(L#I%3F{)j?K!0v6HTBD-+(Ik2 z8%r3M9Vgx59^(lUfvZ zQrQW7h;fE})ugDPq;xuAKU+=fX;Hhh8HD{sOOMcI5)Ke;Osu(4!O4#2midyix)Oyr zFr&|d9?wBJ9NcU;Nzqs^G42}8A?#)r;ZR$}69EoWJP5`3hmXP^-A%(E!9Cgtwm40( z(^*U@T07xLLus@Q!cm6OXq|*EL&=(^l+^S6PUzt19FD0wafd?J54?&WbOoW~_dC`8 zuHul@?N`D@PRNU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@PC-LcQi;q&wS7dCMKQqcS?r+!r{ss_QUM+5OuJgo zyURV_3z-k5rZs1X@^FA@S?pQoJf=Toci0O;x6BRVVixvd#?uLV+nGt6(yU^Jk^Jx5 zb-Ndvbl8Uz%_Qt=v)C3+1=44C25YP2T!uSS3I3hUmsuQU>z!Q$TSX~a-GsxLmYgM- zhve!<*s@DU^$?C!QQe%v)JzhNGMK5^OE}tKO*MPmERLz+*s<-3$H`g{jg^Jtn8)#i z6I6SYxp4qal#^2}ati;k%_qr@w49ojY~ab7-yFgzM#WshsZA ztZ@i=gPD%xeXq5KB@|Jr#i> zt7_$e)2jSPmGZx2%cSh(aUQ7wQa#AZgdo~2+edE-8?C5BI#&`_nO;;0tDAbUCW^U& zaHWc=j_L&wt}>YF#Y)}Ts|jljI@(Q1`hc%fMAf;wriN>!I#<^b)~k|DXX*L|%bHHR zfpCK%xsh;V6Umz*k~b4>Q8621k{k5STM4%r)I1SxC){DMI!V@`4ZBnJuwi$}0a3%< zQaN!C;oi8HO$OZ8FyMY$_Q)jbdZ2~}wE+(i9^RD!k2It`8u8vlc+64xiXRd_+KJ-F4T_)WLfZ+S8j3pzpEXhZJnG{YgfCUhj<}E8_0F#dUmMg={D$zY z!Ri#vjC`kOLjy1N@l9PqJHR#L>vlS^OeXBGbWVIQl4X`3*i4id@0P zujZLx-qiZ5K?Ue_YmxehP`67|xP{-ipT86Sh`vyw9Dfr23Ubj$M?tJERYLrouH=&c E0Mo4>=>Px# diff --git a/test/python/pickles/TestsLookaheadSwap_initial_layout.pickle b/test/python/pickles/TestsLookaheadSwap_initial_layout.pickle index 96c164e0a88649ba65b75762d73cbffd28a46b52..3774169bce1aec77f32b87a977d07d2306955a27 100644 GIT binary patch literal 2224 zcma)-`F|5t6vdNL76(LBL`2-J4vMi>MQg37Rj7uBRSjy4FUi0gNhdj(nG(<|6qUL! zi2JUH`>u%l`iFV%n|Xz_e$Zc%PtM%A_j}H}Gub_(3P0TDN4cuss>b|{SOrl$n*Maw zCq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JSPPlp60v^7s{P>81+xAx8~kWBXje~n*cF4HYRqb7 z?XDX9Tw@=!VtK_HeyNlDSQD#vV(2~Qe^o30%C3GhxaO1VUpp<<0@qoxNtUc(CA+aM z*-f8jX<9~DSi`NY;v^$)As>`gl-nHTj=|k=lu3?~jBsybjQi^`9@rT393xo6BH5xY z8FW}Q+E7T^P{)U^j*sXvKYrN}Rtz3*L3l#*T==JSg$chq!XF0V7KCSXf(d`pRVF-_ zuBE}ez4U%fnR6cqJQpMHs7_YHcwcD}~xf-UKELzo-x9Ap~hu7?h4AN>Nc8Bd%yfJv| zbA|2bWd?oQPIlIFgMroJXx*H{YNTOMSeu+%(+;xbDTA`ccv2mv4OVN+wrf@mGIuFY jAh@km&?K$h4(YD8hj?c&@+sp~z!r)vbkNi~)^Y1S4V~#& From 75b424436d8cdba732896d9b67aef0955b7d136e Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Thu, 26 Sep 2019 15:58:07 -0400 Subject: [PATCH 18/20] cleaning up the diff --- qiskit/circuit/quantumcircuit.py | 9 ++-- qiskit/visualization/circuit_visualization.py | 48 +++++++++---------- qiskit/visualization/matplotlib.py | 4 +- 3 files changed, 30 insertions(+), 31 deletions(-) diff --git a/qiskit/circuit/quantumcircuit.py b/qiskit/circuit/quantumcircuit.py index 97155dfc8e6b..1b5416a57233 100644 --- a/qiskit/circuit/quantumcircuit.py +++ b/qiskit/circuit/quantumcircuit.py @@ -560,8 +560,8 @@ def qasm(self): def draw(self, scale=0.7, filename=None, style=None, output=None, interactive=False, line_length=None, plot_barriers=True, - reverse_bits=False, justify=None, fold=None, vertical_compression='medium', - idle_wires=True, with_layout=True): + reverse_bits=False, justify=None, idle_wires=True, vertical_compression='medium', + with_layout=True, fold=None): """Draw the quantum circuit Using the output parameter you can specify the format. The choices are: @@ -598,13 +598,13 @@ def draw(self, scale=0.7, filename=None, style=None, output=None, gates should be placed in the output circuit if there is an option. `none` results in each gate being placed in its own column. Currently only supported by text drawer. - fold (int): In MPL is the amount of operations before folding. Default is 25. vertical_compression (string): `high`, `medium` or `low`. It merges the lines generated by `text` so the drawing will take less vertical room. Default is `medium`. It is ignored if output is not `text`. idle_wires (bool): Include idle wires. Default is True. with_layout (bool): Include layout information, with labels on the physical layout. Default is True. + fold (int): In MPL is the amount of operations before folding. Default is 25. Returns: PIL.Image or matplotlib.figure or str or TextDrawing: * PIL.Image: (output `latex`) an in-memory representation of the @@ -628,10 +628,9 @@ def draw(self, scale=0.7, filename=None, style=None, output=None, plot_barriers=plot_barriers, reverse_bits=reverse_bits, justify=justify, - fold=fold, vertical_compression=vertical_compression, idle_wires=idle_wires, - with_layout=with_layout) + with_layout=with_layout, fold=fold) def size(self): """Returns total number of gate operations in circuit. diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 568696588d18..9ea84ccacb34 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -53,10 +53,10 @@ def circuit_drawer(circuit, plot_barriers=True, reverse_bits=False, justify=None, - fold=None, vertical_compression='medium', idle_wires=True, - with_layout=True): + with_layout=True, + fold=None): """Draw a quantum circuit to different formats (set by output parameter): 0. text: ASCII art TextDrawing that can be printed in the console. 1. latex: high-quality images, but heavy external software dependencies @@ -91,18 +91,18 @@ def circuit_drawer(circuit, gates should be placed in the output circuit if there is an option. `none` results in each gate being placed in its own column. Currently only supported by text drawer. - fold (int): Sets pagination. It can be disabled using -1. - In `text`, sets the length of the lines. This useful when the - drawing does not fit in the console. If None (default), it will try to - guess the console width using `shutil.get_terminal_size()`. However, if - you're running in jupyter the default line length is set to 80 characters. - In MPL is the amount of operations before folding. Default is 25. vertical_compression (string): `high`, `medium` or `low`. It merges the lines generated by `text` so the drawing will take less vertical room. Default is `medium`. It is ignored if output is not `text`. idle_wires (bool): Include idle wires. Default is True. with_layout (bool): Include layout information, with labels on the physical layout. + fold (int): Sets pagination. It can be disabled using -1. + In `text`, sets the length of the lines. This useful when the + drawing does not fit in the console. If None (default), it will try to + guess the console width using `shutil.get_terminal_size()`. However, if + you're running in jupyter the default line length is set to 80 characters. + In MPL is the amount of operations before folding. Default is 25. Returns: PIL.Image: (output `latex`) an in-memory representation of the image of the circuit diagram. @@ -228,10 +228,10 @@ def circuit_drawer(circuit, reverse_bits=reverse_bits, plot_barriers=plot_barriers, justify=justify, - fold=fold, vertical_compression=vertical_compression, idle_wires=idle_wires, - with_layout=with_layout) + with_layout=with_layout, + fold=fold) elif output == 'latex': image = _latex_circuit_drawer(circuit, scale=scale, filename=filename, style=style, @@ -255,9 +255,9 @@ def circuit_drawer(circuit, plot_barriers=plot_barriers, reverse_bits=reverse_bits, justify=justify, - fold=fold, idle_wires=idle_wires, - with_layout=with_layout) + with_layout=with_layout, + fold=fold) else: raise exceptions.VisualizationError( 'Invalid output type %s selected. The only valid choices ' @@ -344,8 +344,8 @@ def qx_color_scheme(): def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits=False, - plot_barriers=True, justify=None, fold=None, - vertical_compression='high', idle_wires=True, with_layout=True): + plot_barriers=True, justify=None, vertical_compression='high', + idle_wires=True, with_layout=True, fold=None,): """ Draws a circuit using ascii art. Args: @@ -356,16 +356,16 @@ def _text_circuit_drawer(circuit, filename=None, line_length=None, reverse_bits= plot_barriers (bool): Draws the barriers when they are there. justify (str) : `left`, `right` or `none`. Defaults to `left`. Says how the circuit should be justified. - fold (int): Optional. Breaks the circuit drawing to this length. This - useful when the drawing does not fit in the console. If - None (default), it will try to guess the console width using - `shutil.get_terminal_size()`. If you don't want pagination - at all, set `fold=-1`. vertical_compression (string): `high`, `medium`, or `low`. It merges the lines so the drawing will take less vertical room. Default is `high`. idle_wires (bool): Include idle wires. Default is True. with_layout (bool): Include layout information, with labels on the physical layout. Default: True + fold (int): Optional. Breaks the circuit drawing to this length. This + useful when the drawing does not fit in the console. If + None (default), it will try to guess the console width using + `shutil.get_terminal_size()`. If you don't want pagination + at all, set `fold=-1`. Returns: TextDrawing: An instances that, when printed, draws the circuit in ascii art. """ @@ -536,9 +536,9 @@ def _matplotlib_circuit_drawer(circuit, plot_barriers=True, reverse_bits=False, justify=None, - fold=None, idle_wires=True, - with_layout=True): + with_layout=True, + fold=None): """Draw a quantum circuit based on matplotlib. If `%matplotlib inline` is invoked in a Jupyter notebook, it visualizes a circuit inline. We recommend `%config InlineBackend.figure_format = 'svg'` for the inline visualization. @@ -554,10 +554,10 @@ def _matplotlib_circuit_drawer(circuit, circuit. Defaults to True. justify (str): `left`, `right` or `none`. Defaults to `left`. Says how the circuit should be justified. - fold (int): amount ops allowed before folding. Default is 25. idle_wires (bool): Include idle wires. Default is True. with_layout (bool): Include layout information, with labels on the physical layout. Default: True. + fold (int): amount ops allowed before folding. Default is 25. Returns: matplotlib.figure: a matplotlib figure object for the circuit diagram """ @@ -575,6 +575,6 @@ def _matplotlib_circuit_drawer(circuit, fold = 25 qcd = _matplotlib.MatplotlibDrawer(qregs, cregs, ops, scale=scale, style=style, - plot_barriers=plot_barriers, fold=fold, - reverse_bits=reverse_bits, layout=layout) + plot_barriers=plot_barriers, + reverse_bits=reverse_bits, layout=layout, fold=fold) return qcd.draw(filename) diff --git a/qiskit/visualization/matplotlib.py b/qiskit/visualization/matplotlib.py index c61181aafce7..70acf678fe05 100644 --- a/qiskit/visualization/matplotlib.py +++ b/qiskit/visualization/matplotlib.py @@ -102,8 +102,8 @@ def get_index(self): class MatplotlibDrawer: def __init__(self, qregs, cregs, ops, - scale=1.0, style=None, fold=25, plot_barriers=True, - reverse_bits=False, layout=None): + scale=1.0, style=None, plot_barriers=True, + reverse_bits=False, layout=None, fold=25): if not HAS_MATPLOTLIB: raise ImportError('The class MatplotlibDrawer needs matplotlib. ' From bbe08ac857911e0f4cd3ebf8c1c0ba2e7a2526fe Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Mon, 30 Sep 2019 10:12:43 -0400 Subject: [PATCH 19/20] docstring --- qiskit/circuit/quantumcircuit.py | 7 ++++++- qiskit/visualization/circuit_visualization.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/qiskit/circuit/quantumcircuit.py b/qiskit/circuit/quantumcircuit.py index 1b5416a57233..5dc3ca969077 100644 --- a/qiskit/circuit/quantumcircuit.py +++ b/qiskit/circuit/quantumcircuit.py @@ -604,7 +604,12 @@ def draw(self, scale=0.7, filename=None, style=None, output=None, idle_wires (bool): Include idle wires. Default is True. with_layout (bool): Include layout information, with labels on the physical layout. Default is True. - fold (int): In MPL is the amount of operations before folding. Default is 25. + fold (int): Sets pagination. It can be disabled using -1. + In `text`, sets the length of the lines. This useful when the + drawing does not fit in the console. If None (default), it will try to + guess the console width using `shutil.get_terminal_size()`. However, if + running in jupyter, the default line length is set to 80 characters. + In `mpl` is the amount of operations before folding. Default is 25. Returns: PIL.Image or matplotlib.figure or str or TextDrawing: * PIL.Image: (output `latex`) an in-memory representation of the diff --git a/qiskit/visualization/circuit_visualization.py b/qiskit/visualization/circuit_visualization.py index 9ea84ccacb34..9e671535ad2e 100644 --- a/qiskit/visualization/circuit_visualization.py +++ b/qiskit/visualization/circuit_visualization.py @@ -101,8 +101,8 @@ def circuit_drawer(circuit, In `text`, sets the length of the lines. This useful when the drawing does not fit in the console. If None (default), it will try to guess the console width using `shutil.get_terminal_size()`. However, if - you're running in jupyter the default line length is set to 80 characters. - In MPL is the amount of operations before folding. Default is 25. + running in jupyter, the default line length is set to 80 characters. + In `mpl` is the amount of operations before folding. Default is 25. Returns: PIL.Image: (output `latex`) an in-memory representation of the image of the circuit diagram. From 4a2cf2214effd0fffa51c4c91f4f5b49bb6d509f Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Fri, 4 Oct 2019 14:22:48 -0400 Subject: [PATCH 20/20] pickles --- .../pickles/TestsBasicSwap_a_cx_to_map.pickle | Bin 1225 -> 1227 bytes .../TestsBasicSwap_handle_measurement.pickle | Bin 1480 -> 1482 bytes .../TestsBasicSwap_initial_layout.pickle | Bin 1530 -> 1532 bytes .../TestsLookaheadSwap_a_cx_to_map.pickle | Bin 1705 -> 1707 bytes ...stsLookaheadSwap_handle_measurement.pickle | Bin 2406 -> 2408 bytes .../TestsLookaheadSwap_initial_layout.pickle | Bin 2224 -> 2226 bytes .../TestsStochasticSwap_a_cx_to_map.pickle | Bin 1225 -> 1227 bytes ...tsStochasticSwap_handle_measurement.pickle | Bin 1533 -> 1535 bytes .../TestsStochasticSwap_initial_layout.pickle | Bin 1530 -> 1532 bytes 9 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/python/pickles/TestsBasicSwap_a_cx_to_map.pickle b/test/python/pickles/TestsBasicSwap_a_cx_to_map.pickle index 4a71dd77ef3c4aa4035d0d1d63450890eff8968c..d8721c005293e8cb3cb9a2effc8c5af048f97829 100644 GIT binary patch literal 1227 zcma)6X>-#s5Y5rkEl{A8a)p-D>L|N!yJ@p(M%5S+#iZ=fm#0hVc7Q|uTFx_)p;)rPv z5pbTx#J|h6vTHdUjuOzM#4)qiB5+)*8V5f)PFUqkMcvm)2d7M-m@5*eO)()RbvB3^ zyn`vLka}WV=cgsk=)9P+N~y;wF=Z7~k2yHo#ku^Fe{&-K&Nhv8`pNt_Piz+?E}BA{ zp!`-RV2V+zBuHsN>duIG)?+CtuR6HC zljFuV$4ygI#58f->f(0Jk^9x;EKb|pSnjR3L)dpE?kR!QtLPoTeL^o%2SwGvgKhMO zVw_}pv>VqCSsVvG3v;iHntE*p9uxko#1qo{e`>@m_in?g>r<0i}tIo|J3y4wx literal 1225 zcma)5XK&L$7*4uz3lu1&lvPHk!w4;VuK+EChAzMi%Q`y;XW=+~JVZb`2|nd-^WNER zMT;uF#PZ{N*85(5^?UH+Z+=qq{K!k`iIjy&+Rk5%mF%^ieKk<3{zh4%&$Px%rING3 zBG%>!kDP?L0mlxx%>(+ov0R*ASH}$ukldiekTs;#GL2!0k=V5c3GpKSHO3wr#`c(A zz~b2VSU@NIm;xB}0$D8(jFS48#9q@HAhD2=VxLu3y4bIw*#F5f-ssn6j_W5e4%j$o z{*N1-HgJd>CL|7S(A{mZ|vD6jn=#<1!Q%p9>Vhfv=IHs_^4CATG ztYM-%0sGNO6C7`9ZRk;)uyJyGxO`)UU9qyQF`Odj8Hv-T$l3#E1eF$4_3VzSJJod2 zbEHv`IIohHDCrC}QrN77Su`rJs>Fq&5n;NK+NRTD3ByGjmo{B_H{oIIcfz<9CoF8S zs8tij;sQ(Pa$F|;n#2`T&%^74Nz@52*R%{03)8lPRIhBlQQm~SKtoq)2YQJ5{>8Xv z<9c?-0_O4nH=6k@1a4ZRIvfAuhkim)aI2ZRHg1bqX5&r|cZ-4lD{TCoZ5V6xlSRHq zk?%`9FvVO`%+pROh#>QaLOZH!s2F%8GLy%qm=zUn<4F%sck}VOMm_8#nM<8qo=H64 z?(!mY=_41fi-p`{(G(R?C6AXqyed43zk8drIE}cmlt0lR?bi}ZxptWvlvM*YFg4Mf zfH%4NvL4flm|#7u3dLTNSpSm(hgO~bTPxAq5Osf#NB diff --git a/test/python/pickles/TestsBasicSwap_handle_measurement.pickle b/test/python/pickles/TestsBasicSwap_handle_measurement.pickle index 2ef7e2373a78f5510f51f77067b0a6c7933611dc..fba6e3aa7e3b47bb9a655e33b69cb3beca01d77c 100644 GIT binary patch literal 1482 zcma)6X>-#s5KYnot;MWOKUD&&ZN5*3e!JPR4Ca_f1ywa zMN^{B*};EFgpEMfno>kbTQ+4Fqu<%U8?}ar1va?YXy;tA6U#92TVYg=V#bMfqwIC8 znXnZ<60x+fiCG2|25o1f&Jc*Y3}98M&nfZR>tM*S_)nNLYe?#T9AR^%^gHAQCbXqe za5ic9ifD^wgsm>NIfEMC3LAdR^cb!>L;6HRe(=LIw7r_tUF`T>>l$6!@}nQcvdzLU ziG`h9>4?HE+Zo_Q`7TEDR{sq*GSBDfu$vQ&DeSSi$s(r$_8N&J|GUJ#N~Wc0Y`=>G zHjR+x9#=SM(~R=1H0oE>3k(UN3j_RjgPG z{7D&3Gs78$vl)Z7n?8YaOj628&i6}uY08@lw=&QlOt*WWJ2~i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icSwap_initial_layout.pickle b/test/python/pickles/TestsBasicSwap_initial_layout.pickle index 97538a54401700c8148acc03ac7d98f3a4632c8e..dd37de81b9766a5c4bc0fa572b6b0b82db044257 100644 GIT binary patch literal 1532 zcma)6{dd$v6y5Fe)qqf;l!{ndQAtHsse+0k((+LWEZ-P}xK6TDUL>2{o5_@gbLJfU zssFZbCL7w*!zui-*}3!Xdo%aGH*Z=AQuQJ&+eum^n!nH@FLi&s^zK#5m1@^RWAQ&U z4JQ0>SEJF$MPH&79^}7io|dV|x|w)2&?R<-yBX~EL@BU4!XCe_BS)poRXWI3Ta_a3 ziK5pgZ}o;KrH8$oeV@UkAMUa2OvEyS*P&L}V>)!}VTWfs3S>p$v=4gRyoZrBOx<>6`UkarQ>D?ZG@gwK{ z$>3)zy6u#404{R&Cf}fGZ}7`z_Frk5WxBLIZ;}b6(nMsn|K5u2Ko7rh{>uixv)&)V z8E4sSiYv@tHdv{fBEePSULfv(Yd&2joBz7O4eRG}WuwDZ4gRPx>${D+X%N)dTi>}= z#0GAW72>u*hYQh`%hQ&--=R6a`(3)ugnN!~-{8Rxgom`igh#Z>gvXBXr$M*_;R&5$ z!e4Zg2~VYKX|SRS&mu%LD;$zIO4H>Ok|K&Z(?`2 zw2prbUidr;cJwlXzO}&4dTubVS{$zp9abX^gTlt-Y^NP$%Toqrjq#*9OdG7%n6)^o o2AQ4Zt_9DZ3R=YIv=sC|GJiEl^-#ZFvSH#z}VI#%8noWsf#R3a~{LG$UY)Srv>s)yF`7ieot z_`%**s}+qzAqKLPMO2D7llY(9MuA=TmRY23w6LELKM2A}lF zsGrg}ZPZ)5OP@Pru#UzL1~VOU*o?**gP9H)Y?}K~#awcVp$<1`rn1wF)@DbT)i~?( zN}FbQrNb4|-BwlA=Lx(?g&#xwL?+%jjq@CjHiG?J2bR8>gtR`Z5n?N}pewA;Lcw%I|S8)iD%5Fi`%C$>#bX`fgJkzuDA z|Gdd2CX*wq(j50SqXSGBSVFEb+=MWq1tx$FGNG^prBQA|sOS2!##P*T32z?oSO5S3 diff --git a/test/python/pickles/TestsLookaheadSwap_a_cx_to_map.pickle b/test/python/pickles/TestsLookaheadSwap_a_cx_to_map.pickle index fcb5b956a958d52722d32e3ee7431792709d01ff..e52016a9237884e3773bcf05ef9d8dac162cefb4 100644 GIT binary patch literal 1707 zcma)7`Fq<$5Vez@YM}v2Ddh?ffYb{-E?1`>8Vfhk zWK8+NmPVtIslLW^uuJ|`Q8J2(LDW~P*b;0NBJ| z#!jE6gY9y+4uBVUhNkRCDC4xqv8&x&gOZ+wb_-{D>?27aqni0wGl(TlIDdTiW9=-;XYBimvO%z><|ifihcim z-THdkrNaY~Xg}jYQ*u*M0SBz7d3r_Tq4sp;p{?-Y5Rdq@mkjr#jK_T1NBix0nsxOE zv+ZUX+tbGxPuNqMZBLc47I?PZC}UN|A)d4$bBw1g!Ulgc}ett?$lYbVvs4UF+u&#`BPQW5e*+R zPWoi!n}=*7a7rqeauuAeDll_%#tg-R4smvjPwvE%jJ)M+P*g0R3d?7Vpk|p8mSlv_ zH*$Qj?$Vc)1?L!{v*|n|ny~3BpUzoJ6eBiK=Qj*z!st3|%_ftNYe8efxS{(M3zuWAvS%j4_xHwCYpOMu9OjQP~DTIiqmcMnSf3CCy3S zzM(^Ej7wI|h;jK}a;~h)`PLF$Ww4WTjd6WK&W*~$n~d*F%(Z%q%+|QYxa~0WoUc}! zL3CL;-_xSV`GF3LoUyJJqdeRkKZf{;=9NVfi~Jno7g|!mjCllh<7(NCQK90V#;<;vzAdr7 zv&0Mw!nnxsqK^&k|Cz?s4qoC38woGFrbC?eg(CY`hO6Yp^EHsM{@WDyP0A{!*w+w~l7l$QMfr8%zmI?b^ZB}UrEk_pi4UXJ&D zd{9LwGTx^BK0Y+o4-h`GI69((ghL#W8i#Y(RR>Jv5yHn7@?Z`A3E@)<$r?lQ!EwNP za!rGy-fDv_uf=Ix#Df&ax@G9&xSA3^X4OV9!e{n4<*<-x&P91UFGSiCS+A{}Qzu2i z_vCZ-cY<)zRr@%8COV~#b=BUkVt&O$Ul^aK2_5TG6P+QPT|m@zP2D-dc}sqVc}^Sk z0^y=1VznZwE@mP^ncz~lULb|b8skef%@|*eaOHUn`AsqJT;iXK#A9Dq317RF`<4az zMw#~dqUta3Ed%NyzN@CxwDj@a2*LB_L_=pb9Te4+?|F(KgyX!Tab7K*SFZ{}60X@G zbYOD?wIHzARnmm>1L3-jcCKE5gwVHvv1S5OiL5|c3=$2IYKDPkm|=$b5uo&HXN0^? zpveg|^^q3ZSZSu+Al&?~uOZ>q0$;aXb;DHtNchS68rHsu@U!*Bnq5tGw2t%_vwnBf zW?sL$#?C#$uZ!*6*LEJ5ArA>7+fc{!i12uUohMbCzY%`7wjb4I{viBm4QlP-gq^2q fhS%sXwUzDsEqTTCr4d0i42nU}=T-Qp4BP(#gL^44 diff --git a/test/python/pickles/TestsLookaheadSwap_handle_measurement.pickle b/test/python/pickles/TestsLookaheadSwap_handle_measurement.pickle index b0c291c2988b10ea98e92a14742cfa43638f1a69..753b512787efaa9c6929005836ac720c1a1ea382 100644 GIT binary patch literal 2408 zcma)8>3>=jRZIX_kH13jasN@xw|f zzP0+I+n(sDg+%9iG!dHZ%(z4%;X5T4Et%$@N2w%Z%p-0|h5^ zFg}Y3wyEWggsvZWLw=A9LSE;T3(5S5)#DF^^PSMOFp;ZFB22b36C^{?$+<;XY1NWx z=KK5zS~C`3_?6NCDmgCs0=0vjy``9eEiBkcyb+ZF+jf;I#aaXm({j%8KRx^~;o!XXB0spMRS+fxbtox_(|9BS*89RypVgjOfvFs7wu zE9RlN`r)?f&{184BP6PmQ<$1b!jT3uHMIQaDtkWYEo1AkBvT2wWZaxv|StdM-s2?8(g6wPQ@Ju;^j=5v`|!nvIA z|E!6#)aT_qUY{bIZ{{VB1;(DVtt9(G!XlxYiiHW*M_6ny5!S0C`w2@7+90fo3kdzXxhD}Q zv8rYsIIYT$REhsXwo0mQ9_QgIpyVhk6M|^9Y8|~Othb^P>0C)zWqL6}Sl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JnpdIhIzd!*ttH7T&SjrV2pL<=&8T_2i?jKU$8w%xuBF;+FJYN6CRlxhB0J!>J)} zaQUYg={b)T$!YlHe{=mZZ8*_ zd;>$t&{o^3Lv`{Ftf}EDC6B|^1ga0@n)*P}67#h&=`dlfA&`lzBV5-ok?Z5S^@I&( zBI}Zg)Cf12iHJ6=XM7{!CQ;?)Vl`ghnyXDKy{tEjQCZeoYPeO>uhGy?Gh$5SMrA zmKzConS;dSCc@nfChv(&-b=X8nB2sMHtKKRPk2C72}xABpdKVVWK6PVmQk4nd|0(} zV2`Njynv4?N#ZfWR_&?YIs@)@C@PEdH~Ng2Jn3Bc{AaKk!)KC zFE+5f6xVGfylmLEFvVug@e1Kp!zQY*y+(N5u(1{guyterZ-~)0Hu`1_Z|MNuCcM)e zz`GK_d%EQ|!u#fM31B2Hzrvd6~Gs& zjRW{nP2~W-(iXoaeA8_4Te0|^K6nS=dvmZ@+)4PM!Qzkc9DgGGEOl~W?PP;H^tXQ@ y{Aw(UDs%je@Vl|d+9->E=pFe}&18#zxqOpNkq4fCno4dyxzNh4AL8$*(De`cyepjm diff --git a/test/python/pickles/TestsLookaheadSwap_initial_layout.pickle b/test/python/pickles/TestsLookaheadSwap_initial_layout.pickle index 3774169bce1aec77f32b87a977d07d2306955a27..78c6e157b8659a27e04e2cfdf6d0c932b1b5b3f1 100644 GIT binary patch literal 2226 zcma)-`F|5d7{=3vb3v$zhjd=Y7BLGjC@0rCs>JxF2R*zwSo-iAYq#sFHlO zw#Q$G<5df(HT%&;=(h9oQmIr`R6L~f%lKcv>W9847s_JKL=<9Pem;wZk_ZLnJ6K@P ztyA$t5Y;_vYx0SOoOuypu`Sd2g}gTjfR(pYrKnOsRP@6DOR`-p$t`PXDNAZkp(g60 z65s>}%kqm^a3`uI=9;Ktc`m<1MU=czjmlC_PD4V}#{!(_;H0^Xi5GQm%nw4Z&Sr2m z3nw$_3c@LNei3Iht62Hp+qJbjOgfy(iB=I#Q!RIKDqyv?HSqU(I6a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S;BDH!If=Q-cEQF2hAuh#|ew- ztW_@yb9sp+bUCgPe_7(1rTg%kQPOILn5)?)kwt04MXHbNdbO|(`Jsm9=?rv<`u@eZ z;ozn{qCN00K@=n;iG^CX5P@6S1q_+TLoC)(&%tdm%N*S4;BIf>4bI}U#m$xO6ZgpI zeTfH_n5zkLBj)Kxk`IYrx#%w7kyy~wkHrj8KM~`sgQq$Bzp9A8vn_Lj{<17DAr@5>b;;ERmbyC2mY5N<+`-EZUhSphx6Mk_Ofr=!sl1k0=~bx_E2$Jo z#c$&cX{wr5l}3p));d@hs)-GW&A*!vRD{UGzt!R2iAf6oUN6`ZANE-IC`#1UCox3} WpE)^D=g3^Y?IumPL2;ebEB^sv%8J7P diff --git a/test/python/pickles/TestsStochasticSwap_handle_measurement.pickle b/test/python/pickles/TestsStochasticSwap_handle_measurement.pickle index 31e7bd230c14483936cd66dd472b8c430e604376..db5b3188a438590d3d7bf9813c45f8ed70b29062 100644 GIT binary patch literal 1535 zcma)6X;;%g6m5%w1{d6MLlBp^)m;=76;#w}-8C+;PScSWNmFi>v1}qNoOq-j{HPXp=3L&3WY)_ zni74^X8ubeYy`5_lp;#nvMIwDtDMz5QEP};V6}^WJJ*t(ScZ|`3ZrrqGfuP{Wv^q+ zgspg1#L~h5tE^F2Ydig#ArN&Lz^YQ8Q{u7L!JuRDpD=0GkktJ+!n#UnspJKww7ybs z1~hy@v_&(*1{WKhwHn_F8-C347^*shdPPHi@WZsUshZSXY+l;yAHKBZoFB!q&Bm~Z zg)O|(tqR+0XAKkOv)G;=_3v3j570jaEuoZCv3%Uh7NhlFOr&0)I!Oi-TPp z%D28!N@U$h6FSV=w!#scOe}iGgrl^sQY7}B*z037RHf9-<1{W@oamyQbLX~X?P5Jh z+s494<~^lwTHBz*%NF2FMqSj@XM5D=XpE`P|HygvL1RN*DJ@qaP?# zQ#Absde{R!(ha9OFK@ zI4ikbyfaEQh4(8di5{q~L3(>$7Y)))Bo#hzNVKeRXj$LP(Fpeq(G;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