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.

TomographyAnalysis

class TomographyAnalysis[source]

Base analysis for state and process tomography experiments.

Analysis options

These are the keyword arguments of run() method.

Options
  • Defined in the class TomographyAnalysis:

    • measurement_basis (MeasurementBasis)

      Default value: None
      The measurement MeasurementBasis to use for tomographic reconstruction when running a StateTomography or ProcessTomography.
    • preparation_basis (PreparationBasis)

      Default value: None
      The preparation PreparationBasis to use for tomographic reconstruction for ProcessTomography.
    • fitter (str or Callable)

      Default value: "linear_inversion"
      The fitter function to use for reconstruction. This can be a string to select one of the built-in fitters, or a callable to supply a custom fitter function. See the Fitter Functions section for additional information.
    • fitter_options (dict)

      Default value: {}
      Any addition kwarg options to be supplied to the fitter function. For documentation of available kwargs refer to the fitter function documentation.
    • rescale_positive (bool)

      Default value: True
      If True rescale the state returned by the fitter to be positive-semidefinite. See the PSD Rescaling section for additional information (Default: True).
    • rescale_trace (bool)

      Default value: True
      If True rescale the state returned by the fitter have either trace 1 for DensityMatrix, or trace dim for Choi matrices (Default: True).
    • measurement_qubits (Sequence[int])

      Default value: None
      Optional, the physical qubits with tomographic measurements. If not specified will be set to [0, ..., N-1] for N-qubit tomographic measurements.
    • preparation_qubits (Sequence[int])

      Default value: None
      Optional, the physical qubits with tomographic preparations. If not specified will be set to [0, ..., N-1] for N-qubit tomographic preparations.
    • target (Any)

      Default value: None
      Optional, target object for fidelity comparison of the fit (Default: None).
    • target_bootstrap_samples (int)

      Default value: 0
      Optional, number of outcome re-samples to draw from measurement data for each basis for computing a bootstrapped standard error of fidelity with the target state. If 0 no bootstrapping will be performed and the target fidelity will not include a standard error (Default: 0).
    • target_bootstrap_seed (int | None | Generator)

      Default value: None
      Optional, RNG seed or Generator to use for bootstrapping data for boostrapped fidelity standard error calculation (Default: None).
    • conditional_circuit_clbits (list[int])

      Default value: None
      Optional, the clbit indices in the source circuit to be conditioned on when reconstructing the state. Enabling this will return a list of reconstrated state components conditional on the values of these clbit values. The integer value of the conditioning clbits is stored in state analysis result extra field “conditional_circuit_outcome”.
    • conditional_measurement_indices (list[int])

      Default value: None
      Optional, indices of tomography measurement qubits to used for conditional state reconstruction. Enabling this will return a list of reconstrated state components conditioned on the remaining tomographic bases conditional on the basis index, and outcome value for these measurements. The conditionl measurement basis index and integer value of the measurement outcome is stored in state analysis result extra fields “conditional_measurement_index” and “conditional_measurement_outcome” respectively.
    • conditional_preparation_indices (list[int])

      Default value: None
      Optional, indices of tomography preparation qubits to used for conditional state reconstruction. Enabling this will return a list of reconstrated channel components conditioned on the remaining tomographic bases conditional on the basis index. The conditionl preparation basis index is stored in state analysis result extra fields “conditional_preparation_index”.
  • Defined in the class BaseAnalysis:

    • figure_names (str or List[str])

      Default value: None
      Identifier of figures that appear in the experiment data to sort figures by name.

Initialization

Initialize the analysis object.

Attributes

TomographyAnalysis.options

Return the analysis options for run() method.

Methods

TomographyAnalysis.config()

Return the config dataclass for this analysis

TomographyAnalysis.copy()

Return a copy of the analysis

TomographyAnalysis.from_config(config)

Initialize an analysis class from analysis config

TomographyAnalysis.run(experiment_data[, ...])

Run analysis and update ExperimentData with analysis result.

TomographyAnalysis.set_options(**fields)

Set the analysis options for run() method.