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

Write a circuit/network drawer. #3

Open
rmlarose opened this issue Jan 3, 2019 · 4 comments
Open

Write a circuit/network drawer. #3

rmlarose opened this issue Jan 3, 2019 · 4 comments

Comments

@rmlarose
Copy link
Owner

rmlarose commented Jan 3, 2019

Thinking of something similar to printing a circuit in Cirq. This would be extremely useful for visualizing both circuits and the network.

Should take in an object that contains a pyquil Program and return a string corresponding to a visual representation of said program (for the circuit drawer).

For the network drawer, we may want to have "blackbox drawings" like

----[Encode]----[Transform]----[Measure]----[Relu]----[Encode]----...

or something similar.

@naezzell
Copy link
Collaborator

Though we do plan to meet tomorrow, I'm commenting this here for records sake.

At what level of sophistication should we consider the circuit drawer done? As it is written it is not extremely modular, so adding 'blackbox drawings' is not easily achieved unless we changed the way pyquil program.out() formats strings.

Alternatively, we could just ensure that each step 'blackbox step' draws its own circuit, append them all together in the end, and draw our own black boxes as desired/ mark them somehow as we append them.

@rmlarose
Copy link
Owner Author

The "blackbox drawings" can be handled in Network and related Network classes, most likely. This issue was mainly for drawing each gate in a program.

Can the drawer now handle DECLARE and other statements in the program (e.g., PRAGMAs?) If so, we can close this issue.

@naezzell
Copy link
Collaborator

It's been a while since I took a look at this (clear by the dates I'm sure), but is the Circuit Drawer since it was last implemented sufficient for your uses?

Are there any hang-ups/ features that you would like to see?

@rmlarose
Copy link
Owner Author

Did we ever take care of the PRAGMA, DECLARE, etc. statements?

If so, it's likely a functional drawer, but still needs to be tested a lot more. If it's passing all tests, it's fine for now. In the future, it would be good to upgrade to more a more sophisticated drawer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants