Maximum Likelihood Estimation (MLE) Quantum State Tomography

Maximum Likelihood Estimation-based quantum state tomography.

class qsttoolkit.tomography.tradqst.MLE_reconstructor.model.MLEQuantumStateTomography(dim=None)[source]

Bases: QuantumStateTomography

A class for performing maximum likelihood estimation quantum state tomography.

plot_cost_values()[source]

Deprecated alias for plot_losses.

reconstruct(measurement_data: list, measurement_operators: list, initial_dm: ~numpy.ndarray, epochs: int = 500, optimizer: ~keras.src.optimizers.optimizer.Optimizer = <keras.src.optimizers.adam.Adam object>, L1_reg: float = 0.0, verbose_interval: int = None, num_progress_saves: int = None, true_dm: ~tensorflow.python.framework.tensor.Tensor = None, time_log_interval: int = None, method=None, verbose=None)[source]

Fits the density matrix to the measurement data using maximum likelihood estimation.

Parameters:
  • measurement_data (list of np.ndarray) – Frequency of each measurement outcome.

  • measurement_operators (list of Qobj) – Projective operators corresponding to the measurement outcomes.

  • initial_dm (np.ndarray) – Initial density matrix guess.

  • epochs (int) – Number of optimization epochs. Defaults to 500.

  • optimizer (tf.keras.optimizers.Optimizer) – Optimizer to use for the reconstruction. Defaults to Adam with learning rate 0.01.

  • L1_reg (float) – L1 regularisation parameter. Defaults to 0.

  • verbose_interval (int) – Interval at which to print progress updates. Defaults to None.

  • num_progress_saves (int) – Number of intermediate progress saves to make. Defaults to None.

  • true_dm (tf.Tensor) – True density matrix used for calculating fidelities. Defaults to None.

  • time_log_interval (int) – Interval at which to log the time taken after each epoch. Defaults to None.

qsttoolkit.tomography.tradqst.MLE_reconstructor.train.train(params: ~tensorflow.python.ops.variables.Variable, measurement_data: list, measurement_operators: list, epochs: int = 100, optimizer: ~keras.src.optimizers.optimizer.Optimizer = <keras.src.optimizers.adam.Adam object>, L1_reg: float = 0.0, verbose_interval: int = None, num_progress_saves: int = None, true_dm: ~tensorflow.python.framework.tensor.Tensor = None, time_log_interval: int = None) tuple[source]

Fits the density matrix to the measurement data using maximum likelihood estimation.

Parameters:
  • params (tf.Variable) – Trainable parametrization of the density matrix.

  • measurement_data (list of np.ndarray) – Frequency of each measurement outcome.

  • measurement_operators (list of Qobj) – Projective operators corresponding to the measurement outcomes.

  • epochs (int) – Number of optimization epochs. Defaults to 100.

  • optimizer (tf.keras.optimizers.Optimizer) – Optimizer to use for the reconstruction. Defaults to Adam with learning rate 0.01.

  • L1_reg (float) – L1 regularisation parameter. Defaults to 0.

  • verbose_interval (int) – Interval at which to print progress updates. Defaults to None.

  • num_progress_saves (int) – Number of intermediate progress saves to make. Defaults to None.

  • true_dm (tf.Tensor) – True density matrix used for calculating fidelities. Defaults to None.

  • time_log_interval (int) – Interval at which to log the time taken after each epoch. Defaults to None.

Returns:

  • list of float – Losses after each epoch.

  • list of tf.Tensor – Intermediate progress saves.

  • list of float – Fidelities of the generator density matrices with respect to the true density matrix.

  • list of float – Time taken after each epoch.

qsttoolkit.tomography.tradqst.MLE_reconstructor.train.train_step(params: Variable, measurement_data: list, measurement_operators: list, optimizer: Optimizer, L1_reg: float = 0.0)[source]

Performs one optimization step using gradient descent.

Parameters:
  • params (tf.Variable) – Trainable parametrization of the density matrix.

  • measurement_data (list of np.ndarray) – Frequency of each measurement outcome.

  • measurement_operators (list of Qobj) – Projective operators corresponding to the measurement outcomes.

  • optimizer (tf.keras.optimizers.Optimizer) – Optimizer to use for the reconstruction.

  • L1_reg (float) – L1 regularisation parameter. Defaults to 0.