Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quantum_info type-aware rotating frame transformation function #103

Open
DanPuzzuoli opened this issue May 12, 2022 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@DanPuzzuoli
Copy link
Collaborator

What is the expected behavior?

Add a function (or enhance an existing one) to RotatingFrame that is qiskit.quantum_info "type aware", to be used at a higher level so that a user doesn't need to change syntax based on type.

Currently RotatingFrame has a bunch of frame-transformation helper functions that explicitly perform certain mathematical operations, e.g.:

rotating_frame.state_into_frame(t, y)

performs the mapping t, y -> exp(-tF) @ y and

rotating_frame.operator_into_frame(t, y)

performs the mapping t, y -> exp(-tF) @ y @ exp(tF) (might have minus signs mixed up).

Currently, if a user has a Statevector instance, they need to call state_into_frame, but if they have a DensityMatrix, they need to call operator_into_frame to perform the correct transformation. Furthermore, all current functions will strip any wrapping, and return a raw array. Note as well that the terminology of these functions is meant more to differentiate between the mathematical transformations, rather than to align with standard quantum usage (e.g. a DensityMatrix is a "state").

It'd be great to have something higher level, like rotating_frame.into_frame(t, y) (and similarly rotating_frame.out_of_frame(t, y), which utilizes the type of y to determine the correct mathematical transformation, and returns the results in the original wrapped class.

@DanPuzzuoli DanPuzzuoli added the enhancement New feature or request label May 12, 2022
@brosand brosand self-assigned this Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants