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