fn

conj_physical

Tensor
conj_physical(x: Tensor)
source

Eagerly materialised complex conjugate.

Some reference frameworks distinguish conj (which may set a lazy "conjugated" flag on the tensor's view) from conj_physical (which always writes a new buffer with the conjugated values). Lucid does not carry any lazy conjugation metadata, so both call into the same engine op — conj_physical is provided for API parity and as a clear signal to readers that the conjugation is materialised.

Parameters

xTensor
Input tensor. Typically complex64; for real dtypes the conjugate is the identity.

Returns

Tensor

Element-wise complex conjugate of x, same shape and dtype.

Notes

Mathematical definition for a complex element z=a+ibz = a + ib:

z=aib.\overline{z} = a - i\,b.

Use this spelling when porting code that explicitly depends on the conjugation being physically present in the storage (e.g. for interop with external libraries that would otherwise see the lazy flag). Functionally identical to lucid.conj in Lucid.

Examples

>>> import lucid
>>> z = lucid.tensor([1+2j, 3-4j])
>>> lucid.conj_physical(z)
Tensor([1.-2.j, 3.+4.j])