-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate passing in an ast node as a instruction parameter (#3240)
This commit deprecates the option of passing in a circuit parameter of a qasm.node.Node type. Passing in qasm ast nodes as a parameter is rarely used and is not actually done anywhere in the qiskit-terra code or tests. Additionally there is the qiskit ast_to_circuit converter which will take a program node object (the root node of a qasm ast) and convert that directly to a circuit object.
- Loading branch information
Showing
2 changed files
with
25 additions
and
3 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
10 changes: 10 additions & 0 deletions
10
releasenotes/notes/deprecate-qasm-ast-node-params-3cc930ea2c677a96.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,10 @@ | ||
--- | ||
deprecations: | ||
- | | ||
Support for setting ``qiskit.circuit.Instruction`` parameters with an object | ||
of type ``qiskit.qasm.node.Node`` has been deprecated. ``Node`` objects that | ||
were previously used as parameters should be converted to a supported type | ||
prior to initializing a new ``Instruction`` object or calling the | ||
``Instruction.params`` setter. Supported types are ``int``, ``float``, | ||
``complex``, ``str``, ``qiskit.circuit.ParameterExpression``, or | ||
``numpy.ndarray``. |