-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
breakingbreaking changes or proposed changes that would break existing APIsbreaking changes or proposed changes that would break existing APIsenhancementNew feature or requestNew feature or requestrfcRequest for CommentsRequest for Commentssquinsquin related issuessquin related issues
Milestone
Description
The Measure statement is not very compatible with stim or QASM2
from stim there are
PPMeasure(p: float, pauli_string) -> bool: measure on a Pauli string as basis by a given probability- measure
XXYYon 4 qubits resulting a boolean value pis the probablity of-> boolbeing flipped- MZZ, etc.
- measure
Measure(basis, position, p: float) -> bool
from QASM2 there are
Measure(qreg, creg)
We introduce the following statement to model all the above
# in wire
class Measure:
basis: ir.SSAValue = info.argument(OpType)
wires: tuple[ir.SSAValue, ...] = info.argument(Wire)
prob: ir.SSAValue = info.argument(Union[Float, NoneType])# in qubit
class Measure:
basis: ir.SSAValue = info.argument(OpType)
qubits: ir.SSAValue = info.argument(IListType[Qubit, ...])
prob: ir.SSAValue = info.argument(Union[Float, NoneType])parallel {
%1 = Measure(basis, (%wire_1, %wire_2), p=None) -> bool
%2 = Measure(basis, (%wire_3, %wire_4), p=None) -> bool
}cc: @kaihsin @johnzl-777
Metadata
Metadata
Assignees
Labels
breakingbreaking changes or proposed changes that would break existing APIsbreaking changes or proposed changes that would break existing APIsenhancementNew feature or requestNew feature or requestrfcRequest for CommentsRequest for Commentssquinsquin related issuessquin related issues