mm.physics.fock.normalize

mrmustard.physics.fock.normalize(fock, is_dm)[source]

Returns the normalized ket state.

Parameters:
  • fock (Tensor) – the state to be normalized

  • is_dm (optioanl bool) – whether the input tensor is a density matrix

Returns:

the normalized state

Return type:

Tensor