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.
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
Nailing down automatic circuit cutter's API #2168
Nailing down automatic circuit cutter's API #2168
Changes from 39 commits
72fc2ab
26251f5
7e25adc
5d39fea
1ab2771
c19171d
8df7b1b
1fcac43
037007d
d52ede3
3d9847d
b751061
320151a
0336de6
b28b73e
0df8210
59325ea
03dd3b4
c00bcde
39c68c9
745fc14
bdb43d3
39ef017
00dba22
0ffeae1
bebc6c0
1068916
ac937a7
eb823e2
0eaf85d
8049a8d
02c5293
cea2a65
5648843
ebcc24e
b5eab8d
e82a5f4
033e5eb
35c8b8c
8fc3419
8238ea2
0f738cc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I don't really understand what this is doing, why is there the
or self.min_free_wires
here?Couldn't we just have these values set as in lines
617
and618
?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.
This is me wanting to be slightly more forgiving before checking if one of
devices
andmax_free_wires
is provided, where if neither are provided butmin_free_wires
are, then I interpretmax_free_wires
to be the same asmin_free_wires
. Unlikely situation, but if it happens this interpretation should be safe.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.
Thanks this makes sense, though now I'm not sure I understand the docstring where for
max_free_wires
we have "Optional only when ``devices`` is provided
" and vice versa fordevices
. Maybe I'm misunderstanding the use ofOptional
but this seems to suggest that at least one of the two must be passed?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.
You are correct that the docstring doesn't accurately describe this behaviour. This was intentional since this is sort of a "failsafe" behaviour which doesn't need to be advertised to users since it adds nothing functionally new and could potentially confuse people even more. In the end, I do want to force users to provide either
devices
ormax_free_wires
.