I am trying to understand how to initialize a quantum circuit with classical input. By browsing on the internet, I came to the conclusion that there are some fixed circuits which can be used to initialize data to a quantum circuit, but could not understand the logic of creating them. I also could find a good practical example. There is one paper related to initialization but it is very difficult to understand for me - https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1629135&casa_token=gBxw0KycKhIAAAAA:TTnN57HZI_jbB2XDjcIOoayRKrwwkPbUfpRROiU3_Dq9GMaZ8v0m4OQ_hs9DYdthPeQ_uCuTxQ
Also, tried one qiskit code as below:
from qiskit import QuantumCircuit, IBMQ import numpy as np num_qubits = 3 vector = [0.5,0.8660254,0.5,0.77432, 0.45, 0.6654,.5, .9987] initial_state = vector/np.linalg.norm(vector) circuit = QuantumCircuit(num_qubits,num_qubits) circuit.initialize(initial_state, [0,1,2]) print(circuit) circuit.decompose().decompose().decompose().decompose().decompose().draw('mpl')
Not sure, how these values of vector are put into the quantum circuit and why the vector is normalized ? Please guide me to some link where I can understand this topic or explain me this topic with an example?