Skip to content

fix: add timeout parameter to circuits.cost#342

Open
JelenaMack wants to merge 4 commits into
Quantinuum:mainfrom
JelenaMack:add-timeout-parameter
Open

fix: add timeout parameter to circuits.cost#342
JelenaMack wants to merge 4 commits into
Quantinuum:mainfrom
JelenaMack:add-timeout-parameter

Conversation

@JelenaMack
Copy link
Copy Markdown

qnx.jobs.wait_for has a timeout parameter that is set to 900 as a default.
There was not way for the user to override this parameter when calling circuits.cost. Thus, as soon as the circuit execution on the syntax checker took longer than 900s, circuits.cost raises an exception. Therefore, this commit adds an optional timeout parameter to circuits.cost. If the user specifies nothing, qnx.jobs.wait_for will use its own default timeout value of 900. Thus, this minor change will not break any previously written code.

JelenaMack added 4 commits May 5, 2026 14:40
qnx.jobs.wait_for has a timeout parameter that is set to 900 as a default. There was not way for the user to override this parameter when calling circuits.cost. Thus, as soon as the circuit execution on the syntax checker took longer than 900s, circuits.cost raises a timeout error. Therefore, this commit adds an optional timeout parameter to circuits.cost. If the user specifies nothing, qnx.jobs.wait_for will use its own default timeout value of 900. Thus, this minor change will not break any previously written code.
@JelenaMack JelenaMack changed the title Add timeout parameter to circuits.cost Fix: add timeout parameter to circuits.cost May 5, 2026
@JelenaMack JelenaMack changed the title Fix: add timeout parameter to circuits.cost fix: add timeout parameter to circuits.cost May 5, 2026
Copy link
Copy Markdown
Collaborator

@vanyae-cqc vanyae-cqc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @JelenaMack - could you please add the same to qnexus.client.hugr.py::cost and qnexus.client.qir.py::cost for consistency?

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