Skip to content

Commit

Permalink
Prepare 0.16.2 release (#5686)
Browse files Browse the repository at this point in the history
* Prepare 0.16.2 release

This commit prepares for the 0.16.2 release by bumping the version
strings to reflect the new version. This is just a bugfix release
that several fixes for bugs introduced in 0.16.1.

* Mark DAGCircuit collect_1q_runs private

The collect_1q_runs method was rewritten in python as part of the
backport of a larger bugfix in the Optimize1qGatesDecomposition
transpiler pass in #5655. However, it is not part of the public api in
0.16.x and was only backported to fix the bug in
Optimize1qGatesDecomposition. Since the version included on the master
branch will be subtlely different in return type (after #5685) Since we
don't want to advertise the method until it's included in the public api
this commit prepends '_' making the method name _collect_1q_runs to
indicate it is internal only as part of the 0.16.2 release.

* Cleanup release notes
  • Loading branch information
mtreinish authored Jan 26, 2021
1 parent df53e34 commit a517383
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = '0.16.1'
release = '0.16.2'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion qiskit/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.16.1
0.16.2
2 changes: 1 addition & 1 deletion qiskit/dagcircuit/dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ def collect_runs(self, namelist):

# pylint: disable=too-many-boolean-expressions

def collect_1q_runs(self):
def _collect_1q_runs(self):
"""Return a set of non-conditional runs of 1q "op" nodes."""
group_list = []
# Iterate through the nodes of self in topological order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def run(self, dag):
if not self.basis:
LOG.info("Skipping pass because no basis is set")
return dag
runs = dag.collect_1q_runs()
runs = dag._collect_1q_runs()
for run in runs:
# Don't try to optimize a single 1q gate
if len(run) <= 1:
Expand Down
15 changes: 10 additions & 5 deletions releasenotes/notes/bugfix-assemble-delay-32a96b59bb84badd.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
fixes:
- |
Pulse :py:class:`~qiskit.pulse.instructions.Delay` is now explicitly
assembled as qobj instructions.
Pulse :py:class:`~qiskit.pulse.instructions.Delay` instructions are now
explicitly assembled as :class:`~qiskit.qobj.PulseQobjInstruction` objects
included in the :class:`~qiskit.qobj.PulseQobj` output from
:func:`~qiskit.compiler.assemble`.
Previously, we could ignore delays rather than assembling them. Now, with
pulse gates, there are times that we want to schedule ONLY a delay, and not
including the delay itself would remove the delay.
Previously, we could ignore :py:class:`~qiskit.pulse.instructions.Delay`
instructions in a :class:`~qiskit.pulse.Schedule` as part of
:func:`~qiskit.compiler.assemble` as the time was explicit in the
:class:`~qiskit.qobj.PulseQobj` objects. But, now with pulse gates, there
are situations where we can schedule ONLY a delay, and not including the
delay itself would remove the delay.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
---
fixes:
- |
Fix the global phase of the output of ``circuit.repeat``. If a circuit with global
phase is appended to another circuit, the global phase is currently not propagated.
The simulators rely on this, since the phase otherwise gets applied multiple times.
This sets the global phase of ``circuit.repeat`` to 0 instead of multiplying the existing
phase times the number of repetitions.
Fix the global phase of the output of the
:class:`~qiskit.circuit.QuantumCircuit` method
:meth:`~qiskit.circuit.QuantumCircuit.repeat`. If a circuit with global
phase is appended to another circuit, the global phase is currently not
propagated. Simulators rely on this, since the phase otherwise gets
applied multiple times. This sets the global phase of
:meth:`~qiskit.circuit.QuantumCircuit.repeat` to 0 before appending the
repeated circuit instead of multiplying the existing phase times the
number of repetitions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
fixes:
- |
The definition of the Hellinger fidelity from has been corrected from the
previous defition of :math`1-H(P,Q)` to :math:`[1-H(P,Q)**2]**2` so that it
is equal to the quantum state fidelity of P, Q as diagonal density matrices.
previous defition of :math:`1-H(P,Q)` to :math:`[1-H(P,Q)^2]^2` so that it
is equal to the quantum state fidelity of P, Q as diagonal density
matrices.
4 changes: 2 additions & 2 deletions releasenotes/notes/transpile_singleton-61755c5cf1970111.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ fixes:
When running :func:`qiskit.compiler.transpile` on a list of circuits with a
single element, the function used to return a circuit instead of a list. Now,
when :func:`qiskit.compiler.transpile` is called with a list, it will return a
list if when that list has a single element. See
list even if that list has a single element. See
`#5260 <https://github.com/Qiskit/qiskit-terra/issues/5260>`__.
.. code-block:: python
Expand All @@ -20,4 +20,4 @@ fixes:
print(type(transpiled), len(transpiled))
.. parsed-literal::
<class 'list'> 1
<class 'list'> 1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

setup(
name="qiskit-terra",
version="0.16.1",
version="0.16.2",
description="Software for developing quantum computing programs",
long_description=README,
long_description_content_type='text/markdown',
Expand Down
10 changes: 5 additions & 5 deletions test/python/dagcircuit/test_dagcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def test_dag_collect_1q_runs(self):
self.dag.apply_operation_back(CXGate(), [self.qubit2, self.qubit1])
self.dag.apply_operation_back(CXGate(), [self.qubit1, self.qubit2])
self.dag.apply_operation_back(HGate(), [self.qubit2])
collected_runs = self.dag.collect_1q_runs()
collected_runs = self.dag._collect_1q_runs()
self.assertEqual(len(collected_runs), 2)
for run in collected_runs:
if run[0].name == 'h':
Expand All @@ -742,7 +742,7 @@ def test_dag_collect_1q_runs_start_with_conditional(self):
h_gate, [self.qubit0])
self.dag.apply_operation_back(HGate(), [self.qubit0])
self.dag.apply_operation_back(HGate(), [self.qubit0])
collected_runs = self.dag.collect_1q_runs()
collected_runs = self.dag._collect_1q_runs()
self.assertEqual(len(collected_runs), 1)
run = collected_runs.pop()
self.assertEqual(len(run), 2)
Expand All @@ -758,7 +758,7 @@ def test_dag_collect_1q_runs_conditional_in_middle(self):
self.dag.apply_operation_back(
h_gate, [self.qubit0])
self.dag.apply_operation_back(HGate(), [self.qubit0])
collected_runs = self.dag.collect_1q_runs()
collected_runs = self.dag._collect_1q_runs()
# Should return 2 single h gate runs (1 before condition, 1 after)
self.assertEqual(len(collected_runs), 2)
for run in collected_runs:
Expand All @@ -774,7 +774,7 @@ def test_dag_collect_1q_runs_with_parameterized_gate(self):
self.dag.apply_operation_back(U1Gate(theta), [self.qubit0])
self.dag.apply_operation_back(XGate(), [self.qubit0])
self.dag.apply_operation_back(XGate(), [self.qubit0])
collected_runs = self.dag.collect_1q_runs()
collected_runs = self.dag._collect_1q_runs()
self.assertEqual(len(collected_runs), 2)
run_gates = [[x.name for x in run] for run in collected_runs]
self.assertIn(['h', 'h'], run_gates)
Expand All @@ -794,7 +794,7 @@ def test_dag_collect_1q_runs_with_cx_in_middle(self):
self.dag.apply_operation_back(YGate(), [self.qubit0])
self.dag.apply_operation_back(XGate(), [self.qubit1])
self.dag.apply_operation_back(XGate(), [self.qubit1])
collected_runs = self.dag.collect_1q_runs()
collected_runs = self.dag._collect_1q_runs()
self.assertEqual(len(collected_runs), 4)
for run in collected_runs:
if run[0].name == 'h':
Expand Down

0 comments on commit a517383

Please sign in to comment.