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

[BUG] Templates with custom queueing fail with qml.ctrl #6267

Closed
1 task done
KetpuntoG opened this issue Sep 13, 2024 · 1 comment
Closed
1 task done

[BUG] Templates with custom queueing fail with qml.ctrl #6267

KetpuntoG opened this issue Sep 13, 2024 · 1 comment
Assignees
Labels
bug 🐛 Something isn't working

Comments

@KetpuntoG
Copy link
Contributor

Expected behavior

This should generate the same circuit

qml.ctrl(qml.QSVT, control = 0)(qml.X(1), [qml.Z(1)])
qml.ctrl(qml.QSVT(qml.X(1), [qml.Z(1)]), control = 0)

Actual behavior

The first line, will not work correctly because is also queuing X and Z.
In the second line these operators are not queued

Additional information

it could have same behaviour with qml.adjoint or similar

Source code

No response

Tracebacks

No response

System information

Name: PennyLane
Version: 0.39.0.dev10
Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Home-page: https://github.com/PennyLaneAI/pennylane
Author: 
Author-email: 
License: Apache License 2.0
Location: /Users/guillermoalonso/Documents/GitHub/pennylane
Requires: numpy, scipy, networkx, rustworkx, autograd, toml, appdirs, autoray, cachetools, pennylane-lightning, requests, typing_extensions, packaging
Required-by: PennyLane_Lightning

Platform info:           macOS-14.6.1-arm64-arm-64bit
Python version:          3.9.6
Numpy version:           1.26.4
Scipy version:           1.12.0
Installed devices:
- lightning.qubit (PennyLane-Lightning-0.38.0)
- default.clifford (PennyLane-0.39.0.dev10)
- default.gaussian (PennyLane-0.39.0.dev10)
- default.mixed (PennyLane-0.39.0.dev10)
- default.qubit (PennyLane-0.39.0.dev10)
- default.qubit.autograd (PennyLane-0.39.0.dev10)
- default.qubit.jax (PennyLane-0.39.0.dev10)
- default.qubit.legacy (PennyLane-0.39.0.dev10)
- default.qutrit (PennyLane-0.39.0.dev10)
- default.qutrit.mixed (PennyLane-0.39.0.dev10)
- default.tensor (PennyLane-0.39.0.dev10)
- null.qubit (PennyLane-0.39.0.dev10)

Existing GitHub issues

  • I have searched existing GitHub issues to make sure the issue does not already exist.
@KetpuntoG
Copy link
Contributor Author

Solved here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant