Skip to content

Commit

Permalink
Improve docstring for Statevector.evolve (Qiskit#9666)
Browse files Browse the repository at this point in the history
* Improve docstring for `Statevector.evolve`

I didn't realize from the generated documentation that
`Statevector.evolve` can accept an `Instruction` or `QuantumCircuit`,
not just an `Operator`.  I only learned it once I found myself
reading the source.  This modifies the docstring to make it explicit.

* Disambiguate `Instruction`

Qiskit#9666 (comment)

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and king-p3nguin committed May 22, 2023
1 parent e1b1d06 commit 6b8d5a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit/quantum_info/states/statevector.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def evolve(self, other, qargs=None):
"""Evolve a quantum state by the operator.
Args:
other (Operator): The operator to evolve by.
other (Operator | QuantumCircuit | circuit.Instruction): The operator to evolve by.
qargs (list): a list of Statevector subsystem positions to apply
the operator on.
Expand Down

0 comments on commit 6b8d5a9

Please sign in to comment.