rigetti / rigetti/qcs-sdk-rust

We should use `quil-rs` `MemoryReference` if the `index` field becomes a `usize`

Open
#224 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
15
Forks
4
Avg merge
1h 9m
Merged PRs (30d)
1

Description

The quil_rs::instruction::MemoryReference has an index field that uses u64. We parse these memory references when we build a ReadoutMap but we need a usize for the containers we use for ReadoutMap. The workaround was to create a copy of the MemoryReference struct that uses usize for it's index.

There is justification for using u64 for the index in quil-rs, but there is some debate about whether quil-rs should be handling truncation to usize itself. If that happens, we should pull in the changes to this SDK so we don't have to maintain a copy of the quil-rs struct.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked qcs-sdk-rust pull request diff and the referenced quil-rs discussion first. This is actionable only after quil-rs changes its MemoryReference index handling; done means updating the SDK dependency and using quil-rs's MemoryReference instead of maintaining a local copy.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.