Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classical control #149

Open
95-martin-orion opened this issue Jul 10, 2020 · 1 comment
Open

Classical control #149

95-martin-orion opened this issue Jul 10, 2020 · 1 comment

Comments

@95-martin-orion
Copy link
Collaborator

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 Add measurement gate. #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 95-martin-orion added this to the Trajectory simulation milestone Jul 10, 2020
@daxfohl
Copy link

daxfohl commented Nov 22, 2021

xref quantumlib/Cirq#4631, the classical control PR for Cirq.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants