Skip to content

core: add quantum operation attribute superclasses - #64

Open
alexarice wants to merge 2 commits into
mainfrom
alexarice/instrument
Open

core: add quantum operation attribute superclasses#64
alexarice wants to merge 2 commits into
mainfrom
alexarice/instrument

Conversation

@alexarice

Copy link
Copy Markdown
Contributor

Prototype for new "gate" superclass. Idea is to capture

  • Quantum gates
  • Measurements
  • Parametrised things

all in one class.

I'm not really sure if there's a way to test it until adding some gates.

@alexarice
alexarice requested a review from kimworrall July 27, 2026 10:15
@alexarice alexarice self-assigned this Jul 27, 2026
@alexarice alexarice added the core xDSL core (ir, textual format, ...) label Jul 27, 2026

@kimworrall kimworrall left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Seems sensible. Added some nitpicks to the documentation to make it clearer.

Comment thread src/xdsl_quantum/quantum_operation.py Outdated
Comment thread src/xdsl_quantum/quantum_operation.py Outdated
Comment thread src/xdsl_quantum/quantum_operation.py Outdated
Comment thread src/xdsl_quantum/quantum_operation.py Outdated
@kimworrall

Copy link
Copy Markdown

Before we go ahead I'd like to test some different examples.
I think the best to start with is a parameterised unitary and gate parameterised measurement.

Comment thread src/xdsl_quantum/quantum_operation.py Outdated
@alexarice

Copy link
Copy Markdown
Contributor Author

Before we go ahead I'd like to test some different examples. I think the best to start with is a parameterised unitary and gate parameterised measurement.

I don't understand this comment, but no rush on this

@alexarice

Copy link
Copy Markdown
Contributor Author

I'd like to be able to eventually capture:

  • Gates
  • Angle parametrised gates
  • Classically conditioned gates
  • Combinators to allow adding classical conditioning or quantum conditioning to a gate
  • PVMs
  • Stabiliser measurements (i.e. measurement of Pauli strings)

The current system can do that, and I thought this is what we converged to on the board, but happy to head alternatives.

@alexarice

Copy link
Copy Markdown
Contributor Author

I'll also reformat once we're done with small changes

@alexarice
alexarice force-pushed the alexarice/instrument branch from 5f3cc61 to f2a224f Compare July 31, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core xDSL core (ir, textual format, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants