# How to prepare an initial state for variational quantum algorithms?

I would like to prepare an initial state for variational quantum algorithms.

The initial state should include the following states: $$|000\rangle, |010\rangle, |100\rangle$$, and $$|001\rangle$$.

How can I prepare this initial state?

FYI, I referred to this paper. In this paper, the circuit creates $$|100\rangle$$, $$|101\rangle$$, and $$|001\rangle$$.

In addition, the Hamiltonian I want to solve is $$H = - \frac{1}{2} \varepsilon \sum_{i=1}^{N} Z_i + \frac{1}{4} V \sum_{i,j=1}^N(X_iXj - Y_iY_j) \;,$$ where $$\varepsilon$$ and $$V$$ is the coefficients and $$N$$ is the number of quits.

To prepare this state specifically, start with $$|000\rangle$$ and apply H to the 0th and 1st qubits, yielding

$$\frac{1}{4} (|000\rangle + |010\rangle + |100\rangle + |110\rangle)$$

Then, we can apply the Toffoli gate to the 0th and 1st qubit with the 2nd qubit as the target, yielding:

$$\frac{1}{4} (|000\rangle + |010\rangle + |100\rangle + |111\rangle)$$

Now, apply a CNOT with 2nd qubit as control and 0th and 1st qubits as targets, yielding:

$$\frac{1}{4} (|000\rangle + |010\rangle + |100\rangle + |001\rangle)$$

As desired.

More talk on state prep

Because your Hamiltonian is relatively simple, both Trotterization and Variational Quantum Eigensolvers (VQEs) could work. I'll refer to the VQE, because it talks more about quantum state prep, specifically:

If a quantum state is characterized by an exponentially large number of parameters, it cannot be prepared with a polynomial number of operations. The set of efficiently preparable states are therefore characterized by polynomially many parameters, and we choose a particular set of ansatz states of this type.

Basically, especially for quantum chem algorithms with complex ansatzes, we need efficient state preparation algorithms that are parametrized with a polynomial number of parameters. This is still an active area of research and especially important for Trotterization/VQEs/Qubitization, etc.

• To calculate with VQE, we have to prepare the initial state as the following style: $$a|000> + b|010> + c|100> + d|100>$$ with $$a^2 + b^2 + c^2 + d^2 = 1$$. Am I right ? – Ashy Oct 13 '19 at 6:47
• @Ashy all quantum states need to be in the form $\sum_{i} a_i |i \rangle$ where $\sum_{i} |a_i|^2 = 1$ and $a_i \in \mathbb{C}$ – C. Kang Oct 13 '19 at 15:23
• To calculate the minimum value with VQE, I think we should prepare the initial state with some parameters. – Ashy Oct 15 '19 at 7:22
• @Ashy, do you have a specific question? If so, I'd recommend creating a new question – C. Kang Oct 15 '19 at 17:37
• you have to change the initial state |x(theta)> with respect to theta to find the minimu value of <x(theta) | H | x(theta) > for variational calculations. However, the state you mentioned is not changeable. Anyway, I make a new question. Thank you very much. – Ashy Oct 16 '19 at 9:27