qat.noisy.compute_density_matrix

qat.noisy.compute_density_matrix(circuit, stack)

Compute the density matrix \(\rho\) of a given circuit. It is expressed in the computational basis.

Parameters
  • circuit (Circuit) – the circuit

  • stack (QPU) – a (noisy) QPU

Returns

the density matrix \(\rho\)

Return type

np.array

Note

This method is available as an application in Qaptiva Access.