-
Notifications
You must be signed in to change notification settings - Fork 328
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
Switch to using black for code formatting #81
Conversation
This is a disaster! I can't say we had a very well formatted code, but this is terrible. input_grad = grad_output.transpose(0, 1) @ input_grad.transpose(0, 1) now: input_grad = grad_output.transpose(0, 1) @ input_grad.transpose(
0, 1
) Or: weights_grad = weights_grad.to_dense() # this should be eventually removed it is weights_grad = (
weights_grad.to_dense()
) # this should be eventually removed Or: parameterized_circuit = self._quantum_instance.transpile(parameterized_circuit)[0] replaced with parameterized_circuit = self._quantum_instance.transpile(
parameterized_circuit
)[0] and so on and so on... |
Any ideas why |
Terra changed to 105 from 100 in their PR. I don't know why but would think it has to do on how black formatted code which may have increased de size of the code in one line. |
This issue in Terra has a note as to the line length of 105 Qiskit/qiskit#5883 I agree it does not do a great job in some places - I made a comment in the equivalent PR in Nature. |
Thanks for pointing out to the Nature's PR. I agree with @mtreinish in general. Well, of course we get rid of any formatting questions but at what a cost. |
This is the answer from Qiskit/qiskit#5883:
|
Summary
Follows the changes made in Qiskit/qiskit#6361
Details and comments