# StateTomography¶

class StateTomography(circuit, measurement_basis=<PauliMeasurementBasis: PauliMeasurementBasis>, measurement_qubits=None, basis_indices=None, qubits=None)[source]

Quantum state tomography experiment.

Overview

Quantum state tomography (QST) is a method for experimentally reconstructing the quantum state from measurement data.

A QST experiment measures the state prepared by quantum circuit in different measurement bases and post-processes the measurement data to reconstruct the state.

Analysis Class Reference

StateTomographyAnalysis

Experiment Options

These options can be set by set_experiment_options() method.

No experiment option available for this experiment.

Transpiler Options

This option can be set by set_transpile_options() method.

This option is used for circuit optimization. See the documentation of qiskit.transpile for available options.

Backend Run Options

This option can be set by set_run_options() method.

This option is used for controlling job execution condition. Note that this option is provider dependent. See provider’s backend runner API for available options. See the documentation of IBMQBackend.run for the IBM Quantum Service.

Note

Performing full state tomography on an N-qubit state requires running $$3^N$$ measurement circuits when using the default measurement basis.

Module(s) TomographyExperiment

Initialization

Initialize a quantum process tomography experiment.

Parameters
• circuit (Union[QuantumCircuit, Instruction, BaseOperator, Statevector]) – the quantum process circuit. If not a quantum circuit it must be a class that can be appended to a quantum circuit.

• measurement_basis (MeasurementBasis) – Tomography basis for measurements. If not specified the default basis is the PauliMeasurementBasis.

• measurement_qubits (Optional[Sequence[int]]) – Optional, the qubits to be measured. These should refer to the logical qubits in the state circuit. If None all qubits in the state circuit will be measured.

• basis_indices (Optional[Iterable[List[int]]]) – Optional, a list of basis indices for generating partial tomography measurement data. Each item should be given as a list of measurement basis configurations [m[0], m[1], ...] where m[i] is the measurement basis index for qubit-i. If not specified full tomography for all indices of the measurement basis will be performed.

• qubits (Optional[Sequence[int]]) – Optional, the physical qubits for the initial state circuit.

Attributes

 StateTomography.analysis Return the analysis instance for the experiment StateTomography.analysis_options Return the analysis options for run() analysis. StateTomography.backend Return the backend for the experiment StateTomography.experiment_options Return the options for the experiment. StateTomography.experiment_type Return experiment type. StateTomography.num_qubits Return the number of qubits for the experiment. StateTomography.physical_qubits Return the device qubits for the experiment. StateTomography.run_options Return options values for the experiment run() method. StateTomography.transpile_options Return the transpiler options for the run() method.

Methods

 Return a list of experiment circuits. Return the config dataclass for this experiment Return a copy of the experiment Initialize an experiment from experiment config StateTomography.run([backend, analysis, timeout]) Run an experiment and perform analysis. StateTomography.run_analysis(experiment_data) Run analysis and update ExperimentData with analysis result. Set the analysis options for run() method. Set the experiment options. Set options values for the experiment run() method. Set the transpiler options for run() method.