A1: Generate Minus State

Time Limit: 3 sec

Memory Limit: 512 MiB

Score: 100

Problem Statement

Implement a 11-qubit quantum circuit qc\mathrm{qc} which satisfies the following condition:

  • Given the zero state 0\ket{0} as the input, return the minus state \ket{-} as the output.
0qc\ket{0} \xrightarrow{\mathrm{qc}} \ket{-}

Here, the minus state \ket{-} is defined as

=12(01).\begin{equation} \ket{-} = \frac{1}{\sqrt{2}} (\ket{0} - \ket{1}). \nonumber \end{equation}

Constraints

  • Global phase is ignored in judge.
  • 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.