HTTP connection warnings when using local_forest_runtime
Open
Nobody has claimed this yet.
bug :bug:
good first issue :baby:
help wanted :wave:
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 358
- Avg merge
- 1d 58m
- Merged PRs (30d)
- 4
Description
Some simple code keeps printing warnings that appear to be unrelated to anything I'm doing:
WARNING - Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4dea0aeb00>: Failed to establish a new connection: [Errno 111] Connection refused',)': /
This happens with some code that just solves some of the exercises in the docs:
def throw_octahedral_die():
qvm = get_qc("3q-qvm")
program = Program(H(0), H(1), H(2))
ro = program.declare("ro", "BIT", 3)
program += MEASURE(0, ro[0])
program += MEASURE(1, ro[1])
program += MEASURE(2, ro[2])
result = qvm.run(program)
a, b, c = result[0]
return 1 + 4 * a + 2 * b + c
def main():
print(throw_octahedral_die())
if __name__ == "__main__":
with local_forest_runtime():
main()
AFAICT these warnings are nonactionable and do not indicate any problem, so they should be suppressed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the documented exercise using local_forest_runtime, get_qc("3q-qvm"), and qvm.run to locate the source of the connection warnings. Done means the non-actionable warnings are suppressed while the example still runs and returns its measurement result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100