-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Returning Pauli
or SparsePauliOp
analysis results implicitly calls their to_matrix
method when adding to dataframe
#1417
Labels
bug
Something isn't working
Comments
Just to emphasize the severity: for an |
This issue is likely related to an issue with Numpy itself which I opened awhile ago and I believe is still unresolved:
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())
|
chriseclectic
changed the title
Returning analysis experiments which contain
Returning analysis experiments which contain Feb 28, 2024
Operator
s produces large arraysPauli
or SparsePauliOp
results converts them to dense arrays via to_matrix
chriseclectic
changed the title
Returning analysis experiments which contain
Returning Feb 28, 2024
Pauli
or SparsePauliOp
results converts them to dense arrays via to_matrix
Pauli
or SparsePauliOp
analysis results converts them to dense arrays via to_matrix
chriseclectic
changed the title
Returning
Returning Feb 28, 2024
Pauli
or SparsePauliOp
analysis results converts them to dense arrays via to_matrix
Pauli
or SparsePauliOp
analysis results implicitly calls their to_matrix
method when adding to dataframe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This line ends up trying to convert
Operator
s to arrays, if included in the analysis results. If the operator is on a large number of qubits, this produces a large array.https://github.com/Qiskit-Extensions/qiskit-experiments/blob/0bbd426dc257be6d35daf04d94bbb31e0d059648/qiskit_experiments/framework/analysis_result_table.py#L153
The text was updated successfully, but these errors were encountered: