3
$\begingroup$

Say I have

$$\dfrac{1}{\sqrt{2}}\bigl(|1\rangle|221\rangle|0\rangle + |3\rangle|73\rangle|2\rangle\bigr).$$

How can I change that into

$$\dfrac{1}{\sqrt{2}}\bigl(|1\rangle|221\rangle|1\rangle + |3\rangle|73\rangle|2\rangle\bigr)?$$

$\endgroup$
1
  • $\begingroup$ What do you mean by a certain term? If it is what it I think you are saying then you are not following linearity. But I just want to clarify. $\endgroup$
    – AHusain
    Mar 14, 2019 at 22:28

2 Answers 2

2
$\begingroup$

Assuming that your last spin is of dimension 3, why not just apply the unitary $$ \left(\begin{array}{ccc} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 1 \end{array}\right)? $$

$\endgroup$
2
  • $\begingroup$ How is this achieving what the op has in his example $\endgroup$
    – bilanush
    Mar 15, 2019 at 13:26
  • $\begingroup$ It is a unitary which changes 0 to 1, and leaves 2 unchanged. That is all the OP needed to solve his example. $\endgroup$
    – DaftWullie
    Mar 15, 2019 at 15:59
1
$\begingroup$

The first register the way you write it is about two qubits if not more. In the state, it is either 01 (1) or 11 (3). Then I would just use a X/NOT controlled by the two qubits of the register and only applied when the control is 01. This is done by Toffoli where you use X gate in between the first qubit so the control is applied when it is 0.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.