We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug A minimun example: if nqubits =even number, it works, otherwise, it doesn't work.
from qibo.ui import plot_circuit from qibo.models.hep import qPDF ansatz = 'Weighted' multi_output = True layers = 3 nqubits = 7 mypdf = qPDF(ansatz, layers, nqubits, multi_output=multi_output) plot_circuit(mypdf.circuit, scale = 0.8, cluster_gates = True, style="quantumspain")
Ouputs:
Traceback (most recent call last): Cell In[7], line 1 plot_circuit(mypdf.circuit, scale = 0.8, cluster_gates = True, style="quantumspain") File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:729 in plot_circuit ax = _plot_quantum_schedule(gates_cluster, inits, params, labels, scale=scale) File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:59 in _plot_quantum_schedule return _plot_quantum_circuit( File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:120 in _plot_quantum_circuit _draw_gates( File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:180 in _draw_gates _draw_controls( File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:198 in _draw_controls control_indices = _get_flipped_indices(controls, labels) File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:472 in _get_flipped_indices return [_get_flipped_index(t, labels) for t in targets] File E:\ProgramData\Lib\site-packages\qibo\ui\mpldrawer.py:445 in _get_flipped_index i = labels.index(target) ValueError: 'q_7' is not in list
Expected behavior After reading the code (qibo/src/qibo/models /hep.py), this error is induced by this line
for q in range(1, qubits + 1, 2):
which should be corrected to
for q in range(1, qubits + 0, 2):
There are total 4 lines should be corrected: Line163,193,237,260
Desktop (please complete the following information):
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Thanks for opening this @Landau1908! I just checked if the dedicated Qibo qPDF example works and I can confirm everything is fine from that side.
Could you please complete the Describe the bug section pasting the source code which is generating the error?
Sorry, something went wrong.
Can this be closed?
No branches or pull requests
Describe the bug
A minimun example: if nqubits =even number, it works, otherwise, it doesn't work.
Ouputs:
Expected behavior
After reading the code (qibo/src/qibo/models /hep.py), this error is induced by this line
which should be corrected to
There are total 4 lines should be corrected: Line163,193,237,260
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: