Skip to content

RFC: Add friction to accessing annotateΒ #616

@johnzl-777

Description

@johnzl-777

Currently you can access the annotate dialect via the squin module directly:

@squin.kernel
def demo():
	qs = squin.qalloc(4)
	ms = squin.broadcast.measure(qs)

	squin.set_detector([ms[0], ms[1]], coordinates=(0,0)

While this is great in terms of convenience @david-pl brought up here (#603 (review)) that it's not clearly defined what the user expectation should be if they feed a program with annotation present to other interpreters/emitters for things like PyQrack/Cirq.

@kaihsin pitched this to me in person (and I'm putting it in RFC from to see if there's any reservations about this) that annotate should be something that users would have to explicitly import as opposed to access directly from squin:

from bloqade import annotate

@squin.kernel
def demo(): 

	qs = squin.qalloc(4)
	ms = squin.broadcast_measure(qs)

	annotate.set_detector([ms[0], ms[1]], coordinates=(0,0))

This would be pretty easy to do, I just don't route things through squin but preserve the current squin dialect group definition.

Metadata

Metadata

Assignees

Labels

rfcRequest for Commentssquinsquin related issuesstimIssues regarding the stim dialect

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions