Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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