I wasn't quite sure where to post this as I don't know if this is a Qiskit specific thing or not, but I'm not sure how to interpret this result I got from running a simulation.
from result.data():
{'counts': {'0x0': 371, '0x1': 653},
'statevector': [[0.6095190950364658, 0.00167238253077826],
[0.6389605613454776, 0.46926856185163585],
[0.0002864410240029574, -0.00010852146395313456]]}
From result.get_statevector():
array([6.09519095e-01+1.67238253e-03j, 6.38960561e-01+4.69268562e-01j,
2.86441024e-04-1.08521464e-04j])
This is a 1-qubit system btw
Also, I'm pretty new to QC, so pls be nice
Here's the code I'm using to simulate the system:
backend_sim = FakeArmonk()
custom_gate = Gate('custom_gate', 1, [])
qc1 = QuantumCircuit(1, 1)
qc1.initialize([np.cos(a[0]/2), np.exp(a[1]*1.j)*np.sin(a[0]/2)], 0)
qc1.append(custom_gate, [0])
qc1.measure(0, 0)
with pulse.build(backend_sim, name='custom_gate') as my_schedule:
pulse.play(Gaussian(duration=256+64, amp=.36, sigma=80), pulse.drive_channel(0))
qc1.add_calibration(custom_gate, [0], my_schedule)
qc1 = transpile(qc1, backend_sim)
pulse_sched = schedule(qc1, backend_sim)
pulse_sched.draw()
job1 = execute(pulse_sched, backend_sim, shots=1024)
result1 = job1.result()
result1.data()
The initialize state doesn't matter, it is a random pure state, and the parameters of the Gaussian pulse are also arbitrary