-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix Qiskit circuit conversion to Tenet #291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Todorbsc !
@@ -11,7 +11,7 @@ function Base.convert(::Type{Circuit}, ::Val{:qiskit}, pyobj::Py) | |||
circuit = Circuit() | |||
|
|||
for instr in pyobj | |||
gatelanes = map(x -> Lane(pyconvert(Int, x._index)), instr.qubits) | |||
gatelanes = map(x -> Lane(pyconvert(Int, x._index) + 1), instr.qubits) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have one question: are we sure that Qiskit only uses 1-dimensional coordinates for qubits? Do you mind checking it in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If your question is whether the qubits
field is always a 1D array, then yes, I think so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This says a list
, so yes.
https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.QuantumCircuit#qubits
This PR resolves two bugs:
Circuit
instead ofQuantum
when converting a Qiskit circuit to Tenet (resolved in Fix Python environment and integration tests for Python extensions #300)1
instead of0