Comments (2)
Thanks for the info @nquesada!
So far we've been following the discussion on Eigen in the pybind docs: https://pybind11.readthedocs.io/en/stable/advanced/cast/eigen.html#pass-by-reference
They recommend using Eigen::Ref<MatrixType>
, e.g., doing
void scale_by_2(Eigen::Ref<Eigen::VectorXd> v) {
v *= 2;
}
This allows passing by reference, but with some caveats. Luckily we just want to pass a vector so we might get away with this choice and avoid the complications (e.g. row major vs column major).
However it's good to know of this alternative!
Thanks!
from pennylane-lightning.
Thanks @nquesada, let us know if you see any other things we need to be mindful about
from pennylane-lightning.
Related Issues (20)
- Adjoint jacobian throws std::range_error
- Follow PennyLane `default.qubit` implementation for identity ops
- Python test suite in Lightning fails after removing deprecated tape execution methods in PennyLane HOT 3
- Use GCC for macOS wheels/tests HOT 1
- Handle IsingXY gate HOT 5
- MacOS arm64 wheels installed via pip result in ImportError HOT 4
- Support the same set of observables in forward/backward path HOT 1
- Add LM implementations of CSWAP & Toffoli gates HOT 2
- Update MacOS min version support to MacOS 11 HOT 1
- Docker Creation Fail GCC version and Test Fail HOT 7
- CodeCov report different coverage depending on the runner HOT 1
- Don't use brew for llvm path HOT 12
- Improve tests and checks workflows
- Ensure templated floating-point values are used throughout
- Update GCC 10.x to 11.x in CI tests HOT 1
- Update wheel-builder compiler from GCC 10.x to GCC 11.x
- Bug with probability returned by lightning
- Gate SingleExcitation not supported on device lightning.qubit HOT 2
- Unable to build from pypi source tarball HOT 2
- UserWarning: Pre-compiled binaries for lightning.qubit are not available HOT 4
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-lightning.