bloch_components

bloch_components(self)[source]

Returns the Bloch components of the statevector.

Example

from qiskit import QuantumCircuit
import kaleidoscope.qiskit

qc = QuantumCircuit(3)
qc.h(range(3))
qc.ch(0,1)
qc.s(2)
qc.cz(2,1)

qc.statevector().bloch_components()
[[0.7071067811865471, 0.0, 1.1102230246251565e-16],
 [-2.2007207689896178e-17, 0.0, 0.4999999999999996],
 [0.0, 0.4999999999999996, -2.6434987047674244e-34]]