mm.physics.fock.dm_to_probs¶
- mrmustard.physics.fock.dm_to_probs(dm)[source]¶
Extracts the diagonals of a density matrix.
- Parameters:
dm (
ndarray
[Tuple
[int
,...
],Union
[TypeVar
(R
,float16
,float32
,float64
),TypeVar
(C
,complex64
,complex128
),TypeVar
(Z
,int16
,int32
,int64
),TypeVar
(N
,uint16
,uint32
,uint64
)]]) – the density matrix- Returns:
the probabilities vector
- Return type:
Tensor
code/api/mrmustard.physics.fock.dm_to_probs
Download Python script
Download Notebook
View on GitHub