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

Measurement and Classical Data #445

Open
mpharrigan opened this issue Oct 25, 2023 · 0 comments
Open

Measurement and Classical Data #445

mpharrigan opened this issue Oct 25, 2023 · 0 comments
Labels
Milestone

Comments

@mpharrigan
Copy link
Collaborator

mpharrigan commented Oct 25, 2023

We need a measurement bloq. Measure-and-throw-out-the-result can be simulated by CNOTing to a measure qubit and then tracing it out (xref quantum channels roadmap item).

When we measure and keep the result, we want the result to be available in the compute graph for further processing or conditioning other gates on it. Measuring and keeping the result can be codified by CNOTing to a fresh register. This is a new type of register: a classical data register. From a simulation and tensor contraction standpoint it behaves identically to a new qubit. The restriction comes from the fact that we can only apply classical-logic bloqs to it. I.e.: all gates must be hadamard-free. Classical data can be copied and deleted but that’s just CNOT and tracing out, respectively.

The way measurements are used in Cirq is with a stochastic simulator and statistics are gathered by running the simulation many times. This must correspond to cutting or projecting your tensor network stochastically. Before we try to support this NISQy view of measurement, I would like to have a very clear idea of why we’re using it. Presumably we use these simulation techniques to write unit tests. The full everettian simulation of classical feedback could get too expensive and projecting the classical wires to specific values could let us “fuzz test” non-exhaustively. But if we’re projecting those things out for performance reasons; why wouldn’t we also project out qubits as well?

The "classical" data type would likely be implemented using data types: #446

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

No branches or pull requests

1 participant