Comments (4)
I've managed to track down the problem to this line:
Why that would be causing a problem, I have no idea.
from pennylane.
And it seems to be fixed by switching np.linalg.solve
with scipy.linalg.solve
. 😕
from pennylane.
And an minimal example of the issue:
import tensorflow as tf
@tf.py_function(Tout=tf.float32)
def py_log_huber(x, m):
print('Running with eager execution.')
import numpy as np
A = np.array([[1.0, 1.0], [0.0, 1.0]])
b = np.array([0.0, 1.0])
print(np.linalg.solve(A, b))
return m**2
x = tf.constant(1.0)
m = tf.constant(2.0)
print(py_log_huber(x,m).numpy())
@tf.function
def tf_wrapper(x):
print('Tracing.')
m = tf.constant(2.0)
return py_log_huber(x,m)
print(tf_wrapper(x).numpy())
from pennylane.
It seems to me that tensorflow/python/eager/imperative_grad.py
uses a pywrap_tfe.TFE_Py_TapeGradient
, which access a memory address it isn't supposed to. Guess that the next step is to create a MRE and raise to TensorFlow team?
If you are fine with that then I would be happy to take the issue, otherwise let's discuss more.
from pennylane.
Related Issues (20)
- [BUG] final transforms with non-trainable parameters HOT 2
- [Ignore this issue] Tensor notation in Grover documentation is too big
- [BUG] ``qml.equal`` does not understand nesting in sums
- [BUG] Controlled ZYZ decomp fails for operators with torch parameters
- [Bug] Matrix of empty PauliSentence is wrong
- [BUG] Default qubit measure tests include expression missing negative (works because n_wires is even) HOT 3
- Equivalent 'plot distribution' functionality similar to qiskit implemented for PennyLane for quick circuit probability outputs. HOT 8
- [BUG] Incompatibility of jax with device default.mixed and qml.QubitDensityMatrix() HOT 4
- [BUG] Issue calculating `qml.qinfo.transforms.quantum_fisher` HOT 2
- [BUG] `default.mixed` device does not support `Snapshot` with measurements
- [BUG] string wires do not work with qml.measure HOT 6
- [BUG] `vmap` when a circuit has `AmplitudeEmbedding` on a subset of qubits fails HOT 4
- [BUG] default.qubit tries to decompose non-trainable QubitUnitary in adjoint-diff HOT 1
- [BUG] Expectation Value of Hamiltonian with respect to CISD Wavefunction gives Different Energy than the CISD Energy HOT 3
- Possibility of Qubit, Qutrit and Qudit(when qudit device added) Interaction HOT 2
- [BUG] second-order derivative gives wrong result when using parameter-shift and jax HOT 7
- [BUG] Uncompatibility between "qml.density_matrix" and "default.mixed" in jax.jit HOT 4
- [BUG] Qiskit Aer device creation error HOT 1
- [BUG] Qiskit devices don't support vmap parameter broadcasting HOT 3
- Implement `ExpectationMP.process_counts` HOT 3
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.