Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions specgen/spec/sec-measurement.s
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
@section[:title "Measurement"]

@p{Measurement is the only way in which the quantum state can affect
classical memory. Measurement comes in two flavors:
classical memory. Measurement comes in two flavors:
@emph{measurement-for-effect} and @emph{measurement-for-record}.}

@syntax[:name "Measurement Instruction"]{
@ms{Measurement for Effect}
@alt @ms{Measurement for Record}
}

@aside{If @link[:target "#12Annex-T--Pulse-Level-Control"]{Annex T (§12)},
the Quil-T extension to this specification, is in effect, then measurements are
extended to support @emph{measurement names}, such as @c{MEASURE!midcircuit},
which affect the physical realization of measurement. See
@link[:target "#12-1Extensions-to-Quil"]{§12.1} for details.}

@p{Measurement-for-effect measures a single qubit and discards the
result.}

Expand All @@ -15,21 +26,17 @@ result.}
zero-state or the one-state depending on its probability of such
dictated by the wavefunction amplitudes.}

@p{@emph{Measurement-for-record} is the same as measurement-for-effect, but also
writes the resulting state to the classical memory of the QAM:}

@syntax[:name "Measurement for Record"]{
MEASURE @ms{Formal Qubit} @ms{Memory Reference}
}

@p{Here, the memory reference must be either of type @c{BIT} or
@c{INTEGER}. In either case, a @m{0} is deposited at the memory
@c{INTEGER}. In either case, a @m{0} is deposited at the referenced memory
location if the qubit was measured to be in the zero-state, and a
@m{1} otherwise.}

@p{These measurement varieties make up all measurement instructions.}

@syntax[:name "Measurement Instruction"]{
@ms{Measurement for Effect}
@alt @ms{Measurement for Record}
}
@m{1} is deposited there otherwise.}

@p{Note that there is no way in Quil to measure all qubits
simultaneously.}
Loading