pennylane
pennylane copied to clipboard
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.
Now `MeasurementValues` can have arbitrary functions applied to them. ``` a = measure(0) b = measure(1) out = qml.apply_to_measurements(lambda x, y: sin(2 * x + y)(a, b) qml.cond(out > 0.5,...
### Expected behavior Providing an observable to `qml.probs` works all the time, even with observables like `qml.Hermitian`. ### Actual behavior Using `qml.probs(op=qml.Hadamard(0))` we get `[0.14644661 0.85355339]`, whereas with ```py mx...
### Feature details Support for backpropagation in the `default.mixed` device was previously implemented for the majority of the interfaces. One of the remaining interfaces yet to support this is PyTorch...
**Context:** The qchem module supports only autograd right now. This PR is a prototype of the same using Jax. Since autograd is no longer in active development, it could be...
### Feature details Due to the similarity, it is easy to confuse `qml.X` and `qml.PauliX`, especially since other methods of specifying circuits, e.g., QASM, use `x` for `PauliX`. But if...
### Feature details I would like to contribute a tutorial on simulated annealing using PennyLane. If needed, I can work on making a module on simulated annealing. This will allow...
**Context:** Simulated annealing algorithm **Description of the Change:** A new function for running the simulated annealing algorithm for finding global optima of optimization problems **Benefits:** There is no dedicated package...
### Feature details Currently, [`qml.Tracker`](https://pennylane.readthedocs.io/en/stable/code/api/pennylane.Tracker.html) works really well for tracking quantities that are already being recorded by the device. However, it is not currently possible to add _custom_ quantities to...
### Context We would like to define a new operation called `PSWAP`, as [defined in the PennyLane-Braket plugin](https://amazon-braket-pennylane-plugin-python.readthedocs.io/en/latest/code/api/braket.pennylane_plugin.PSWAP.html). ### **Steps to take** **Adding the operation** - Adding the `PSWAP` class...
### Expected behavior Consider the following circuit: ```python dev = qml.device("lightning.qubit", wires=2, shots=1) H = qml.PauliZ(0) + qml.PauliZ(1) @qml.qnode(dev) def cost_function3(): qml.Hadamard(0) qml.CNOT(wires=[0, 1]) return qml.expval(H) ``` This circuit will...