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

Using the rzz gate yields an error on circuit drawing #1733

Closed
DrissiReda opened this issue Jan 31, 2019 · 0 comments
Closed

Using the rzz gate yields an error on circuit drawing #1733

DrissiReda opened this issue Jan 31, 2019 · 0 comments

Comments

@DrissiReda
Copy link

Informations

  • Qiskit Terra version:
    qiskit version 0.7.0
  • Python version:
    python 3.6.6
  • Operating system:
    Red Hat Entreprise Server 7.4

Current behavior

At circuit draw I get the following error

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/qiskit/circuit/quantumcircuit.py", line 83, in __str__
    return str(self.draw(output='text'))
  File "/usr/local/lib/python3.6/site-packages/qiskit/tools/visualization/_text.py", line 413, in __str__
    return self.single_string()
  File "/usr/local/lib/python3.6/site-packages/qiskit/tools/visualization/_text.py", line 438, in single_string
    return "\n".join(self.lines())
  File "/usr/local/lib/python3.6/site-packages/qiskit/tools/visualization/_text.py", line 472, in lines
    layers = self.build_layers()
  File "/usr/local/lib/python3.6/site-packages/qiskit/tools/visualization/_text.py", line 758, in build_layers
    elif len(instruction['qubits']) >= 2 and not instruction['cargs']:
KeyError: 'qubits'

Steps to reproduce the problem

from qiskit import * 
q = QuantumRegister(2)
qc = QuantumCircuit(q);
qc.rzz(0, q[0], q[1])
print(qc)

What is the expected behavior?

It should draw the circuit with no problem, but here it gives a KeyError on "qubits"

Suggested solutions

Maybe it is expecting "qargs" instead of "qubits"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants