rigetti / rigetti/pyquil

Parametric program apparent difference between QVM and QPU

Open
#964 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug :bug: help wanted :wave:
Dominant language
Python
Stars
1.5k
Forks
358
Avg merge
1d 58m
Merged PRs (30d)
4

Description

I am able to run a parametric program on a QVM where I assign the parameter the integer value 0; however, when running the same code on a QPU I get
RPCError: Parameter was declared as a float but its value was 0.
Casting the 0 to a float fixes the problem so that it runs on both QVM and QPU.

It would be nice if the QVM and QPU matched behavior in the first instance.

Contributor guide

Open the contributing guide

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

Start by reproducing the parametric program with an integer value of 0 on both the QVM and QPU, then trace where each backend validates parameter types. Compare the handling that produces the RPCError and define completion as consistent behavior for the same input, with regression coverage for both execution paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
quantum-computing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.