Problem Statement
You are given an integer . Implement the operation of preparing the state from the zero state on a quantum circuit with qubits.
The quantum state is defined as
Constraints
- The circuit depth must not exceed .
- Global phase is ignored in judge.
- The submitted code must follow the specified format:
from qiskit import QuantumCircuit
def solve(n: int) -> QuantumCircuit:
qc = QuantumCircuit(n)
# Write your code here:
return qc
Sample Input
- : Implemented circuit should perform the following transformation.