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

QuantumCircuit initialize() links to StatePreparation and Initialize need fixing #11611

Closed
2 tasks done
woodsp-ibm opened this issue Jan 21, 2024 · 6 comments · Fixed by #11632
Closed
2 tasks done

QuantumCircuit initialize() links to StatePreparation and Initialize need fixing #11611

woodsp-ibm opened this issue Jan 21, 2024 · 6 comments · Fixed by #11632
Assignees
Labels
documentation Something is not clear or an error documentation

Comments

@woodsp-ibm
Copy link
Member

woodsp-ibm commented Jan 21, 2024

I was looking at the published docs for QuantumCircuit initialize - the links are referring to extensions and do not resolve

https://docs.quantum.ibm.com/api/qiskit/qiskit.circuit.QuantumCircuit#initialize

image

which is in 0.45 and 0.46

Qubit initialization is done by first resetting the qubits to :math:`|0\rangle`
followed by calling :class:`qiskit.extensions.StatePreparation`
class to prepare the qubits in a specified state.
Both these steps are included in the
:class:`qiskit.extensions.Initialize` instruction.

In main it seems to have been updated but there is a typo in the StatePreparation link - library is missing the y there

Qubit initialization is done by first resetting the qubits to :math:`|0\rangle`
followed by calling :class:`~qiskit.circuit.librar.StatePreparation`
class to prepare the qubits in a specified state.
Both these steps are included in the
:class:`~qiskit.circuit.library.Initialize` instruction.

@woodsp-ibm woodsp-ibm added the documentation Something is not clear or an error documentation label Jan 21, 2024
@valleyofblackpanther
Copy link
Contributor

Hi @woodsp-ibm can I be assigned to this issue?

@Cryoris
Copy link
Contributor

Cryoris commented Jan 23, 2024

Ah yeah, that was overlooked in #10725, nice catch! @valleyofblackpanther of course, you can have a go at it!

The links pointing to qiskit.extensions.<class> should instead point to qiskit.circuit.library.<class>. Let us know if you have any questions.

@valleyofblackpanther
Copy link
Contributor

Hi, @Cryoris I made the changes but I am unable to push them because Qiskit is not allowing me to do so, do I have to sign the CLA agreement, before pushing it to the main? And who should I send signed document too?

@woodsp-ibm
Copy link
Member Author

Hi, you cannot push changes direct into the repository if that is what you are trying to do. Rather you should fork the repo, then make a new branch off the branch to which the changes should apply in your repo, make the changes on that branch in your fork and then do a PR (Pull Request).

The CLA is online and when doing a PR it will link to this for it to be signed electronically.

here is more info about these things in this file https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md if you have not seen this.

While the typo (the missing 'y' can be fixed with a PR against main (i,e do the changes in a new branch made from main branch), I think the issue against 0.46 needs to be done against the stable/0.46 branch. There do not seem to be any more releases planned for 0.45 so it maybe 0.46 (which is imminent anyway) is the earliest it can be fixed for, with 1.0 coming a bit later from main. Hopefully @Cryoris can correct me if needed.

valleyofblackpanther added a commit to valleyofblackpanther/qiskit that referenced this issue Jan 24, 2024
valleyofblackpanther added a commit to valleyofblackpanther/qiskit that referenced this issue Jan 24, 2024
…anged it to circut.library Fixed on Qiskit#11611 QuantumCircuit initialize() links to StatePreparation and Initialize need fixing
@valleyofblackpanther
Copy link
Contributor

Hi @Cryoris @woodsp-ibm I did the required changes as instructed.

github-merge-queue bot pushed a commit that referenced this issue Jan 24, 2024
@woodsp-ibm woodsp-ibm linked a pull request Jan 24, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Jan 25, 2024
* QuantumCircuit initialize - the links are referring to extensions, changed it to circut.library Fixed on #11611 QuantumCircuit initialize() links to StatePreparation and Initialize need fixing

* Fix doc links to qiskit.extensions #11632, truncate displayed path by adding a ~

* Fix doc links to qiskit.extensions #11632, truncate displayed path by adding a ~ and QuantumCircuit initialize - the links are referring to extensions changed it to circut.library
@woodsp-ibm
Copy link
Member Author

This issues have been fixed by referenced PRs so I am closing this (not sure why it was not auto-closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Something is not clear or an error documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants