Lazy evaluator for Bloq execution

Open
#1,895 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python

Research direction

Start by reading how Qualtran lazily evaluates individual Bloq decompositions and how its Cirq integration constructs circuits. Then trace the execution path from a Bloq decomposition to Cirq simulation to see where a lazy execution interface could fit. Done means executing demanded portions incrementally without constructing a fully flattened circuit; the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Description

Qualtran represents quantum programs hierarchically as Bloqs. However, executing a large program through Cirq generally requires decomposing it and constructing a complete circuit before simulation.

For very large or repetitive algorithms, the fully expanded circuit may be impractical to store even though the Qualtran representation is compact. It would be useful to evaluate a Bloq incrementally, decomposing only the current subgraph and forwarding executable leaf operations to a simulator or hardware.

Qualtran already evaluates individual Bloq decompositions lazily. But I don't think this extends to execution: recursively decompose and execute only the currently demanded portion of the graph without first constructing a fully flattened circuit.

Dominant language
Python
Stars
397
Forks
127
Avg merge
2d 22h
Merged PRs (30d)
1

Getting set up

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.

More from quantumlib/Qualtran

All issues in quantumlib/Qualtran

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.