Why are S wires the only ones not measured ? #47
-
Hello lambeq dev team, which maps to the following quantum circuit (here I allocated 2 qubits instead of 1 for the S wire) From what I see, S is the only wire without an effect (first image) / measurement (second image). However, in my mind, S wires contained all the information and even the size of the measured vector depended on it. I don't get why those are, on the contrary, the only one not measured. Also, I see we do here 16 - 2 measurements, how can the output vector be of size |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi there, yes, the effects that you can see in the first image are post-selections. Imagine a 3-qubit system where we post-select on the |0> state of the second and third wire. If the first wire is supposed to carry information of our sentence encoding, we basically say that it is only a valid encoding if we record |x00> in our measurment (not measuring the first qubit). If the post-selection was successful, we are left with a one-qubit system, hence the open wire. It is now up to the user to decide what to do with it. You could for example plug it into a another box that takes an s-wire, or you can read out the state vector of the remaining qubit by performing quantum tomography or other read-out methods. You can also imagine post-selection as deleting all entries in the state-vector of the system that do not correspond to the desired outcome. By default, the I hope that helps. |
Beta Was this translation helpful? Give feedback.
-
The
However, if you provide a backend (e.g. the qiskit AER simulator), it will run a shot-based simulation and return the measurement probabilities.
(it's a bit weird that the return type of the shot-based simulation is complex, I'll look into this) |
Beta Was this translation helpful? Give feedback.
Hi there,
yes, the effects that you can see in the first image are post-selections. Imagine a 3-qubit system where we post-select on the |0> state of the second and third wire. If the first wire is supposed to carry information of our sentence encoding, we basically say that it is only a valid encoding if we record |x00> in our measurment (not measuring the first qubit).
If the post-selection was successful, we are left with a one-qubit system, hence the open wire. It is now up to the user to decide what to do with it. You could for example plug it into a another box that takes an s-wire, or you can read out the state vector of the remaining qubit by performing quantum tomography or other…