Skip to content

Optimize PreparePureStateD#3048

Open
swernli wants to merge 1 commit intomainfrom
swernli/optimize-state-prep
Open

Optimize PreparePureStateD#3048
swernli wants to merge 1 commit intomainfrom
swernli/optimize-state-prep

Conversation

@swernli
Copy link
Copy Markdown
Collaborator

@swernli swernli commented Mar 23, 2026

This change introduces different structure for Std.StatePreparation.PreparePureStateD and underlying helper functions, which reduces the compile time by offloading more of the classical compute into static functions run on the full evaluator rather than handled inside the partial-evaluation layer.

In local testing, this improved QIR compilation of a large state preparation on 16 qubits from 14 seconds to 4 seconds.

This change introduces different structure for `Std.StatePreparation.PreparePureStateD` and underlying helper functions, which reduces the compile time by offloading more of the classical compute into static functions run on the full evaluator rather than handled inside the partial-evaluation layer.
@fedimser fedimser self-assigned this Mar 30, 2026
@swernli swernli marked this pull request as ready for review March 31, 2026 22:05
@swernli swernli requested a review from orpuente-MS as a code owner March 31, 2026 22:05
@swernli swernli requested a review from fedimser March 31, 2026 22:06
@github-actions
Copy link
Copy Markdown

Change in memory usage detected by benchmark.

Memory Report for a5fb96c

Test This Branch On Main Difference
compile core + standard lib 24572242 bytes 24250814 bytes 321428 bytes

@fedimser fedimser changed the title Optmizie PreparePureStateD Optimize PreparePureStateD Mar 31, 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