Editorial
Quantum computers use the concept of "quantum gates" to manipulate the state of qubits.
In this problem, you can transition from the zero state to the state - using the and gates.

First, apply the gate to the quantum state to transition it to the quantum state .
Next, apply the gate to the quantum state to transition it to the quantum state .
Finally, apply the gate to the quantum state to transition it to the quantum state .
Although the global phase of changes from to , when measuring this qubit, the original state is observed with a probability of 1.
These bit flips and phase flips are fundamental quantum operations.
Sample Code
Below is a sample program:
from qiskit import QuantumCircuit
def solve() -> QuantumCircuit:
qc = QuantumCircuit(1)
# Apply PauliX gate and PauliZ gate to the 1st qubit (index 0)
qc.x(0)
qc.z(0)
qc.x(0)
return qc
Supplementary Information
- There are many types of quantum gates. Understanding the meaning and function of each quantum gate can be helpful in solving future problems: