qiskit.quantum_info.Operator.from_label¶
- classmethod Operator.from_label(label)[ソース]¶
Return a tensor product of single-qubit operators.
- パラメータ
label (string) – single-qubit operator string.
- 戻り値
The N-qubit operator.
- 戻り値の型
- 例外
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]]