Editorial
By applying an gate to a qubit followed by a Hadamard () gate, the zero state is transformed into the minus state:
Since the observation probability is given by the squared absolute value of its probability amplitudes, measuring the qubit results in observing the computational basis states and with equal probabilities each.
Such states in a probabilistic superposition are one of the unique properties of quantum computers that do not exist in classical computers.
Sample Code
Below is a sample code:
from qiskit import QuantumCircuit
def solve() -> QuantumCircuit:
qc = QuantumCircuit(1)
qc.x(0)
qc.h(0)
return qc
Supplements
- There are many types of quantum gates besides the gate and the Hadamard gate that we use in this contest. Understanding the meaning and function of each quantum gate can be helpful in solving future problems: