Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update plot_gate_map() family to leverage graphviz for visualization (#…
…10208) * Update gate_map.py Update the gate_map.py to migrate the visualization modules from matplotlib to rustworkx.graphviz * Removed has_rustworkx instances * Added release notes * Update test_gate_map.py Updated tests for the modified gate_map.py file * Formatted gate_map.py * Format test_gate_map.py * Added release notes for the fix of #9031 * Update gate_map.py * Update test_gate_map.py Test file updated so that all tests can be passed. * Update test_gate_map.py * Update gate_map.py for rerunning tests. * Update test_clifford.py * Update gate_map.py to reuse rx.draw_graphiz * Update test_gate_map.py to omit qubit_visualization * Update test_gate_map.py to fix formatting changes * Update gate_map.py * Update gate_map.py * Update gate_map.py * Update test_gate_map.py * Update test_gate_map.py * Update gate_map.py * Update gate_map.py * Update gate_map.py * Update gate_map.py * Update gate_map.py * Update gate_map.py * Update gate_map.py * Update test_gate_map.py * Update test_gate_map.py to add rx import * Update test_gate_map.py * Update test_gate_map.py * Update test_gate_map.py to fix imports * Update test_gate_map.py to add HAS_GRAPHVIZ to all tests * Update test_graph_matplotlib_drawer.py to have HAS_GRAPHVIZ * Update test_graph_matplotlib_drawer.py to add HAS_GRAPHVIZ import to test_font_color function * Update test_graph_matplotlib_drawer.py to add GRAPHVIZ check to the class * Update test_graph_matplotlib_drawer.py to add HAS_GRAPHVIZ to both gate_plot_map and test_gate_plot_map import to test_font_color function * Update test_graph_matplotlib_drawer.py * Update test_graph_matplotlib_drawer.py * Update test_graph_matplotlib_drawer.py * Fixed the `font_color` parameter in `gate_map.py/plot_gate_map()` The font_color parameter can now accept hex values as well. * Modify color_edge function to increase speed * Update gate_map.py to fix formatting * Update gate_map.py to shift seaborn import to `plot_error_map` * Add HAS_SEABORN to test_plot_error_map * Reformat gate_map.py * Fixed node autoscaling in `gate_map.py` graphs * Add return type to `test_from_gate_with_cyclic_definition ` in `test_clifford.py` * Update update-gate_map-visualizations-6ea907a0502fdc1a.yaml * Rename update-gate_map-visualizations-6ea907a0502fdc1a.yaml to update-gate-map-visualizations-6ea907a0502fdc1a.yaml * Update update-gate-map-visualizations-6ea907a0502fdc1a.yaml * Update update-gate-map-visualizations-6ea907a0502fdc1a.yaml * Update pauli_op.py to use np.prod `np.product` is deprecated and is causing test fails. * Update operator.py to use np.prod `np.product` is deprecated and is causing test fails. * Update pauli_sum_op.py to use np.prod `np.product` is deprecated and is causing test fails. * Update random.py to use np.product `np.product` is deprecated and is causing test fails. * Update chi.py to use np.prod `np.product` is deprecated and is causing test fails. * Replace np.product with np.prod `np.product` is deprecated and is causing test fails. * Update ptm.py to use np.prod `np.product` is deprecated and is causing test fails. * Update stinespring.py to use np.prod `np.product` is deprecated and is causing test fails. * Update superop.py to use np.prod `np.product` is deprecated and is causing test fails. * Update transformations.py to use np.prod `np.product` is deprecated and is causing test fails. * Update densitymatrix.py to use np.prod `np.product` is deprecated and is causing test fails. * Update random.py to use np.prod `np.product` is deprecated and is causing test fails. * Update statevector.py to use np.prod `np.product` is deprecated and is causing test fails. * Update local_readout_mitigator.py to use np.prod `np.product` is deprecated and is causing test fails. * Update unitary_synthesis.py to use np.prod `np.product` is deprecated and is causing test fails. * Update test_random.py to use np.prod `np.product` is deprecated and is causing test fails. * Update test_scalar_op.py to use np.prod `np.product` is deprecated and is causing test fails. * Update test_random.py to use np.prod `np.product` is deprecated and is causing test fails. * Update test_clifford.py to remove debugging code * Move matplotlib imports to occur at run time * Apply suggestions from code review * Move matplotlib_close_if_inline to runtime import too * Flatten parallel edges Co-authored-by: Matthew Treinish <mtreinish@kortar.org> * Fix 1 qubit backend handling * Fix qubit label and font sizes * new reference images * Adjust font scaling * Update reference images * Remove unrelated reference file update * Improve formatting * Adjust pixel scaling factor * Update reference images with formatting changes --------- Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
- Loading branch information