German
Sprachen
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.quantum_info.Operator.from_label

classmethod Operator.from_label(label)[Quellcode]

Return a tensor product of single-qubit operators.

Parameter

label (string) – single-qubit operator string.

Rückgabe

The N-qubit operator.

Rückgabetyp

Operator

Verursacht

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

Additional Information:

The labels correspond to the single-qubit matrices: ‚I‘: [[1, 0], [0, 1]] ‚X‘: [[0, 1], [1, 0]] ‚Y‘: [[0, -1j], [1j, 0]] ‚Z‘: [[1, 0], [0, -1]] ‚H‘: [[1, 1], [1, -1]] / sqrt(2) ‚S‘: [[1, 0], [0 , 1j]] ‚T‘: [[1, 0], [0, (1+1j) / sqrt(2)]] ‚0‘: [[1, 0], [0, 0]] ‚1‘: [[0, 0], [0, 1]] ‚+‘: [[0.5, 0.5], [0.5 , 0.5]] ‚-‚: [[0.5, -0.5], [-0.5 , 0.5]] ‚r‘: [[0.5, -0.5j], [0.5j , 0.5]] ‚l‘: [[0.5, 0.5j], [-0.5j , 0.5]]