Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate plot_gate_map_reference images #6087

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion qiskit/visualization/state_visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,8 @@ def __init__(self, xs, ys, zs, *args, **kwargs):
def draw(self, renderer):
"""Draw the arrow."""
xs3d, ys3d, zs3d = self._verts3d
xs, ys, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, renderer.M)
xs, ys, _ = proj3d.proj_transform(xs3d, ys3d, zs3d,
self.axes.M)
self.set_positions((xs[0], ys[0]), (xs[1], ys[1]))
FancyArrowPatch.draw(self, renderer)

Expand Down
Binary file modified test/python/visualization/references/20_plot_circuit_layout.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions test/python/visualization/test_gate_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

# pylint: disable=bad-docstring-quotes

"""A test for visualizing device coupling maps"""
import unittest
import os
import sys

from ddt import ddt, data
from qiskit.test.mock import FakeProvider
Expand All @@ -27,6 +30,10 @@
import matplotlib.pyplot as plt


@unittest.skipIf(sys.version_info < (3, 7),
'Skipping image comparison tests on python 3.6 as they '
'depend on the local matlplotlib environment matching the '
'environment for the reference images which is only >=3.7')
@ddt
class TestGateMap(QiskitVisualizationTestCase):
""" visual tests for plot_gate_map """
Expand Down