You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simulation failed and returned the following error message:
ERROR: Failed to load qobj: to_json not implemented for this type of object: <class 'type'>
Simulation failed and returned the following error message:
ERROR: Failed to load qobj: Unable to cast Python instance to C++ type (compile in debug mode for details)
metadata (dict) – Arbitrary key value metadata to associate with the circuit. This gets stored as free-form data in a dict in the metadata attribute. It will not be directly used in the circuit.
Suggested solutions
None (yet).
The text was updated successfully, but these errors were encountered:
@hhorii For this one it might be better to not attempt to serialize the header information at all, and instead store it on the python side and add it back to the results after execution.
The to_json() method is called for each circuit header.
A header may include metadata and metadata can be a python object.
This PR changes serialization of circuit headers to use py::handle without serializing to a json.
FixesQiskit#1435
* use python parser for circuit.header
* support metadata copy with parameterization
* avoid serialization of circuit metadata
* use circuit_index to specify metadata
* remove metadata from qobj for Aer to simulate circuits
* add release note
* clear circuite metadata correctly.
* take unnecessary tests for circuit metadata backup/recovery
* work around metadata serialization issue within _run method
* Update releasenotes/notes/remove_circuit_metadata_from_qobj-324e7ea9b369ee67.yaml
Informations
What is the current behavior?
Simulation fails when circuit contains metadata.
Steps to reproduce the problem
Input:
Output:
Input:
Output:
What is the expected behavior?
Simulation should succeed. The metadata should be handled according to https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.html#qiskit.circuit.QuantumCircuit, which says
Suggested solutions
None (yet).
The text was updated successfully, but these errors were encountered: