Skip to content

Optimize trace_product for non-translationally symmetric operators#218

Closed
swiatlowemnie333 wants to merge 1 commit into
QPauLie:mainfrom
swiatlowemnie333:main
Closed

Optimize trace_product for non-translationally symmetric operators#218
swiatlowemnie333 wants to merge 1 commit into
QPauLie:mainfrom
swiatlowemnie333:main

Conversation

@swiatlowemnie333

Copy link
Copy Markdown

This PR introduces an analytical short-circuit path in trace_product for operators whose core consists of 2 or 3 mutually anticommuting Pauli strings.

Instead of scaling exponentially with full matrix powers via squaring, the trace is evaluated directly using the coefficient norms. Translationally symmetric operators (Operator{<:PauliStringTS}) are explicitly bypassed to preserve standard spatial shift logic.

All local test suites pass successfully. Fixes the performance bottleneck for these specific structures.

@Newtech66

Copy link
Copy Markdown
Collaborator

Hi @swiatlowemnie333, I believe you've submitted your PR to the wrong repository, so I'm closing this.

@Newtech66 Newtech66 closed this Jun 10, 2026
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