diff --git a/qiskit/circuit/library/generalized_gates/unitary.py b/qiskit/circuit/library/generalized_gates/unitary.py index 9aa03be86318..fc5f9c241a93 100644 --- a/qiskit/circuit/library/generalized_gates/unitary.py +++ b/qiskit/circuit/library/generalized_gates/unitary.py @@ -123,7 +123,7 @@ def inverse(self, annotated: bool = False): return self.adjoint() def conjugate(self): - """Return the conjugate of the unitary.""" + """Return the complex conjugate of the unitary with respect to the representation returned by ``to_matrix``.""" return UnitaryGate(numpy.conj(self.to_matrix())) def adjoint(self): diff --git a/qiskit/quantum_info/operators/mixins/adjoint.py b/qiskit/quantum_info/operators/mixins/adjoint.py index 95053237685e..b5ba2675c6aa 100644 --- a/qiskit/quantum_info/operators/mixins/adjoint.py +++ b/qiskit/quantum_info/operators/mixins/adjoint.py @@ -45,7 +45,7 @@ def adjoint(self) -> Self: @abstractmethod def conjugate(self) -> Self: - """Return the conjugate of the CLASS.""" + """Return the complex conjugate of the CLASS.""" @abstractmethod def transpose(self) -> Self: diff --git a/qiskit/quantum_info/operators/symplectic/pauli_list.py b/qiskit/quantum_info/operators/symplectic/pauli_list.py index 02f9a78052b7..1e7c248d0143 100644 --- a/qiskit/quantum_info/operators/symplectic/pauli_list.py +++ b/qiskit/quantum_info/operators/symplectic/pauli_list.py @@ -810,7 +810,7 @@ def _multiply(self, other): return PauliList(super()._multiply(other)) def conjugate(self): - """Return the conjugate of each Pauli in the list.""" + """Return the complex conjugate of each Pauli in the list with respect to the Z basis.""" return PauliList(super().conjugate()) def transpose(self): diff --git a/qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py b/qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py index e8e19bd7af56..eb3682f505ff 100644 --- a/qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py +++ b/qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py @@ -291,6 +291,7 @@ def __setitem__(self, key, value): # --------------------------------------------------------------------- def conjugate(self): + """Return the complex conjugate with respect to the representation returned by ``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. diff --git a/qiskit/quantum_info/states/densitymatrix.py b/qiskit/quantum_info/states/densitymatrix.py index 33fb937780a9..ef2a82e1462b 100644 --- a/qiskit/quantum_info/states/densitymatrix.py +++ b/qiskit/quantum_info/states/densitymatrix.py @@ -210,7 +210,7 @@ def to_operator(self) -> Operator: return Operator(self.data, input_dims=dims, output_dims=dims) def conjugate(self): - """Return the conjugate of the density matrix.""" + """Return the complex conjugate of the density matrix.""" return DensityMatrix(np.conj(self.data), dims=self.dims()) def trace(self): diff --git a/qiskit/quantum_info/states/stabilizerstate.py b/qiskit/quantum_info/states/stabilizerstate.py index 4da5808ebfa2..a039f1e6cad3 100644 --- a/qiskit/quantum_info/states/stabilizerstate.py +++ b/qiskit/quantum_info/states/stabilizerstate.py @@ -189,7 +189,8 @@ def to_operator(self) -> Operator: return Clifford(self.clifford).to_operator() def conjugate(self): - """Return the conjugate of the operator.""" + """Return the complex conjugate of the underlying Clifford operator with + respect to the representation returned by the operator's ``to_matrix`` method.""" ret = self.copy() ret._data = ret._data.conjugate() return ret diff --git a/qiskit/quantum_info/states/statevector.py b/qiskit/quantum_info/states/statevector.py index 901ce95af424..34fd59364bf5 100644 --- a/qiskit/quantum_info/states/statevector.py +++ b/qiskit/quantum_info/states/statevector.py @@ -246,7 +246,7 @@ def to_operator(self) -> Operator: return Operator(mat, input_dims=self.dims(), output_dims=self.dims()) def conjugate(self) -> Statevector: - """Return the conjugate of the operator.""" + """Return the complex conjugate of the state vector.""" return Statevector(np.conj(self.data), dims=self.dims()) def trace(self) -> np.float64: