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

Fix bad indentation on quantumcircuit.py #11744

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

arnaucasau
Copy link
Contributor

@arnaucasau arnaucasau commented Feb 7, 2024

Summary

This PR fixes a bad indentation of two code blocks that was causing the page to not render correctly those snippets.

Screenshots before this PR

First code block:

Captura desde 2024-02-07 21-54-51

Second code block:
Captura desde 2024-02-07 21-55-08

Screenshots applying the change

First code block:
Captura desde 2024-02-07 21-55-30

Second code block:
Captura desde 2024-02-07 21-55-18

@arnaucasau arnaucasau requested a review from a team as a code owner February 7, 2024 21:00
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Feb 7, 2024
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

ParameterVectorElement(x[2]), ParameterVectorElement(x[3]),
..., ParameterVectorElement(x[11])
])
>>> from qiskit.circuit import QuantumCircuit, Parameter, ParameterVector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the >>> here? It always seemed unnecessary to put that in there and it gets in the way of copy and paste.

Copy link
Contributor Author

@arnaucasau arnaucasau Feb 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in this case is useful to differentiate the instructions from the final output (shows the value of circuit.parameters as you would show it on jupyter-notebook rather than printing it like in the other code-block).

The good thing here is that you can't select the >>> part, so it shouldn't get in the way of copy and paste :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with leaving this like this as this is just fixing a clear spacing issue. I still think we might want to revisit >>> usage in the future more broadly, but there isn't any reason to block this over that as it's a good fix.

@mtreinish mtreinish added documentation Something is not clear or an error documentation Changelog: None Do not include in changelog and removed Community PR PRs from contributors that are not 'members' of the Qiskit repo labels Feb 7, 2024
@mtreinish mtreinish added this to the 1.0.0 milestone Feb 7, 2024
@mtreinish mtreinish added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Feb 7, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 7830597825

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 89.192%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 3 92.19%
Totals Coverage Status
Change from base Build 7830061937: 0.02%
Covered Lines: 58813
Relevant Lines: 65940

💛 - Coveralls

@jakelishman
Copy link
Member

Eric: Matt did this first review on this and had a question, so it'd be a bit bad form for me or Elena to follow-up without giving Matt a chance to see the response.

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing this.

ParameterVectorElement(x[2]), ParameterVectorElement(x[3]),
..., ParameterVectorElement(x[11])
])
>>> from qiskit.circuit import QuantumCircuit, Parameter, ParameterVector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with leaving this like this as this is just fixing a clear spacing issue. I still think we might want to revisit >>> usage in the future more broadly, but there isn't any reason to block this over that as it's a good fix.

@mtreinish mtreinish added this pull request to the merge queue Feb 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 12, 2024
@jakelishman jakelishman added this pull request to the merge queue Feb 12, 2024
Merged via the queue into Qiskit:main with commit 1dd9a57 Feb 12, 2024
12 checks passed
mergify bot pushed a commit that referenced this pull request Feb 12, 2024
Co-authored-by: Eric Arellano <[email protected]>
(cherry picked from commit 1dd9a57)
github-merge-queue bot pushed a commit that referenced this pull request Feb 12, 2024
Co-authored-by: Eric Arellano <[email protected]>
(cherry picked from commit 1dd9a57)

Co-authored-by: Arnau Casau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog documentation Something is not clear or an error documentation stable backport potential The bug might be minimal and/or import enough to be port to stable
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants