Comments (5)
Having read the discussion in the appendix of openqml_formalism.tex and after thinking about it myself, I would summarize our conclusion as
-
If you only have gaussian gates and order-m polynomial observables (in x and p), in Heisenberg picture the gates act as linear transformations on (I, x, p) and thus the observables remain order-m. You can symbolically differentiate the transformation matrix and obtain an expression for the derivative which is another linear transformation on (I, x, p). Hence you should always be able to evaluate it in the lab by measuring a number of order-m observables and computing the proper linear combination of the results. This can be implemented in code.
-
If you also have non-gaussian gates, things get much more complicated. The gates no longer act as mere linear transformations on (I, x, p) and thus observables may be mapped to higher-order observables by each non-gaussian gate. It could probably be handled in the code, but I'm not sure how you could easily evaluate the resulting expectation values in the lab. This makes sense, since gaussian optics is intuitively "easy", non-gaussian is "hard".
Since one important design principle of OpenQML is that it's not just a simulator but you can also run the gradient algorithms on quantum hardware, I would suggest adding analytic CV gradients for gaussian circuits only in v0.1.
from pennylane.
I fully support your summary. But I would implement analytic gradients for Gaussian circuits and operators up to quadratic in version 0.0 (is that the first one?). So we have something to also guide the attention to CV circuits.
We could check a circuit for non-Gaussianness and then choose the differentiation method...
from pennylane.
I created a new branch and will start to write up the theory we have so far in the main manuscript.
from pennylane.
Still a couple days for inspiration to strike, but it's looking like we'll stick with Gaussian-only circuits for CV automatic differentiation :)
We need to start planning for how to implement this.
from pennylane.
The research deadline has now passed. We will implement automatic gradients for Gaussian CV circuits: gates from the Gaussian set and measurements of x, p, xx, xp+px, and pp.
@smite can you make this your next task to implement this? Loop in @mariaschuld @cgogolin or myself as necessary to clear up anything
from pennylane.
Related Issues (20)
- [BUG] Error when using `PauliRot` and `torch` interface HOT 3
- PennyLane Torch Implementation Question HOT 16
- Issue when using batched data on StronglyEntanglingLayers template.[BUG] HOT 3
- [BUG] `sum_expand` producing incorrect result dimensions
- [BUG] lighthing.qubit torch layer batch size issue HOT 1
- [BUG] Specs does not take into account transforms HOT 7
- How to support Prod observables in custom devices? HOT 3
- [BUG] Can't differentiate `dynamic_one_shot` with `autograd` and `jax` HOT 1
- [BUG] `dynamic_one_shot` does not work with TensorFlow HOT 1
- [BUG] CNOT decomposes to CNOT
- [BUG] Some decompositions/transforms do not preserve derivatives HOT 1
- [BUG] `defer_measurements` does not work with `qml.cond` applied to controlled gates HOT 3
- Define `BasisStateProjector.compute_sparse_matrix` HOT 3
- [BUG] `KerasLayer` has unintended side effects on its QNode HOT 1
- [BUG] Documentation generated does not show the parameters for subclasses of Operation. HOT 1
- Add support for Quantum ESPRESSO HOT 2
- [BUG] `QuantumScript.map_to_standard_wires` sometimes returns original tape HOT 2
- [CHORE] Update `docs/requirements.txt` to reduce package bloat
- [BUG] Differentiation does not work with `dynamic_one_shot` HOT 1
- [BUG] Different ground states when batching with vmap or calling the function directly HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pennylane.