Merged
Conversation
sansiro77
reviewed
Nov 18, 2024
Contributor
sansiro77
left a comment
There was a problem hiding this comment.
设计了SubGraphState和GraphState,并以此调整了Command。需要进一步调整、测试和优化
…pport transpile yet; draw funtion requires discussion
Collaborator
Author
|
跑通了GraphState版,支持batch初态输入,增加和修正了对应测试脚本。需要进一步调整(包括重写transpile功能,讨论draw的方案)、测试优化(运行效率的比较)、注释和代码规范性的改正。 |
sansiro77
reviewed
Nov 22, 2024
| nqubit = len(sgs.nodes) | ||
| init_state = sgs.full_state | ||
| if init_state.ndim == 2: | ||
| init_state = init_state.unsqueeze(0) |
Contributor
There was a problem hiding this comment.
应该不需要改变init_state的shape。下面没有domain时,qs、qt取0,并且angle.reshape(-1, 1).squeeze(0)作为data,即data不带batch时,会根据init_state的shape输出相应shape的末态
| nqubit = len(sgs.nodes) | ||
| init_state = sgs.full_state | ||
| if init_state.ndim == 2: | ||
| init_state = init_state.unsqueeze(0) |
Collaborator
Author
sansiro77
reviewed
Dec 24, 2024
Contributor
sansiro77
left a comment
There was a problem hiding this comment.
完善state和pattern里的docstring,尽量复用QubitCircuit、QumodeCircuit或者风格保持一致
sansiro77
reviewed
Dec 25, 2024
sansiro77
reviewed
Dec 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

MBQC module now support:
Pattern Generation through NEMC Commands/ networkx Graph/ transpile from
DeepQuantum.QubitCircuitPattern optimization by
standardizationPattern simulation through
statevectorbackend; Batch initial_state as inputPattern Visualization via
networkx3 test files are added accordingly.