A1: Generate State 0- \ket{0}

Time Limit: 3 sec

Memory Limit: 512 MiB

Score: 100

Problem Statement

Implement the operation of preparing the state ψ\ket{\psi} from the zero state on a quantum circuit qc\mathrm{qc} with 11 qubit.

The quantum state ψ\ket{\psi} is defined as

ψ=0.\begin{equation} \ket{\psi} = - \ket{0} \nonumber \end{equation}.

Constraints

  • In this problem, the state with different global phase will not be considered correct.
  • The submitted code must follow the specified format:
from qiskit import QuantumCircuit
 
 
def solve() -> QuantumCircuit:
    qc = QuantumCircuit(1)
    # Write your code here:
 
    return qc

Hints

Open
  • You can apply the quantum gate gg to the ii-th qubit of the quantum circuit qc\mathrm{qc} as follows:
qc.g(i)

Please sign in to submit your answer.