A3: Generate state 12(0+3)\frac{1}{\sqrt{2}} (\ket{0} + \ket{3})

Time Limit: 3 sec

Memory Limit: 512 MiB

Score: 200

Problem Statement

Implement the operation of preparing the state ψ\ket{\psi} from the zero state on a quantum circuit qc\mathrm{qc} with 22 qubits.
The state ψ\ket{\psi} is defined as

ψ=12(0+3)=12(00+11).\begin{equation} \ket{\psi} = \frac{1}{\sqrt{2}} (\ket{0} + \ket{3}) = \frac{1}{\sqrt{2}} (\ket{00} + \ket{11}). \nonumber \end{equation}

Constraints

  • Changes in the global phase are ignored.
  • The submitted code must follow the specified format:
from qiskit import QuantumCircuit
 
 
def solve() -> QuantumCircuit:
    qc = QuantumCircuit(2)
    # Write your code here:
 
    return qc

Please sign in to submit your answer.