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.
Merge branch 'main' into rename-basic-aer
- Loading branch information
Showing
8 changed files
with
252 additions
and
39 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
features: | ||
- | | ||
:meth:`.QuantumCircuit.assign_parameters` now accepts string keys in the mapping form of input. | ||
These names are used to look up the corresponding :class:`.Parameter` instance using | ||
:meth:`~.QuantumCircuit.get_parameter`. This lets you do:: | ||
from qiskit.circuit import QuantumCircuit, Parameter | ||
a = Parameter("a") | ||
qc = QuantumCircuit(1) | ||
qc.rx(a, 0) | ||
qc.assign_parameters({"a": 1}) == qc.assign_parameters({a: 1}) |
7 changes: 7 additions & 0 deletions
7
releasenotes/notes/circuit-get-parameter-d33c08925b5c7d72.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 @@ | ||
--- | ||
features: | ||
- | | ||
:class:`.QuantumCircuit` has two new methods, :meth:`~.QuantumCircuit.get_parameter` and | ||
:meth:`~.QuantumCircuit.has_parameter`, which respectively retrieve a :class:`.Parameter` | ||
instance used in the circuit by name, and return a Boolean of whether a parameter with a | ||
matching name (or the exact instance given) are used in the circuit. |
5 changes: 5 additions & 0 deletions
5
releasenotes/notes/fix-circuit-compose-duplicate-59de6c1c51f58e54.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,5 @@ | ||
--- | ||
fixes: | ||
- | | ||
:meth:`.QuantumCircuit.compose` will now correctly raise a :exc:`.CircuitError` when there are | ||
duplicates in the ``qubits`` or ``clbits`` arguments. |
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
Oops, something went wrong.