2
$\begingroup$

Quantum computing simulators like qasm_simulator in Qiskit Aer have a function to simulate quantum measurements (for example, the command of execute in case of qasm_simulator). In quantum computing simulators, unlike real quantum computers, the values of the quantum amplitude are already known (to simulators), so I think that there is no need to simulate the process of measurement. I think it would be more efficient to simply inform users of several high-amplitude quantum states rather than to employ the sampling method so that they get the measurement results. (We get the almost same outcomes by the both ways, which is guaranteed by the law of large numbers!)

What is the significance of simulating the process of measurement in quantum computing simulators?

$\endgroup$
1
  • $\begingroup$ My guess is that if we want to make a quantum computing simulator that runs faster and more efficiently, we don't need to simulate the measurements. $\endgroup$
    – KhField
    Jan 5, 2023 at 3:02

4 Answers 4

7
$\begingroup$

This is a bit like asking why flight simulators force you to land the plane. Why not just teleport the plane to the ground with the push of a button? After all, the simulator isn't bound by the rules of physics, and landing by magic unphysical teleportation would be much safer and faster than the normal type of landing.

Basically, you are assuming the only purpose of a simulator is to solve the simulated problem. But actually, it's far more common for simulators to be used as training to prepare for using the real thing or as a stand-in to understand the behavior of the real thing. For those kinds of tasks, giving magical unphysical access to the underlying wavefunction can completely defeat the purpose.

$\endgroup$
2
$\begingroup$

You are right: in quantum computing simulators, unlike real quantum computers, the values of the statevector amplitudes are known. However, quantum computing SDKs (like Qiskit) usually provide the user with the possibility to simulate the probabilistic measurement process as well. There could be many reasons for this to be useful, in general we can say that it can help for comparing the results coming from simulations and real hardware executions.

If you want to access directly the full final statevector of a given quantum circuit (without performing any kind of measure), Qiskit provides the class qiskit.quantum_info.Statevector.

from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
from qiskit.visualization import array_to_latex
    
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
    
sv = Statevector(qc)
array_to_latex(sv)

\begin{bmatrix} \frac{1}{\sqrt{2}} & 0 & 0 & \frac{1}{\sqrt{2}} \end{bmatrix}

$\endgroup$
0
1
$\begingroup$

Adding to the previous answers:

  1. I'm not sure if your question applies to circuits with mid-measurements or noise. In this case the equivalent to your suggestion is probably to return the highest entries in the diagonal of the density matrix. But this enforces the simulator to work with a data structure that maintains the entire density matrix all the time, which is demanding in terms of memory (rather than use trajectories).
  2. Not all simulators work with wave functions: stabilizer simulators, tensor-network simulators, MPS simulators, Clifford+T simulators, and more.
$\endgroup$
0
$\begingroup$

I think the point of almost any quantum behaviour is to then witness how it affects our observations; the world we can see let's say.

Without observing the quantum evolution, this is actually an end in itself.

You may want to preserve a system to be in a quantum state on simulations, and you can definitely do that, without measuring.

But this has not much sense when your goal is to simulate something before stepping to real applications, which necessary comes with measurements, as this is our only way to understand what happened.

As for the metaphor of flight simulator from Craig's answer, the purpose of simulating is a step before getting to the real world, where you need to measure/land.

$\endgroup$

Your Answer

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

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