cuquantum.bindings.cudensitymat.create_operator_term

cuquantum.bindings.cudensitymat.create_operator_term(intptr_t handle, int32_t num_space_modes, space_mode_extents) intptr_t[source]

Creates an empty operator term which is going to be a sum of products of either elementary tensor operators or full matrix operators. Each individual elementary tensor operator within a product acts on a subset of space modes, either from the left or from the right (for each mode). Each full matrix operator within a product acts on all space modes, either from the left or from the right (for all modes).

Parameters
  • handle (intptr_t) – Library handle.

  • num_space_modes (int32_t) – Number of modes (quantum degrees of freedom) defining the primary/dual tensor product space in which the operator term will act.

  • space_mode_extents (object) –

    Extents of the modes (quantum degrees of freedom) defining the primary/dual tensor product space in which the operator term will act. It can be:

    • an int as the pointer address to the array, or

    • a Python sequence of int64_t.

Returns

Operator term.

Return type

intptr_t