Skip to content

Automatic estimation of overhead in memory/compute architecture#2760

Merged
billti merged 6 commits intomainfrom
msoeken/memory-compute
Oct 30, 2025
Merged

Automatic estimation of overhead in memory/compute architecture#2760
billti merged 6 commits intomainfrom
msoeken/memory-compute

Conversation

@msoeken
Copy link
Member

@msoeken msoeken commented Oct 29, 2025

This adds a RE intrinsic called EnableMemoryComputeArchitecture that emulates a compute/memory architecture with compute qubits that can be operated on with logical operations and memory qubits that can be turned into compute qubits in order to compute on them. The intrinsic takes as parameter an upper bound k on the number of compute qubits. The first k qubits are assumed to be compute qubits from the start. However, when an operation is applied to a qubit that is not a compute qubit and there is no more space for compute qubits, one needs to evict a compute qubit and move it into memory. Similarly, if the qubit to be acted on is in memory, it has to be moved into the compute qubit space. The logical resource counter counts the number of times a qubit is read from memory and written to memory. Further, one can specify an eviction strategy (either LeastRecentlyUsed that evicts a compute qubit that has been used least recently or LeastFrequentlyUsed that evicts a compute qubit that has been used least frequently).

…ce estimation that qubits are partitioned into memory and compute qubits.

Based on the capacity of the compute qubits, resource estimation will track the number of READ and WRITE operations into the memory qubits based on eviction strategies for the compute qubits (LRU and LFU).
@github-actions
Copy link

Change in memory usage detected by benchmark.

Memory Report for 64d99c5

Test This Branch On Main Difference
compile core + standard lib 24745010 bytes 24729454 bytes 15556 bytes

@github-actions
Copy link

Change in memory usage detected by benchmark.

Memory Report for 24ffa8e

Test This Branch On Main Difference
compile core + standard lib 24745010 bytes 24729454 bytes 15556 bytes

@msoeken msoeken added this pull request to the merge queue Oct 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2025
@msoeken msoeken added this pull request to the merge queue Oct 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 30, 2025
@billti billti merged commit ed058db into main Oct 30, 2025
89 of 102 checks passed
@billti billti deleted the msoeken/memory-compute branch October 30, 2025 23:13
billti pushed a commit that referenced this pull request Nov 14, 2025
This adds a RE intrinsic called `EnableMemoryComputeArchitecture` that
emulates a compute/memory architecture with _compute qubits_ that can be
operated on with logical operations and _memory qubits_ that can be
turned into compute qubits in order to compute on them. The intrinsic
takes as parameter an upper bound `k` on the number of compute qubits.
The first `k` qubits are assumed to be compute qubits from the start.
However, when an operation is applied to a qubit that is not a compute
qubit and there is no more space for compute qubits, one needs to evict
a compute qubit and move it into memory. Similarly, if the qubit to be
acted on is in memory, it has to be moved into the compute qubit space.
The logical resource counter counts the number of times a qubit is read
from memory and written to memory. Further, one can specify an eviction
strategy (either `LeastRecentlyUsed` that evicts a compute qubit that
has been used least recently or `LeastFrequentlyUsed` that evicts a
compute qubit that has been used least frequently).
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.

4 participants