Comments (3)
I think AerState
is designed to simulate each operation interactively from Python.
And implementations of amplitude
and probability
is not well optimized and they get only one value per call and they convert binary -> string -> binary inside.
I think we can have some shortcut function to access statevector directly, but I have no idea if it is right way or not and it will be useful. @hhorii how do you think?
from qiskit-aer.
As @doichanj mentioned, AerState
is not a public API. But if you want to it to get amplitudes of statevector somehow, I recommend to use move_to_vector
. With moved ndarray
, a new AerState
can be constructed with initialize()
method.
qiskit-aer/qiskit_aer/quantum_info/states/aer_statevector.py
Lines 143 to 156 in 74e4397
Again, AerState
is an internal class and use it at your own risk.
from qiskit-aer.
I'm already using move_to_vector as a workaround.
AerState is actually exposed in contrib/runtime (indeed, casted to a void*) and both aer_probability
and aer_amplitude
call the corresponding functions in AerState.
from qiskit-aer.
Related Issues (20)
- Aer `0.13.3` fails to install HOT 2
- MPS reports incorrect required memory HOT 1
- Supported number of qubits are not increasing with multiple nodes HOT 1
- Aer not getting imported. HOT 2
- ImportError: cannot import name 'Aer' from 'qiskit' (C:\Users\sandi\anaconda3\Lib\site-packages\qiskit\__init__.py) HOT 1
- Deprecate Qobj
- Deprecate standalone
- 'Aer' is not defined HOT 4
- Not able to load IBMQ HOT 1
- How to get the result of job
- CostBasedFusion aggregate_operations crash HOT 2
- Encountring "MPI_ERR_COUNT: invalid count argument" when creating GHZ states on multiple nodes HOT 3
- Support for PrimitivesV2 HOT 7
- ImportError: cannot import name 'NoiseModel' from 'qiskit_aer' HOT 2
- No module found qiskit.providers.aes HOT 1
- run_options is poorly documented HOT 3
- Aer sampler does not truncate to active number of qubits HOT 6
- QiskitBackendNotFoundError - Unable to run the backend using BackendEstimator primitive
- CCZ gates aren't accepted by the statevector_simulator HOT 2
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 qiskit-aer.