-
Notifications
You must be signed in to change notification settings - Fork 2
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
split the plot of the circuit when there are too many gates #14
base: master
Are you sure you want to change the base?
Conversation
if(ngates > 0) { | ||
ipos <- rep(1, times=n) | ||
## plot gates | ||
gatelist <- x@circuit$gatelist | ||
for(i in c(1:ngates)) { | ||
if(max(ipos)%%gate_x_plot==1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how does this work here, I don't understand...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name is misleading, gate_x_plot is the number of columns per plot. Since you can have many gates on the same
column.
I will have a look to the current version.
I have also fixed the problem of overlapping single- and multi-qubit gates. This is somehow incompatible with what you did, but I don't understand what you did. When using this interactively it also does not create a single plot? |
@Marcogarofalo commented on this pull request.
> if(ngates > 0) {
ipos <- rep(1, times=n)
## plot gates
gatelist <- ***@***.***$gatelist
for(i in c(1:ngates)) {
+ if(max(ipos)%%gate_x_plot==1){
the name is misleading, gate_x_plot is the number of columns per plot. Since you can have many gates on the same
column.
but how are the several column plots triggered?
In the new `master` I compute the x-pos for each gate once at the beginning `gpos`. We could add a y-pos also. Then, one could prepare everything in a single plot.
|
before I was counting the colum with ipos,
or for multiple qubit state as
so at every iteration of the loop |
se pudo solucionar? |
I modify the plot method such that is splitting the plot of the circuit into multiple lines.
The maximum number of gates per plot is set by default to 12 but it can passed as a parameter.
Here there are some examples
test_plot.pdf