From 42928e0d659bb707108a126136153301de5f9894 Mon Sep 17 00:00:00 2001 From: Ali Javadi Date: Tue, 12 Jun 2018 14:19:00 -0400 Subject: [PATCH] do not unroll to any subset basis with skip_transpiler --- CHANGELOG.rst | 1 + qiskit/_compiler.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ea47cfebda80..47641c9c8038 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -32,6 +32,7 @@ Removed Fixed ----- +- Fix issue with skip_transpiler causing some gates to be ignored silently. `0.5.4`_ - 2018-06-11 diff --git a/qiskit/_compiler.py b/qiskit/_compiler.py index 656c38417a3c..319f6b723b1e 100644 --- a/qiskit/_compiler.py +++ b/qiskit/_compiler.py @@ -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