Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quake Circuit Cutting #514

Closed
wants to merge 20 commits into from
Closed

Conversation

amccaskey
Copy link
Collaborator

@amccaskey amccaskey commented Aug 1, 2023

Introduce new MLIR Pass that takes a single Quake function in the value-semantic model and partitions the corresponding circuit into k sub-circuits using METIS. Reconstitutes each partition into a new Quake function with inserted measure and state preparation nodes. These nodes can be search/replaced via another upcoming pass before JIT execution via NVQIR simulation.

Workflow steps:

  • Map value-semantic Quake to DAG structure.
  • Convert DAG to undirected METIS graph input
  • Partition with METIS
  • Create DAG representation for each partitition
  • Insert measurement and state preparation nodes
  • Reconstitute DAG to Quake MLIR function
  • Add to the ModuleOp.

Copy link
Collaborator

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

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

Requested "changes" is a conversation about how we want to support this more permanently. Specifically, if we should write our own graph partition library and/or what library we depend on in the meantime or permanently.

test/Quake/circuit-cutting.qke Outdated Show resolved Hide resolved
Copy link
Collaborator

@bettinaheim bettinaheim left a comment

Choose a reason for hiding this comment

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

Please add Metis to the Notice file in any case. Even if we are not including it in the release, it is in the devdeps image and it is also very easy to forget adding it in the future if we ever include it.

lib/Support/partitioners/CMakeLists.txt Outdated Show resolved Hide resolved
scripts/install_prerequisites.sh Outdated Show resolved Hide resolved
temp_install_if_command_unknown gcc gcc

git clone https://github.com/KarypisLab/GKlib
cd GKlib && make config cc=gcc prefix=$METIS_INSTALL_PREFIX openmp=set
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does openmp=set mean that running the metis graph partiationer will cause a runtime failure if openmp is not installed in the dev environment?

docker/build/devdeps.manylinux.Dockerfile Outdated Show resolved Hide resolved
scripts/build_cudaq.sh Outdated Show resolved Hide resolved
docker/build/devdeps.Dockerfile Outdated Show resolved Hide resolved
Copy link
Collaborator

@boschmitt boschmitt left a comment

Choose a reason for hiding this comment

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

This is a partial review.

lib/Optimizer/CodeGen/QuakeCircuitCutPass.cpp Outdated Show resolved Hide resolved
lib/Optimizer/CodeGen/QuakeCircuitCutPass.cpp Outdated Show resolved Hide resolved
lib/Optimizer/CodeGen/QuakeCircuitCutPass.cpp Outdated Show resolved Hide resolved
@amccaskey amccaskey force-pushed the QuakeCircuitCutting branch 2 times, most recently from 470b4bf to acf1d42 Compare August 9, 2023 12:27
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 11, 2023
amccaskey and others added 18 commits August 15, 2023 18:45
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
…ble one to load it as a plugin

Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
Signed-off-by: Alex McCaskey <[email protected]>
…ioner plugin is installed, and setting up the test to test all installed plugins
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 15, 2023
@amccaskey amccaskey marked this pull request as draft August 16, 2023 14:34
@github-actions
Copy link

CUDA Quantum Docs Bot: A preview of the documentation can be found here.

github-actions bot pushed a commit that referenced this pull request Aug 16, 2023
@amccaskey
Copy link
Collaborator Author

Closing this, will require a bit more work / though.

@amccaskey amccaskey closed this Aug 17, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 17, 2023
@amccaskey amccaskey deleted the QuakeCircuitCutting branch February 29, 2024 20:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants