Shortcuts

qiskit.quantum_info.purity

purity(state, validate=True)[소스]

Calculate the purity of a quantum state.

The purity of a density matrix \(\rho\) is

\[\text{Purity}(\rho) = Tr[\rho^2]\]
매개변수
  • state (Statevector or DensityMatrix) – a quantum state.

  • validate (bool) – check if input state is valid [Default: True]

반환값

the purity \(Tr[\rho^2]\).

반환 형식

float

예외

QiskitError – if the input isn’t a valid quantum state.

당신은 다음 언어로 문서를 보고 있다 lang: Korean
언어
English
Japanese
German
Korean