I wonder if there's a way we can initialize the quantum state only for part of the qubits in a quantum circuit. Say if I have a quantum circuit defined as
qc = QuantumCircuit(4), can we only initialize the first qubit (qubit 0) to a particular quantum state, and leave other qubits unchanged (i.e. $|0\rangle$)?
I tried to follow a documentation on qiskit, but am still confused about how to do that. I tried to initialize all the qubits by generating a statevector from the tensor product of each qubit:
qc.initialize(np.kron(...)), but it returns me
LinAlgError: Last 2 dimensions of the array must be square. Is there an easier way I can do that by specifying which qubit I want to initialize? Thanks for the help!!