You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That evaluates to $$1/2$$, which is technically correct as state 1 is equal to a zero state with a $$1/\sqrt{2}$$ scalar factor due to the post-selection. However, one would naturally expect the inner product between a zero state and a plus state to be $$1/\sqrt{2}$$. The issue here is that state 1 is not normalised due to the post-selection.
There are circumstances where you would want to compute the inner product between normalised states even if there were post-selected qubits. One example is computing similarity between two sentences, using the inner product between their DisCoCat circuits. This behaviour means that the use of RemoveCupsRewriter would potentially alters the evaluation of an inner product diagram by removing post-selection qubits.
Ideas
It could be helpful to have a mechanism that tracks the (post-selected) Bra's from state 1. The evaluation of the diagram should be normalised by the post-selected Bra's from state 1.
In the above example, the left Bra is post-selected. The corrected evaluation should be $$1/2$$ normalised by the post-selection success fraction $$1/\sqrt{2}$$, resulting in the desired result ($$1/\sqrt{2}$$) as the inner product between a zero state and a plus state.
The text was updated successfully, but these errors were encountered:
Problem
Computing the inner product between two circuits with post-selection gives surprising results.
Minimal working example
Consider the following two states:
2. (state 2) the plus state:
The inner product should be computed by composing state 1 and the dagger of state 2:
That evaluates to$$1/2$$ , which is technically correct as state 1 is equal to a zero state with a $$1/\sqrt{2}$$ scalar factor due to the post-selection. However, one would naturally expect the inner product between a zero state and a plus state to be $$1/\sqrt{2}$$ . The issue here is that state 1 is not normalised due to the post-selection.
There are circumstances where you would want to compute the inner product between normalised states even if there were post-selected qubits. One example is computing similarity between two sentences, using the inner product between their DisCoCat circuits. This behaviour means that the use of
RemoveCupsRewriter
would potentially alters the evaluation of an inner product diagram by removing post-selection qubits.Ideas
It could be helpful to have a mechanism that tracks the (post-selected) Bra's from state 1. The evaluation of the diagram should be normalised by the post-selected Bra's from state 1.
In the above example, the left Bra is post-selected. The corrected evaluation should be$$1/2$$ normalised by the post-selection success fraction $$1/\sqrt{2}$$ , resulting in the desired result ($$1/\sqrt{2}$$ ) as the inner product between a zero state and a plus state.
The text was updated successfully, but these errors were encountered: