-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 skip_transpiler: do not remove gates #562
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,9 +126,11 @@ def compile(circuits, backend, | |
if skip_transpiler: # Just return the qobj, without any transformation or analysis | ||
job["config"]["layout"] = None | ||
job["compiled_circuit_qasm"] = circuit.qasm() | ||
basis_all = "id,u0,u1,u2,u3,x,y,z,h,s,sdg,t,tdg,rx,ry,rz," \ | ||
"cx,cy,cz,ch,crz,cu1,cu3,swap,ccx,cswap" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I remember seeing many other places where we have similar basis gates definition hardcoded as well, I guess we could review this in the near future and find out a way to have a unique source for it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @atilag yes, this definitely has to change. It's ugly and bugs like this pop up. It's on my list to go through all the code and change this. But that's for a future PR. |
||
job["compiled_circuit"] = DagUnroller( | ||
DAGCircuit.fromQuantumCircuit(circuit), | ||
JsonBackend(job['config']['basis_gates'].split(','))).execute() | ||
JsonBackend(basis_all.split(','))).execute() | ||
else: | ||
if initial_layout is None and not backend.configuration['simulator']: | ||
# if coupling_map is not already satisfied, pick a good initial layout | ||
|
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.
Maybe we can avoid defining
basis_all
by doing,