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.
Make
qasm3.CustomGate
accessible from Python space
We previously exposed the data attribute `STDGATES_INC_GATES`, but its contents are all `CustomGate`, which can't be inspected programmatically from Python space. This makes it so you can query _what_ the gates, their number of parameters, and how to construct them.
- Loading branch information
1 parent
5121a0f
commit 20f5c31
Showing
5 changed files
with
37 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
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
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/qasm3-public-custom-gate-f4b2784f5cfadc30.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,8 @@ | ||
--- | ||
features_qasm: | ||
- | | ||
The class :class:`.qasm3.CustomGate` is now inspectable programmatically. Its | ||
:attr:`~.qasm3.CustomGate.constructor`, :attr:`~.qasm3.CustomGate.name`, | ||
:attr:`~.qasm3.CustomGate.num_params` and :attr:`~.qasm3.CustomGate.num_qubits` can now be | ||
viewed from Python after the object has been constructed. This allows you to inspect the | ||
contents of provided data attributes like :data:`.STDGATES_INC_GATES`. |
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