Editorial
For the inner products of the quantum states and , the following hold:
Thus, when we apply an operator to the quantum states and , we get the following results:
This operation that flips and can be realized with the gate.
Sample Code
Below is a sample program:
from qiskit import QuantumCircuit
def solve() -> QuantumCircuit:
qc = QuantumCircuit(1)
qc.x(0)
return qc