qiskit.providers.ibmq.experiment.IBMExperimentService.create_figure¶
-
IBMExperimentService.
create_figure
(experiment_id, figure, figure_name=None, sync_upload=True)[source]¶ Store a new figure in the database.
Note
Currently only SVG figures are supported.
- Parameters
experiment_id (
str
) – ID of the experiment this figure is for.figure (
Union
[str
,bytes
]) – Name of the figure file or figure data to store.figure_name (
Optional
[str
]) – Name of the figure. IfNone
, the figure file name, if given, or a generated name is used.sync_upload (
bool
) – IfTrue
, the plot will be uploaded synchronously. Otherwise the upload will be asynchronous.
- Return type
Tuple
[str
,int
]- Returns
A tuple of the name and size of the saved figure.
- Raises
IBMExperimentEntryExists – If the figure already exits.
IBMQApiError – If the request to the server failed.