statevector¶
-
statevector
(self, include_final_measurements=False)[source]¶ Return output statevector for the circuit.
- Parameters
include_final_measurements (bool) – Include final measurements in the circuit.
- Returns
Output statevector object.
- Return type
StateVector
Example
from qiskit import QuantumCircuit import kaleidoscope.qiskit qc = QuantumCircuit(3) qc.h(0) qc.cx(0, range(1,2)) qc.statevector()
Statevector([0.70710678+0.j, 0. +0.j, 0. +0.j, 0.70710678+0.j, 0. +0.j, 0. +0.j, 0. +0.j, 0. +0.j], dims=(2, 2, 2))