question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chipped figure in matplotlib for a plain quantum circuit

See original GitHub issue

Information

  • Qiskit Terra version: 0.16.1
  • Python version: 3.8.6
  • Operating system: Artix Linux

What is the current behavior?

When drawing a plain quantum circuit (just initializing the quantum and classical registers without implementing any gates), the figure rendered in matplotlib renders chipped text. Testing this with a previous release of terra (I used 0.15.1), the text appears fine without any chipping whatsoever.

Steps to reproduce the problem

from qiskit import *

qr = QuantumRegister(2)
cr = ClassicalRegister(3)
qc = QuantumCircuit(qr,cr)

qc.draw('mpl')

With current release (0.16.1): Figure_3

With a previous release (0.15.1): Figure_1

What is the expected behavior?

The expected behaviour is to draw the circuit without any text chipping and draw the circuit as implemented in version 0.15.1.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
1ucian0commented, Nov 14, 2020

Assigning it to you in that case. Thanks.

0reactions
paniashcommented, Nov 27, 2020

@arkarc What error are you getting with the ‘mpl’ backend? Also, please open up a separate issue for this, since this does not pertain to this issue thread. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simple Plot — Matplotlib 3.6.2 documentation
Create a simple plot. import matplotlib.pyplot as plt import numpy as np # Data for plotting t = np.arange(0.0, 2.0, ... About as...
Read more >
PhotoniQLAB: a framework for simulating photonic quantum ...
The basic idea of the intelligent algorithm is to compile PQIP experiments into quantum-circuit-shape diagrams, as shown in figure 2. Given the ...
Read more >
Quantum Computing: Made Simple - Medium
A quantum circuit consists of simple quantum gates that act on 1 or more qubits: H stands for Hadamard transform. For us right...
Read more >
Visualizing a Quantum Circuit - Qiskit
There are two alternative output renderers for the quantum circuit. One uses matplotlib, and the other uses LaTeX, which leverages the qcircuit package....
Read more >
(PDF) Quantum Search on Encrypted Data Based on Quantum ...
secure quantum homomorphic evaluation protocol for Cli ord circuits, ... implement the BB84 protocol, encrypt the plain data, and decrypt the evaluated ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found