qiskit-community / qiskit-experiments

Qiskit Experiments
https://qiskit-community.github.io/qiskit-experiments/
Apache License 2.0
154 stars 125 forks source link

Tomography options need serialization #181

Closed coruscating closed 3 years ago

coruscating commented 3 years ago

What is the current behavior?

When trying to save a tomography experiment to ResultsDB,

import qiskit_experiments.tomography as tomo
import qiskit.quantum_info as qi
target = qi.random_statevector(2 ** 1, seed=0)
qstexp = tomo.StateTomography(target)
expdata = qstexp.run(backend)
exp_data.block_for_results()
expdata.save_all()

the error is:

Object of type PauliMeasurementBasis is not JSON serializable

We need to decide how to serialize PauliMeasurementBasis.

chriseclectic commented 3 years ago

I think @jyu00 has fixed in #115, can you test on the latest update?

coruscating commented 3 years ago

Yes, this has been fixed, but the graph isn't getting uploaded. image The error when saving is {"errors":["Invalid content-type: multipart/form-data; boundary=6bacea2081aa1b095503a7821fe62e8c; expected multipart/form-data"]}