You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
This PR implements the feature of the unitary matrix definition for
`UnitaryOpInterface` which has been removed from the original dialect
rewrite PR in favor of this follow-up.
It aims to allow access to the matrix definition of the standard gates
via a fast, stack-allocated matrix returned by the function
`getUnitaryMatrixDefinition()` in the trait.
A dynamic, heap-based matrix (size `Eigen::Dynamic`) is returned by the
`UnitaryOpInterface`. This requires a copy at the moment and further
evaluations are required if all matrices should be moved to the heap or
if there is a way to make use of the draft function
`getFastUnitaryMatrix()` which uses a template parameter, but is
currently also only accessible via a trait and thus needs a cast to the
correct type first.
The changes require the newly introduced `Eigen` library for its linear
algebra type.
For now, it uses the unsupported kronecker product feature which needs
to be discussed before merging. "Unsupported" features in Eigen are
community-contributed and are not an indication of how mature the code
is. However, the maintainers do not provide any API guarantees.
## Checklist:
<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->
- [ ] The pull request only contains commits that are focused and
relevant to this change.
- [ ] I have added appropriate tests that cover the new/changed
functionality.
- [ ] I have updated the documentation to reflect these changes.
- [ ] I have added entries to the changelog for any noteworthy
additions, changes, fixes, or removals.
- [ ] I have added migration instructions to the upgrade guide (if
needed).
- [ ] The changes follow the project's style guidelines and introduce no
new warnings.
- [ ] The changes are fully tested and pass the CI checks.
- [ ] I have reviewed my own code changes.
---------
Signed-off-by: burgholzer <burgholzer@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: burgholzer <burgholzer@me.com>
0 commit comments