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

[QIM-3] Add function density_matrix_transform #2598

Merged
merged 159 commits into from
Jun 10, 2022
Merged

Conversation

rmoyard
Copy link
Contributor

@rmoyard rmoyard commented May 20, 2022

Quantum Information module PR # 3
Context:

After the creation of density matrix functions for state vectors #2554 and matrices #2569 , we add a QNode transform that is accepting QNodes returning state.

Description of the Change:

We add the QNode returning states argument in the general function density_matrix_transform in the qinfo module.

@qml.qnode(dev)
def circuit(x):
    qml.RZ(x, wires=0)
    return qml.state()

density_matrix = qml.qinfo.density_matrix_transform(circuit, wires=[0])(0)

Benefits:

The density_matrix_transform function is accepting QNodes returning state. It is available across the whole codebase.

Base automatically changed from density_matrix_from_matrix to master June 10, 2022 06:02
@rmoyard rmoyard merged commit ffbfded into master Jun 10, 2022
@rmoyard rmoyard deleted the to_density_matrix branch June 10, 2022 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-ready 👌 PRs which are ready for review by someone from the core team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants