Skip to main content
added 191 characters in body
Source Link
DaftWullie
  • 61.7k
  • 4
  • 51
  • 139

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.


To get the big unitary matrix, I used a piece of Mathematica code:

psi0 = {3, 4, 5, 6, 7, 8, 9, 10}/Sqrt[380];
ns1 = Orthogonalize[NullSpace[{psi0}]];
ns1 = Join[{psi0}, ns1]
phi0 = {3, 4, 0, 6, 7, 8, 9, 10}/Sqrt[355];
ns2 = Orthogonalize[NullSpace[{phi0}]];
ns2 = Join[{phi0}, ns2]
U = FullSimplify[
Plus @@ (Transpose[{#[[2]]}].{#[[1]]} & /@ Transpose[{ns1, ns2}])]

This is actually major overkill. It's good enough to find any unitaries $U_1$ such that $U_1|000\rangle=|\psi_0\rangle$ and $U_1|000\rangle=|\phi_0\rangle$ (which are relatively straightforward to construct) and then just run the circuit $U_1^\dagger U_2$. Indeed, this paper shows (and ultimately gives a construction) for how a unitary can be constructed using no more than 4 controlled-not gates!.

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.


To get the big unitary matrix, I used a piece of Mathematica code:

psi0 = {3, 4, 5, 6, 7, 8, 9, 10}/Sqrt[380];
ns1 = Orthogonalize[NullSpace[{psi0}]];
ns1 = Join[{psi0}, ns1]
phi0 = {3, 4, 0, 6, 7, 8, 9, 10}/Sqrt[355];
ns2 = Orthogonalize[NullSpace[{phi0}]];
ns2 = Join[{phi0}, ns2]
U = FullSimplify[
Plus @@ (Transpose[{#[[2]]}].{#[[1]]} & /@ Transpose[{ns1, ns2}])]

This is actually major overkill. It's good enough to find any unitaries $U_1$ such that $U_1|000\rangle=|\psi_0\rangle$ and $U_1|000\rangle=|\phi_0\rangle$ (which are relatively straightforward to construct) and then just run the circuit $U_1^\dagger U_2$.

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.


To get the big unitary matrix, I used a piece of Mathematica code:

psi0 = {3, 4, 5, 6, 7, 8, 9, 10}/Sqrt[380];
ns1 = Orthogonalize[NullSpace[{psi0}]];
ns1 = Join[{psi0}, ns1]
phi0 = {3, 4, 0, 6, 7, 8, 9, 10}/Sqrt[355];
ns2 = Orthogonalize[NullSpace[{phi0}]];
ns2 = Join[{phi0}, ns2]
U = FullSimplify[
Plus @@ (Transpose[{#[[2]]}].{#[[1]]} & /@ Transpose[{ns1, ns2}])]

This is actually major overkill. It's good enough to find any unitaries $U_1$ such that $U_1|000\rangle=|\psi_0\rangle$ and $U_1|000\rangle=|\phi_0\rangle$ (which are relatively straightforward to construct) and then just run the circuit $U_1^\dagger U_2$. Indeed, this paper shows (and ultimately gives a construction) for how a unitary can be constructed using no more than 4 controlled-not gates!.

added 680 characters in body
Source Link
DaftWullie
  • 61.7k
  • 4
  • 51
  • 139

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.


To get the big unitary matrix, I used a piece of Mathematica code:

psi0 = {3, 4, 5, 6, 7, 8, 9, 10}/Sqrt[380];
ns1 = Orthogonalize[NullSpace[{psi0}]];
ns1 = Join[{psi0}, ns1]
phi0 = {3, 4, 0, 6, 7, 8, 9, 10}/Sqrt[355];
ns2 = Orthogonalize[NullSpace[{phi0}]];
ns2 = Join[{phi0}, ns2]
U = FullSimplify[
Plus @@ (Transpose[{#[[2]]}].{#[[1]]} & /@ Transpose[{ns1, ns2}])]

This is actually major overkill. It's good enough to find any unitaries $U_1$ such that $U_1|000\rangle=|\psi_0\rangle$ and $U_1|000\rangle=|\phi_0\rangle$ (which are relatively straightforward to construct) and then just run the circuit $U_1^\dagger U_2$.

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.


To get the big unitary matrix, I used a piece of Mathematica code:

psi0 = {3, 4, 5, 6, 7, 8, 9, 10}/Sqrt[380];
ns1 = Orthogonalize[NullSpace[{psi0}]];
ns1 = Join[{psi0}, ns1]
phi0 = {3, 4, 0, 6, 7, 8, 9, 10}/Sqrt[355];
ns2 = Orthogonalize[NullSpace[{phi0}]];
ns2 = Join[{phi0}, ns2]
U = FullSimplify[
Plus @@ (Transpose[{#[[2]]}].{#[[1]]} & /@ Transpose[{ns1, ns2}])]

This is actually major overkill. It's good enough to find any unitaries $U_1$ such that $U_1|000\rangle=|\psi_0\rangle$ and $U_1|000\rangle=|\phi_0\rangle$ (which are relatively straightforward to construct) and then just run the circuit $U_1^\dagger U_2$.

Source Link
DaftWullie
  • 61.7k
  • 4
  • 51
  • 139

You're using some unusual notation and terminology that don't entirely fit. I'm assuming you question is that you are starting from a state $$ |\psi\rangle=3|000\rangle+4|001\rangle+5|010\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{380} $$ and you want to convert it into $$ |\phi\rangle=3|000\rangle+4|001\rangle+6|011\rangle+7|100\rangle+8|101\rangle+9|110\rangle+10|111\rangle)/\sqrt{355}. $$ You have a vast range of options for how you might do this. By far the simplest is essentially the suggestion of TristanNemoz where you run a probabilistic protocol. In terms of a quantum circuit, this looks like enter image description here

and works provided the measurement gives the answer 0, which happens with probability $\frac{355}{380}=\frac{71}{76}$. The circuit is simple, and has the further advantage that you don't actually need to know what state $|\psi\rangle$ is, only the term that you want to knock out. The disadvantage, of course, is that it is probabilistic.

There certainly exist deterministic options, assuming that you know both $|\psi\rangle$ and $|\phi\rangle$. You just need to choose any unitary that satisfies $$ U|\psi\rangle=|\phi\rangle. $$ You have to complete its action on an orthonormal basis that includes $|\psi\rangle$, with the choice of what the corresponding output states are giving you a lot of freedom to potentially alter how easy/hard the unitary is to construct. Here is one such example (which I have no desire to decompose into gates!): $$ \left( \begin{array}{cccccccc} \frac{110}{113}+\frac{12 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{10 \sqrt{1349}} & \frac{2 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 4 \sqrt{\frac{3}{13871767}}+\frac{3}{2 \sqrt{1349}} & -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} \\ \frac{15}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{8+\sqrt{30849}}{5 \sqrt{1349}} & -\frac{\sqrt{30849}-182}{91 \sqrt{1349}} & \frac{30}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{\sqrt{30849}-182}{65 \sqrt{1349}} & \frac{40}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & \frac{45}{\sqrt{122759 \left(703+4 \sqrt{30849}\right)}} & -\frac{2 \left(\sqrt{30849}-182\right)}{91 \sqrt{1349}} \\ -\frac{5 \sqrt{\frac{3}{10283}}}{2} & 0 & \frac{\sqrt{\frac{339}{91}}}{2} & -5 \sqrt{\frac{3}{10283}} & -\frac{5 \sqrt{\frac{7}{4407}}}{2} & -\frac{20}{\sqrt{30849}} & -\frac{15 \sqrt{\frac{3}{10283}}}{2} & -\frac{25}{\sqrt{30849}} \\ -\frac{6}{113}+\frac{24 \sqrt{\frac{3}{13871767}}}{5}+\frac{9}{5 \sqrt{1349}} & \frac{4 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{101}{113}+\frac{48 \sqrt{\frac{3}{13871767}}}{5}+\frac{18}{5 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} \\ -\frac{7}{113}+\frac{4 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{10 \sqrt{1349}} & -\frac{70}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & 4 \sqrt{\frac{7}{5945043}}+\frac{7}{2 \sqrt{1349}} & -\frac{14}{113}+\frac{8 \sqrt{\frac{21}{1981681}}}{5}+\frac{21}{5 \sqrt{1349}} & \frac{290}{339}+\frac{28 \sqrt{\frac{7}{5945043}}}{5}+\frac{49}{10 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} \\ -\frac{8}{113}+\frac{32 \sqrt{\frac{3}{13871767}}}{5}+\frac{12}{5 \sqrt{1349}} & -\frac{80}{\sqrt{457311 \left(703+4 \sqrt{30849}\right)}} & \frac{4}{\sqrt{1349}}+\frac{32}{\sqrt{41615301}} & -\frac{16}{113}+\frac{64 \sqrt{\frac{3}{13871767}}}{5}+\frac{24}{5 \sqrt{1349}} & -\frac{56}{339}+\frac{32 \sqrt{\frac{7}{5945043}}}{5}+\frac{28}{5 \sqrt{1349}} & \frac{275}{339}+\frac{32}{5 \sqrt{1349}}+\frac{256}{5 \sqrt{41615301}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} \\ -\frac{9}{113}+\frac{36 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{10 \sqrt{1349}} & \frac{6 \left(339-2 \sqrt{30849}\right)}{565 \sqrt{1349}} & 12 \sqrt{\frac{3}{13871767}}+\frac{9}{2 \sqrt{1349}} & -\frac{18}{113}+\frac{72 \sqrt{\frac{3}{13871767}}}{5}+\frac{27}{5 \sqrt{1349}} & -\frac{21}{113}+\frac{12 \sqrt{\frac{21}{1981681}}}{5}+\frac{63}{10 \sqrt{1349}} & -\frac{24}{113}+\frac{96 \sqrt{\frac{3}{13871767}}}{5}+\frac{36}{5 \sqrt{1349}} & \frac{86}{113}+\frac{108 \sqrt{\frac{3}{13871767}}}{5}+\frac{81}{10 \sqrt{1349}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} \\ -\frac{10}{113}+8 \sqrt{\frac{3}{13871767}}+\frac{3}{\sqrt{1349}} & \frac{4}{\sqrt{1349}}-8 \sqrt{\frac{91}{457311}} & \frac{5}{\sqrt{1349}}+\frac{40}{\sqrt{41615301}} & -\frac{20}{113}+16 \sqrt{\frac{3}{13871767}}+\frac{6}{\sqrt{1349}} & -\frac{70}{339}+8 \sqrt{\frac{7}{5945043}}+\frac{7}{\sqrt{1349}} & -\frac{80}{339}+\frac{8}{\sqrt{1349}}+\frac{64}{\sqrt{41615301}} & -\frac{30}{113}+24 \sqrt{\frac{3}{13871767}}+\frac{9}{\sqrt{1349}} & \frac{239}{339}+\frac{10}{\sqrt{1349}}+\frac{80}{\sqrt{41615301}} \\ \end{array} \right) $$

Finally, another method that you could consider if you wanted something deterministic, but you didn't know $|\psi\rangle$ is amplitude amplification, but I suspect that's going beyond the scope of what you want.