Skip to content

Circuit diagrams: handle integer comparisons, add SX gate#2982

Merged
minestarks merged 2 commits intomainfrom
minestarks/circuit-small-fixes
Feb 28, 2026
Merged

Circuit diagrams: handle integer comparisons, add SX gate#2982
minestarks merged 2 commits intomainfrom
minestarks/circuit-small-fixes

Conversation

@minestarks
Copy link
Copy Markdown
Member

@minestarks minestarks commented Feb 27, 2026

  • add the SX gate to the supported primitives
  • handle comparison operators more gracefully.
image

from:

operation Main() : Result {
    use q = Qubit();
    use reg = Qubit[4];
 
    ApplyToEach(H, reg);
    let num = MeasureInteger(reg);
 
    if num < 8 {
        X(q);
    } else {
        Z(q);
    }
 
    ResetAll(reg);
    MResetZ(q)
}

@minestarks minestarks enabled auto-merge February 27, 2026 23:47
@minestarks minestarks added this pull request to the merge queue Feb 27, 2026
Merged via the queue into main with commit 4623b9b Feb 28, 2026
12 checks passed
@minestarks minestarks deleted the minestarks/circuit-small-fixes branch February 28, 2026 00:03
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