Skip to content

Commit

Permalink
update doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
boonware committed Dec 13, 2024
1 parent 95fdac5 commit 3a7454e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qiskit/circuit/library/generalized_gates/unitary.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def inverse(self, annotated: bool = False):
return self.adjoint()

def conjugate(self):
"""Return the complex conjugate of the unitary with respect to the representation returned by ``to_matrix``."""
"""Return the complex conjugate of the unitary with respect to the representation returned by :meth:`~UnitaryGate.to_matrix`."""
return UnitaryGate(numpy.conj(self.to_matrix()))

def adjoint(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def __setitem__(self, key, value):
# ---------------------------------------------------------------------

def conjugate(self):
"""Return the complex conjugate with respect to the representation returned by ``to_matrix``."""
"""Return the complex conjugate with respect to the representation returned by :meth:`~SparsePauliOp.to_matrix`."""
# Conjugation conjugates phases and also Y.conj() = -Y
# Hence we need to multiply conjugated coeffs by -1
# for rows with an odd number of Y terms.
Expand Down
2 changes: 1 addition & 1 deletion qiskit/quantum_info/states/densitymatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def to_operator(self) -> Operator:
return Operator(self.data, input_dims=dims, output_dims=dims)

def conjugate(self):
"""Return the complex conjugate of the density matrix with respect to the basis of the vector components returned by :meth:`data`."""
"""Return the complex conjugate of the density matrix with respect to the basis of the vector components returned by :meth:`~DensityMatrix.data`."""
return DensityMatrix(np.conj(self.data), dims=self.dims())

def trace(self):
Expand Down
2 changes: 1 addition & 1 deletion qiskit/quantum_info/states/stabilizerstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def to_operator(self) -> Operator:

def conjugate(self):
"""Return the complex conjugate of the underlying Clifford operator with
respect to the representation returned by the operator's ``to_matrix`` method."""
respect to the representation returned by the operator's :meth:`~StabilizerState.to_matrix` method."""
ret = self.copy()
ret._data = ret._data.conjugate()
return ret
Expand Down
2 changes: 1 addition & 1 deletion qiskit/quantum_info/states/statevector.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def to_operator(self) -> Operator:
return Operator(mat, input_dims=self.dims(), output_dims=self.dims())

def conjugate(self) -> Statevector:
"""Return the complex conjugate of the state vector with respect to the basis of the vector components returned by :meth:`data`."""
"""Return the complex conjugate of the state vector with respect to the basis of the vector components returned by :meth:`~StateVector.data`."""
return Statevector(np.conj(self.data), dims=self.dims())

def trace(self) -> np.float64:
Expand Down

0 comments on commit 3a7454e

Please sign in to comment.