Quantum Computing, Quantum Computer, Simulator, From Scratch.
QuantumCircuit(2) circuit.h(0) simulator = StatevectorSimulator() result = simulator.run(circuit).result() print(result.get_statevector()) The output looks like this: Statevector([0.70710678+0.j, 0.70710678+0.j, 0. +0.j, 0. +0.j], dims=(2, 2)) Ignoring the 0s in the vector, it looks like our state