Skip to content

Commit

Permalink
reno
Browse files Browse the repository at this point in the history
  • Loading branch information
Luciano Bello committed Apr 26, 2020
1 parent 7c5b893 commit 417f3d9
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions releasenotes/notes/transpiling_basis_none-b2f1abdb3c080eca.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
fixes:
- |
Bug #3017 is fixed. The function ``qiskit.compiler.transpile()`` honors the parameter ``basis_gates=None``
to allow any gate in the final tranpiled circuit, including gates added by the transpilation process.
This might also have some unintended consequences during optimization. For example,
:class:`qiskit.transpiler.passes.Optimize1qGates` only optimizes the chains of u1, u2, and u3 gates:
.. code-block:: python
from qiskit import *
q = QuantumRegister(1, name='q')
circuit = QuantumCircuit(q)
circuit.h(q[0])
circuit.u1(0.1, q[0])
circuit.u2(0.1, 0.2, q[0])
circuit.h(q[0])
circuit.u3(0.1, 0.2, 0.3, q[0])
result = transpile(circuit, basis_gates=None, optimization_level=3)
result.draw()
.. parsed-literal::
┌───┐┌─────────────┐┌───┐┌─────────────────┐
q_0: ┤ H ├┤ U2(0.1,0.3) ├┤ H ├┤ U3(0.1,0.2,0.3) ├
└───┘└─────────────┘└───┘└─────────────────┘

0 comments on commit 417f3d9

Please sign in to comment.