-
Notifications
You must be signed in to change notification settings - Fork 0
RFC: refactoring measurement #158
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
Comments
Is |
How about PPMeasure? This issue also try to unify them together |
yes, the
I think this makes sense to me, this is due to a noise channel. I'm actually wondering what are the corresponding noise operator for a |
I guess this should an optimization pass on the Stim level?
…On Tue, Apr 15, 2025, 14:52 Casey Duckering ***@***.***> wrote:
Neutral atoms don't directly measure Pauli products so there is no direct
noise model. You have to decompose it into a circuit with an additional
ancilla. Measuring the Pauli string X1Y2Z3:
Screenshot.2025-04-15.at.14.50.44.png (view on web)
<https://github.com/user-attachments/assets/71fe5432-592f-4d3e-b1d3-efb8de5d185f>
The noise depends on how you execute this circuit so I don't think
including a "probability" argument at this IR level makes any sense.
—
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCX3SKUCMQIFV6FVZS5VZ32ZVIOXAVCNFSM6AAAAAB3GKYBD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXGE3TGOJYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*cduck* left a comment (QuEraComputing/bloqade-circuit#158)
<#158 (comment)>
Neutral atoms don't directly measure Pauli products so there is no direct
noise model. You have to decompose it into a circuit with an additional
ancilla. Measuring the Pauli string X1Y2Z3:
Screenshot.2025-04-15.at.14.50.44.png (view on web)
<https://github.com/user-attachments/assets/71fe5432-592f-4d3e-b1d3-efb8de5d185f>
The noise depends on how you execute this circuit so I don't think
including a "probability" argument at this IR level makes any sense.
—
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCX3SKUCMQIFV6FVZS5VZ32ZVIOXAVCNFSM6AAAAAB3GKYBD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXGE3TGOJYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I don't think we have much use for a squin.PPMeasure instruction so is it OK for squin to not 1-to-1 map to stim? And noise can be a separate noise_op dialect that is compatible with squin and can be added by a noise estimation pass. |
I see. So your suggestion is to remove probability (noisy measurement)
completely at squin level Measurement
…On Tue, Apr 15, 2025, 15:13 Casey Duckering ***@***.***> wrote:
I don't think we have much use for a squin.PPMeasure instruction so is it
OK for squin to not 1-to-1 map to stim? And noise can be a separate
noise_op dialect that is compatible with squin and can be added by a noise
estimation pass.
—
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCX3SMXCEOROZWJYWFDRMD2ZVK4VAVCNFSM6AAAAAB3GKYBD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXGIZDOOJSGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*cduck* left a comment (QuEraComputing/bloqade-circuit#158)
<#158 (comment)>
I don't think we have much use for a squin.PPMeasure instruction so is it
OK for squin to not 1-to-1 map to stim? And noise can be a separate
noise_op dialect that is compatible with squin and can be added by a noise
estimation pass.
—
Reply to this email directly, view it on GitHub
<#158 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFCX3SMXCEOROZWJYWFDRMD2ZVK4VAVCNFSM6AAAAAB3GKYBD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBXGIZDOOJSGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I agree that we should decouple the noise from the measurement. Even semantically, it seems redundant. |
Agreed with Casey's comment above - physically, noise should be separate, and we don't have native multi-body measurements. In QEC research, the main place we make use of the MPP command is when defining a logical observable, consisting of the product of physical Pauli operators on a bunch of sites, but this can be done in post-processing as well so is not a required functionality. |
Sounds like a 4 yeses! Let's do it. |
Okay so just to make concrete what I understand here and what should be implemented:
Thus, with some minor modification the new Measure statements (piggybacking off of @Roger-luo 's initial proposal) are now just: # in wire
class Measure:
basis: ir.SSAValue = info.argument(OpType)
wires: tuple[ir.SSAValue, ...] = info.argument(Wire) # in qubit
class Measure:
basis: ir.SSAValue = info.argument(OpType)
qubits: ir.SSAValue = info.argument(IListType[Qubit, ...]) Now one thing I would want to make clear here is in the following: parallel {
%1 = Measure(basis, (%wire_1, %wire_2), p=None) -> bool
%2 = Measure(basis, (%wire_3, %wire_4), p=None) -> bool
} I assume the |
you missed the return value of measure in the its definition. I think the return value should be list of bool, not bool. For parallel
|
I thought we were going to remove parallel? If you have measurements that can happen in parallel just merge the arguments? |
that's right. We are adding a broadcast/repeat in the operator language. |
From a meeting with myself, @david-pl , @Roger-luo , and @weinbe58 the syntax for
@weinbe58 has asked me to prioritize working on #179 and the (immediately) necessary sub-issues so I'll hand the reigns over to him on this issue 👍 |
Also want to point out that as of now, |
The
Measure
statement is not very compatible withstim
or QASM2from stim there are
PPMeasure(p: float, pauli_string) -> bool
: measure on a Pauli string as basis by a given probabilityXXYY
on 4 qubits resulting a boolean valuep
is the probablity of-> bool
being flippedMeasure(basis, position, p: float) -> bool
from QASM2 there are
Measure(qreg, creg)
We introduce the following statement to model all the above
cc: @kaihsin @johnzl-777
The text was updated successfully, but these errors were encountered: