# Tips and tricks for constructing circuits to generate arbitrary quantum states

I see a question quite a lot in past exam papers that goes like propose a quantum circuit that generates the state $$|\psi \rangle$$ given the initial state $$|\phi\rangle$$

Here's an example:

Given the initial state $$|000 \rangle$$ propose a quantum circuit that generates the state

$$|\psi \rangle=\tfrac{1}{\sqrt{2}} (|+++ \rangle - |--- \rangle)$$

Where $$|\pm \rangle=(|0 \rangle \pm |1\rangle)/\sqrt{2}$$

Now there's a square root of 2 involved so one would imagine a Hadamard gate is involved, but other than that I don't really see how you could just know the circuit apart from trial and error.

Are there any tips and tricks for making circuits that generate states given some initial state?

For the single qubit case, we can consider the circuit/operation/mapping as a rotation on the Bloch sphere, so just use the form $$R_y(\theta_1)R_z(\theta_2)R_y(\theta_3)$$ or any other similar stuff and try to get a set of $$\{\theta\}$$ to satisfy the requirements.