diff --git a/docs/conf.py b/docs/conf.py index b287ac8cb823..2491aa5f2fe9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 --------------------------------------------------- diff --git a/qiskit/VERSION.txt b/qiskit/VERSION.txt index 2a0970ca757c..201a22c8fa5c 100644 --- a/qiskit/VERSION.txt +++ b/qiskit/VERSION.txt @@ -1 +1 @@ -0.16.1 +0.16.2 diff --git a/qiskit/dagcircuit/dagcircuit.py b/qiskit/dagcircuit/dagcircuit.py index f560411a7eba..d53b2481a05f 100644 --- a/qiskit/dagcircuit/dagcircuit.py +++ b/qiskit/dagcircuit/dagcircuit.py @@ -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 diff --git a/qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py b/qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py index ce9e82090bbc..cff98e804e5b 100644 --- a/qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py +++ b/qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py @@ -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: diff --git a/releasenotes/notes/bugfix-assemble-delay-32a96b59bb84badd.yaml b/releasenotes/notes/bugfix-assemble-delay-32a96b59bb84badd.yaml index c1984a6fdd08..e92f2dc99813 100644 --- a/releasenotes/notes/bugfix-assemble-delay-32a96b59bb84badd.yaml +++ b/releasenotes/notes/bugfix-assemble-delay-32a96b59bb84badd.yaml @@ -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. diff --git a/releasenotes/notes/fix-global-phase-upon-repeat-f742f4c0201fea97.yaml b/releasenotes/notes/fix-global-phase-upon-repeat-f742f4c0201fea97.yaml index 0c97cda5e6f0..2189f54b0dab 100644 --- a/releasenotes/notes/fix-global-phase-upon-repeat-f742f4c0201fea97.yaml +++ b/releasenotes/notes/fix-global-phase-upon-repeat-f742f4c0201fea97.yaml @@ -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. \ No newline at end of file + 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. diff --git a/releasenotes/notes/fix_hellinger_fidelity_def-7f60d53e3577fdaf.yaml b/releasenotes/notes/fix_hellinger_fidelity_def-7f60d53e3577fdaf.yaml index 02a18587ffbf..3d5ca36c5b61 100644 --- a/releasenotes/notes/fix_hellinger_fidelity_def-7f60d53e3577fdaf.yaml +++ b/releasenotes/notes/fix_hellinger_fidelity_def-7f60d53e3577fdaf.yaml @@ -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. diff --git a/releasenotes/notes/transpile_singleton-61755c5cf1970111.yaml b/releasenotes/notes/transpile_singleton-61755c5cf1970111.yaml index 03757c78de72..cfefd5fb4a54 100644 --- a/releasenotes/notes/transpile_singleton-61755c5cf1970111.yaml +++ b/releasenotes/notes/transpile_singleton-61755c5cf1970111.yaml @@ -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 `__. .. code-block:: python @@ -20,4 +20,4 @@ fixes: print(type(transpiled), len(transpiled)) .. parsed-literal:: - 1 \ No newline at end of file + 1 diff --git a/setup.py b/setup.py index cddad71491a7..08a550a9495d 100755 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/test/python/dagcircuit/test_dagcircuit.py b/test/python/dagcircuit/test_dagcircuit.py index 83f85ec0efcf..5b1fea83bda1 100644 --- a/test/python/dagcircuit/test_dagcircuit.py +++ b/test/python/dagcircuit/test_dagcircuit.py @@ -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': @@ -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) @@ -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: @@ -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) @@ -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':