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.
Add Clifford.from_matrix (Qiskit#9475)
* Add Clifford.from_matrix * Add tests * Add reno * Faster Clifford.from_matrix O(16^n)->O(4^n) * Add infinite recursion test case * Change to try append with definition first * Add u gate handling for speed * Improve implematation following review comments * Add Clifford.from_operator * Update reno * Lint * more accurate reno --------- Co-authored-by: Ikko Hamamura <[email protected]>
- Loading branch information
1 parent
25e7438
commit 92629b3
Showing
4 changed files
with
339 additions
and
27 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
9 changes: 9 additions & 0 deletions
9
releasenotes/notes/add-clifford-from-matrix-3184822cc559e0b7.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,9 @@ | ||
--- | ||
features: | ||
- | | ||
Added :meth:`.Clifford.from_matrix` and :meth:`.Clifford.from_operator` method that | ||
creates a ``Clifford`` object from its unitary matrix and operator representation respectively. | ||
- | | ||
The constructor of :class:`.Clifford` now can take any Clifford gate object up to 3 qubits | ||
as long it supports :meth:`to_matrix` method, | ||
including parameterized gates such as ``Rz(pi/2)``, which were not convertible before. |
Oops, something went wrong.