split the plot of the circuit when there are too many gates#14
split the plot of the circuit when there are too many gates#14Marcogarofalo wants to merge 2 commits intomasterfrom
Conversation
| ## 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.
how does this work here, I don't understand...
There was a problem hiding this comment.
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