Skip to content

Various RE models and some API enhancements#2963

Merged
msoeken merged 3 commits intofeature/qrefrom
msoeken/models
Feb 25, 2026
Merged

Various RE models and some API enhancements#2963
msoeken merged 3 commits intofeature/qrefrom
msoeken/models

Conversation

@msoeken
Copy link
Copy Markdown
Member

@msoeken msoeken commented Feb 19, 2026

This PR adds various models:

  • Qubits
    • Majorana
  • Error correcting codes
    • ThreeAux
    • Yoked surface code
  • Factories
    • Round-based factory
    • Litinski19 factory

It also makes some updates to the surface code model and improves documentation. Further, it adds a large test suite for all the models. Some of these tests are very detailed but they will help us to spot if we introduce inconsistencies with future code changes.

Besides that there are some fixes to the Python API:

  • Adds caching to Q# to Trace transformation
  • InstructionFrontier can be 2D or 3D (without and with error rates)
  • Instance enumeration can also consider nested types and union types now
  • EstimationResult can be used from the Python API to create new results

)


class MagicUpToClifford(ISATransform):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hmmm.... This is essentially type coersion. It's not clear that we want push type coersion out to each component. Since we're only looking at T and CCZ at this point, this is not too cumbersome. But I can see things getting out of control quickly. An alternative would be do define a type for T_LIKE and CCZ_LIKE, and set the fectories for providing these types, and then do coersion as we have done with (for instance) ONE_QUBIT_UNITARY.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think there is a difference between coercion, where we can say that T is a ONE_QUBIT_UNITARY, and this case. Here we say, e.g., that we want to use CCZ magic state factories to produce CCX magic states required by our algorithm, and explicitly mark that we assume that turning the CCZ magic state factory into a CCX factory would have the same cost.

@msoeken msoeken merged commit 511c953 into feature/qre Feb 25, 2026
47 of 57 checks passed
@msoeken msoeken deleted the msoeken/models branch February 25, 2026 13:13
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.

2 participants