mm.physics.fock.dm_to_ket¶
- mrmustard.physics.fock.dm_to_ket(dm)[source]¶
Maps a density matrix to a ket if the state is pure.
If the state is pure \(\hat \rho= |\psi\rangle\langle \psi|\) then the ket is the eigenvector of \(\rho\) corresponding to the eigenvalue 1.
- Parameters:
dm (Tensor) – the density matrix
- Returns:
the ket
- Return type:
Tensor
- Raises:
ValueError – if ket for mixed states cannot be calculated
code/api/mrmustard.physics.fock.dm_to_ket
Download Python script
Download Notebook
View on GitHub