qml.math.conj

conj(tensor)[source]

Conjugate a tensor. Negate the imaginary part of a complex value.

Parameters

tensor (tensor_like) – A tensor-like object to conjugate.

Returns

The conjugated tensor.

Return type

tensor_like

Example

>>> x = tf.constant([0.6 + 0.1j, 0.1 - 0.3j, 0.6])
>>> conj(x)
<tf.Tensor: shape=(3,), dtype=complex64, numpy=array([6.00e-01 + 1.00e-1j, 1.00e-01 + 3.00e-1j, 6.00e-01 + 0.00j], dtype=complex64)>