densitytensor_to_measurement_probabilities

qujax.densitytensor_to_measurement_probabilities(densitytensor, qubit_inds)

Extract array of measurement probabilities given a densitytensor and some qubit indices to measure (in the computational basis). I.e. the ith element of the array corresponds to the probability of observing the bitstring represented by the integer i on the measured qubits.

Parameters:
  • densitytensor (ndarray) – Input densitytensor.

  • qubit_inds (Sequence[int]) – Sequence of qubit indices to measure.

Returns:

Normalised array of measurement probabilities.

Return type:

ndarray