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 gate.
By applying the gate to the quantum state , we obtain the quantum state :
When this qubit is measured, the computational basis state is observed with a probability of .
Since , the global phase of the state is .
Sample Code
Below is a sample program:
from qiskit import QuantumCircuit
def solve() -> QuantumCircuit:
qc = QuantumCircuit(1)
# Apply PauliY gate to the 1st qubit (index 0)
qc.y(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: