Comments (2)
Just to emphasize the severity: for an Operator
on tens of qubits, "large" here can mean petabytes, so the program immediately crashes.
from qiskit-experiments.
This issue is likely related to an issue with Numpy itself which I opened awhile ago and I believe is still unresolved:
- numpy/numpy#24336
- Qiskit/qiskit#10561
and hence Pandas internal use of numpy, and Qiskit Experiments internal use of Pandas could be rigger this.
A minimal example for how this breaks in qiskit experiments is below:
from qiskit_experiments.framework import BaseAnalysis, AnalysisResultData, ExperimentData
from qiskit.quantum_info import Pauli
class BrokenAnalysis(BaseAnalysis):
"""This will fail because Panda's trys to convert a Pauli to a dense array"""
def _run_analysis(self, experiment_data):
return [AnalysisResultData("pauli", Pauli(100 * "X"))], []
analysis = BrokenAnalysis()
analysis.run(ExperimentData())
Analysis callback failed [Experiment ID: 8cf08621-dfb8-4cf8-97ad-b794207b1981][Analysis Callback ID: 64ef09198f934e1dac00450ed401faaf]:
Traceback (most recent call last):
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit_experiments/framework/experiment_data.py", line 960, in _run_analysis_callback
callback(self, **kwargs)
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit_experiments/framework/base_analysis.py", line 202, in run_analysis
expdata.add_analysis_results(**table_format)
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit/utils/deprecation.py", line 183, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit_experiments/framework/experiment_data.py", line 86, in _wrapped
return_val = func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit_experiments/framework/experiment_data.py", line 1377, in add_analysis_results
uid = self._analysis_results.add_data(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit_experiments/framework/analysis_result_table.py", line 153, in add_data
self._data.loc[index, :] = pd.array(list(template.values()), dtype=object)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/pandas/core/construction.py", line 388, in array
return NumpyExtensionArray._from_sequence(data, dtype=dtype, copy=copy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/pandas/core/arrays/numpy_.py", line 130, in _from_sequence
result = np.asarray(scalars, dtype=dtype) # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit/quantum_info/operators/symplectic/pauli.py", line 226, in __array__
return np.asarray(self.to_matrix(), dtype=dtype)
^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit/quantum_info/operators/symplectic/pauli.py", line 424, in to_matrix
return self._to_matrix(self.z, self.x, self._phase[0], sparse=sparse)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cjwood/mambaforge/envs/qiskit1/lib/python3.11/site-packages/qiskit/quantum_info/operators/symplectic/base_pauli.py", line 445, in _to_matrix
indptr = np.arange(dim + 1, dtype=np.uint)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Maximum allowed size exceeded
from qiskit-experiments.
Related Issues (20)
- Update FakeOpenPulse2QV2 after Qiskit 1.0
- More robust local service implementation HOT 1
- Align FakeJob with the methods of the RuntimeJob
- Deprecate BackendData.is_simulator HOT 1
- Experiment serialization HOT 9
- Investigate performance of ExperimentData regarding adding more data to it
- `save` to report success and result database link
- Copied analysis result not saving to cloud service
- Clearly mark analysis result names in documentation
- Build release notes for older patch releases
- Implementing an adaptive Trotter decomposition that dynamically adjusts the number of Trotter steps based on the complexity of the quantum circuit. HOT 2
- Median Quartiles and Box Plots HOT 1
- Investigation of Quantum Sources for Time-Correlated Noise in Solid-State Quantum Devices HOT 2
- Error in the plotter if there is no valid fitter error
- Progress/status indicator?
- Randomized benchmarking fails to analyze the results from IBM Eagle, due to the lack of 2Q gate decomposition value for ECR gate
- Add `SamplerV2` support
- Jobs retrieved from hardware do not write "physical_qubits" metadata, causing MitigatedTomographyAnalysis to fail HOT 2
- Extensions patch release blocking `qiskit` PR 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 qiskit-experiments.