Skip to content

Commit

Permalink
Merge pull request #562 from ajavadia/fix/skip-transpiler-basis-unroll
Browse files Browse the repository at this point in the history
fix skip_transpiler: do not remove gates
  • Loading branch information
atilag authored Jun 16, 2018
2 parents be4aac3 + 80abe58 commit 87b8ea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Removed

Fixed
-----
- Fix issue with skip_transpiler causing some gates to be ignored silently.


`0.5.4`_ - 2018-06-11
Expand Down
4 changes: 3 additions & 1 deletion qiskit/_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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
Expand Down

0 comments on commit 87b8ea6

Please sign in to comment.