# What is k-state and how to go about creating a circuit?

The k-state is given by: $$|𝐾⟩ = \dfrac{\sqrt{3}|100⟩ − 𝑒^{𝑖π/4}|010⟩ + \sqrt{2}|001⟩}{ \sqrt{6}}$$ I am fairly new to quantum computing and do not have much background in the field. I understand the amplitudes of the state and the phases, however, how would one go about making a circuit for the same using the different quantum gates. I did refer to entangled states such as the W state, but I am unable to understand the underlying principle behind the combination of the gates used to create the circuit. In what direction should I go about constructing the k-state circuit.

I did the following: let $$U$$ be the single-qubit unitary $$U=\frac{1}{\sqrt{3}}\left(\begin{array}{cc} \sqrt{2} & 1 \\ -1 & \sqrt{2}\end{array}\right)$$ This is a partial rotation about the y axis. We use this definition to construct a circuit
Here's the thinking: after the Hadamard, I've got $$(|000\rangle+|100\rangle)/\sqrt{2}$$, so the $$|100\rangle$$ term is what I need it to be. So, I need to concentrate on making the other two terms without disturbing the first one. If everything else we do is controlled off the first qubit being $$|0\rangle$$, we achieve that lack of disturbance. Thus, really what we have to concentrate on is a circuit that converts $$|00\rangle$$ on the last two qubits into $$(\sqrt{2}|01\rangle-e^{i\pi/4}|10\rangle)/\sqrt{3}$$. We'll be able to get the phase right with a $$T$$ gate at the end, so you just needed to convert $$|00\rangle$$ into $$(\sqrt{2}|01\rangle-e^{i\pi/4}|10\rangle)/\sqrt{3}$$. The gate $$U$$ is a large part of doing that.