Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.DensityMatrix.from_int

static DensityMatrix.from_int(i, dims)[source]

Return a computational basis state density matrix.

প্যারামিটার
  • i (int) -- the basis state element.

  • dims (int or tuple or list) -- The subsystem dimensions of the statevector (See additional information).

রিটার্নস

The computational basis state \(|i\rangle\!\langle i|\).

রিটার্ন টাইপ

DensityMatrix

Additional Information:

The dims kwarg can be an integer or an iterable of integers.

  • Iterable -- the subsystem dimensions are the values in the list with the total number of subsystems given by the length of the list.

  • Int -- the integer specifies the total dimension of the state. If it is a power of two the state will be initialized as an N-qubit state. If it is not a power of two the state will have a single d-dimensional subsystem.