Skip to content

Instance and trace parameters for CirqApplication#3290

Open
msoeken wants to merge 1 commit into
mainfrom
msoeken/cirq-interop
Open

Instance and trace parameters for CirqApplication#3290
msoeken wants to merge 1 commit into
mainfrom
msoeken/cirq-interop

Conversation

@msoeken

@msoeken msoeken commented Jun 4, 2026

Copy link
Copy Markdown
Member

This allows to pass all parameters to trace_from_cirq from a CirqApplication. Before this was only possible for classical_control_probability.

classical_control_probability is an instance parameter, as well as rotation_threshold. The remaining parameter track_memory_qubits is a hyper parameter for resource estimation exploration.

For now track_memory_qubits only iterates of [True], thereby not changing any of the current resource estimation tasks. We need better control of the trace such that we can skip enumerating over both truth values in case there are no memory qubits in the input circuit. To enable passing False or both values one can call .q on the app and extend the trace query, e.g.:

app = CirqApplication(circuit, classical_control_probability=..., rotation_threshold=...)
trace_query = app.q(track_memory_qubits=[True, False]) * PSSPC.q() * ...


circuit_or_qasm: str | cirq.CIRCUIT_LIKE
classical_control_probability: float = 0.5
rotation_threshold: float = 1e-6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this sufficient? I would think this should be tied to the rotation synthesis error rate (although that is computed lower in the stack).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants