TeamGraphix / graphix

measurement-based quantum computing (MBQC) compiler and simulator
https://graphix.readthedocs.io
Apache License 2.0
55 stars 20 forks source link

upgrade tensor network examples #52

Closed masato-fuk closed 1 year ago

masato-fuk commented 1 year ago

Before submitting, please check the following:

Then, please fill in below:

Context (if applicable):

Due to the poor capacity of the former Pattern.standardize() and Pattern.shift_signals(), the size of runnable pattern was restricted. However, with the fast pattern operations implemented in #42, more than ten-thousand of nodes can be calculated on a laptop. Therefore, the examples of tensor network simulator are updated in this PR.

Description of the change:

Update examples/qft_with_tn.py. The number of QFT logical qubits increased from 7 to 50. Add examples/ghz_with_tn.py, where a 100-qubit GHZ state is generated Add an auto-selector of tensor network graph preparation strategy.

Related issue:

50

also see that checks (github actions) pass. If lint check keeps failing, try installing black==22.8.0 as behavior seems to vary across versions.

shinich1 commented 1 year ago

@masato-fuk When building docs it auto-runs examples to create plot and build into a gallery of examples, which means it's good to try building the docs locally before merging changes in examples. have you tried building the docs locally and checking it completes (as well as skimming thru outputs)?

shinich1 commented 1 year ago

also - please build readthedocs after this PR was merged. please fix bugs if the build fails on readthedocs.

update: it seems like it's possible to try building docs for specific branch, while keeping the build hidden from public. it's a good thing to check before merging PR and building public doc. I am running it now ping @masato-fuk

https://graphix.readthedocs.io/en/50-upgrade-tensor-network-demos/gallery/index.html

shinich1 commented 1 year ago

@masato-fuk please squash and merge with title rename TN graph prep options; update examples (#52). please add please read Changelog.md for details at the top of commit message description (larger box below commit message)