Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
ParallelExperiment¶
- class ParallelExperiment(experiments, backend=None, flatten_results=False, analysis=None)[source]¶
Combine multiple experiments into a parallel experiment.
Parallel experiments combine individual experiments on disjoint subsets of qubits into a single composite experiment on the union of those qubits. The component experiment circuits are combined to run in parallel on the respective qubits.
Analysis of parallel experiments is performed using the
CompositeAnalysis
class which handles marginalizing the composite experiment circuit data into individual childExperimentData
containers for each component experiment which are then analyzed using the corresponding analysis class for that component experiment.See
CompositeAnalysis
documentation for additional information.Initialize the analysis object.
- Parameters:
experiments (
List
[BaseExperiment
]) – a list of experiments.backend (
Optional
[Backend
]) – Optional, the backend to run the experiment on.flatten_results (
bool
) – If True flatten all component experiment results into a single ExperimentData container, including nested composite experiments. If False save each component experiment results as a separate child ExperimentData container. This kwarg is ignored if the analysis kwarg is used.analysis (
Optional
[CompositeAnalysis
]) – Optional, the composite analysis class to use. If not provided this will be initialized automatically from the supplied experiments.
Attributes
Return the analysis instance for the experiment
Return the backend for the experiment
Return the options for the experiment.
Return experiment type.
Return the number of sub experiments
Return the number of qubits for the experiment.
Return the device qubits for the experiment.
Return options values for the experiment
run()
method.Return the transpiler options for the
run()
method.Methods
Return a list of experiment circuits.
Return the component Experiment object.
Return the config dataclass for this experiment
Return a copy of the experiment
ParallelExperiment.from_config
(config)Initialize an experiment from experiment config
ParallelExperiment.run
([backend, analysis, ...])Run an experiment and perform analysis.
Set the experiment options.
ParallelExperiment.set_run_options
(**fields)Set options values for the experiment
run()
method.Set the transpiler options for
run()
method.