Portuguese
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.Statevector.from_label

classmethod Statevector.from_label(label)[código fonte]

Return a tensor product of Pauli X,Y,Z eigenstates.

Table 12 Single-qubit state labels

Label

Statevector

"0"

\([1, 0]\)

"1"

\([0, 1]\)

"+"

\([1 / \sqrt{2}, 1 / \sqrt{2}]\)

"-"

\([1 / \sqrt{2}, -1 / \sqrt{2}]\)

"r"

\([1 / \sqrt{2}, i / \sqrt{2}]\)

"l"

\([1 / \sqrt{2}, -i / \sqrt{2}]\)

Parâmetros

label (string) – a eigenstate string ket label (see table for allowed values).

Retorno

The N-qubit basis state density matrix.

Tipo de retorno

Statevector

Levanta

QiskitError – if the label contains invalid characters, or the length of the label is larger than an explicitly specified num_qubits.