forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This has been against the documented typing of the functions for some time, but some scheduling methods have mistakenly been passing `None`. There is no need to support `None` here; the empty tuple `()` is equally immutable and a CPython singleton, so there are neither mutability nor memory benefits to supporting both, and removing `None` as an input is a simple way to remove a(n admittedly cheap) branch from the appender methods. Co-authored-by: Luciano Bello <[email protected]>
- Loading branch information
1 parent
d86e708
commit b18faa3
Showing
4 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/dag-deprecate-none-args-e6ef868148da275d.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
deprecations: | ||
- | | ||
Passing ``None`` as the ``qargs`` or ``cargs`` arguments to :meth:`.DAGCircuit.apply_operation_back` | ||
or :meth:`~.DAGCircuit.apply_operation_front` is deprecated and will be removed in Qiskit 1.0. | ||
This has been explicitly against the typing documentation for some time, but silently accepted | ||
by Qiskit. Instead, simply pass ``()`` rather than ``None``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters