Skip to content

Allow passing stim.PauliString targets to stim.circuit.append#907

Merged
Strilanc merged 3 commits intomainfrom
clifford_string
Mar 24, 2025
Merged

Allow passing stim.PauliString targets to stim.circuit.append#907
Strilanc merged 3 commits intomainfrom
clifford_string

Conversation

@Strilanc
Copy link
Copy Markdown
Collaborator

@Strilanc Strilanc commented Mar 22, 2025

  • stim.circuit.append now accepts stim.PauliString targets, which are auto-flattened into pauli targets and combiner targets
  • Split the circuit.pybind.cc file into two files, so it takes less time to build when editing it

Allows writing

circuit.append("MPP", stim.PauliString("X1*Y2*Z3"))

instead of

circuit.append("MPP", stim.target_combined_paulis(stim.PauliString("X1*Y2*Z3")))

Fixes #906

- `stim.circuit.append` now accepts `stim.PauliString` targets, which are auto-flattened into pauli targets and combiner targets
- Split the `circuit.pybind.cc` file into two files, so it takes less time to build when editing it
@Strilanc Strilanc merged commit 5f96aba into main Mar 24, 2025
61 checks passed
@Strilanc Strilanc deleted the clifford_string branch March 24, 2025 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make stim.Circuit.append accept and auto-flatten stim.PauliString arguments

1 participant