Comments (2)
hi, and thanks for the message!
Can you post the full error message as well? thanks!
from tensornetwork.
hi, and thanks for the message! Can you post the full error message as well? thanks!
The full output is
(0.7063742876052856-1.4842953532934189e-08j)
Traceback (most recent call last):
File "a.py", line 17, in <module>
print(vg(1.0)) # error: AttributeError: 'ConcreteArray' object has no attribute 'item'
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/_src/traceback_util.py", line 162, in reraise_with_filtered_traceback
return fun(*args, **kwargs)
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/_src/api.py", line 993, in value_and_grad_f
ans, vjp_py = _vjp(f_partial, *dyn_args, reduce_axes=reduce_axes)
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/_src/api.py", line 2313, in _vjp
flat_fun, primals_flat, reduce_axes=reduce_axes)
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/interpreters/ad.py", line 116, in vjp
out_primals, pvals, jaxpr, consts = linearize(traceable, *primals)
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/interpreters/ad.py", line 103, in linearize
jaxpr, out_pvals, consts = pe.trace_to_jaxpr(jvpfun_flat, in_pvals)
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/interpreters/partial_eval.py", line 513, in trace_to_jaxpr
jaxpr, (out_pvals, consts, env) = fun.call_wrapped(pvals)
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/linear_util.py", line 166, in call_wrapped
ans = self.f(*args, **dict(self.params, **kwargs))
File "a.py", line 11, in func
e = mps.measure_local_operator([gate], [0])
File "/home/jiace/anaconda3/lib/python3.7/site-packages/tensornetwork/matrixproductstates/base_mps.py", line 319, in measure_local_operator
res.append(self.backend.item(result.tensor))
File "/home/jiace/anaconda3/lib/python3.7/site-packages/tensornetwork/backends/jax/jax_backend.py", line 878, in item
return tensor.item()
File "/home/jiace/anaconda3/lib/python3.7/site-packages/jax/core.py", line 568, in __getattr__
attr = getattr(self.aval, name)
jax._src.traceback_util.UnfilteredStackTrace: AttributeError: 'ConcreteArray' object has no attribute 'item'
The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.
--------------------
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "a.py", line 17, in <module>
print(vg(1.0)) # error: AttributeError: 'ConcreteArray' object has no attribute 'item'
File "a.py", line 11, in func
e = mps.measure_local_operator([gate], [0])
File "/home/jiace/anaconda3/lib/python3.7/site-packages/tensornetwork/matrixproductstates/base_mps.py", line 319, in measure_local_operator
res.append(self.backend.item(result.tensor))
File "/home/jiace/anaconda3/lib/python3.7/site-packages/tensornetwork/backends/jax/jax_backend.py", line 878, in item
return tensor.item()
AttributeError: 'ConcreteArray' object has no attribute 'item'
from tensornetwork.
Related Issues (20)
- Flaky Test when seed not used HOT 5
- Flaky test (always fails) when seeds are removed HOT 1
- Test `test_gmres_on_larger_random_problem` fails without seeds
- symmetric backend very slow for PEPS tensors HOT 4
- Home Network
- lack sqrt operation in tensornetwork/matrixproductstates/infinite_mps.py
- TensorNetwork backend for QuTiP. HOT 2
- Bug for numpy backend ``sum`` method HOT 3
- SVD on jax backend and thus ``split_node`` cannot be jitted when ``max_truncation_err`` is set
- Bug of setting `center_position` in `apply_two_site_gate` when there's no truncation
- Quantum hardware system integration with TensorNetwork
- Missing code for TensorNetwork Machine Learning HOT 1
- The lack of tensor-train RNNs for latest tf/keras HOT 1
- Parallelism Contractors HOT 1
- Question: Vector to FiniteMPS?
- Is there a simple way to multiply a scalar to the tensor values of a node that is part of a network of tensors? HOT 2
- Maintenance of this repository HOT 3
- Tensor
- Pf
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 tensornetwork.