# How can a Gaussian pulse be used to flip a qubit?

from qiskit import *
from qiskit.pulse.library import Gaussian
from qiskit import pulse
from qiskit.test.mock import FakeArmonk
qc = QuantumCircuit(1, 1)
qubit = 0

qc.measure(0, 0)
backend = FakeArmonk()

pulse.play(Gaussian(duration=1200, amp=0.1409018732350299, sigma=32), pulse.drive_channel(0))

reg = pulse.measure(qubit)

h_q0.draw()


job = execute(qc, backend, shots=8000)
from qiskit.tools.monitor import job_monitor
job_monitor(job)
result = job.result()
counts = result.get_counts()
print(counts)
{'0': 7810, '1': 190}


Above is the code that I am working with. I want to make the Gaussian pulse flip the qubit, so that most of the shots are in the 1 state instead of the 0 state. As a right now, the Gaussian pulse has no impact on the results of the job. I am looking at Chapter 6.1 of the Qiskit textbook, but cannot find anything that directly helps me. How would I get the Gaussian pulse involved and have it flip the output of the job?

• I haven't tried your code, but I'm pretty sure you need to delay the measurement pulse until after the Gaussian has finished Aug 12 at 10:50