qsim icon indicating copy to clipboard operation
qsim copied to clipboard

Classical control

Open 95-martin-orion opened this issue 5 years ago • 4 comments

In order to represent quantum teleportation, error correction, and other algorithms, qsim must support classical control. There are three key parts to this feature:

  1. Classical registers: qsim must be able to track classical variables alongside the quantum state. These integer variables include measurement output (added in #141), user-specified input, and calculated values.
  2. Classical operators: qsim must have a framework for applying arithmetic functions to classical registers and storing the result in a target register. This framework should accept user-specified functions - the operators need not be defined in qsim itself.
  3. Classical control: qsim must allow classical registers to control quantum gates. A "switch" operation is sufficient for this (given an input value, and a (case, gate) mapping, apply the gate whose case matches the input, if one exists).

95-martin-orion avatar Jul 10 '20 16:07 95-martin-orion

xref https://github.com/quantumlib/Cirq/pull/4631, the classical control PR for Cirq.

daxfohl avatar Nov 22 '21 20:11 daxfohl