pauli_expansion_view_prepare_trace_with_zero_state_backward_diff#

cuquantum.bindings.cupauliprop.pauli_expansion_view_prepare_trace_with_zero_state_backward_diff(
intptr_t handle,
intptr_t view,
int64_t max_workspace_size,
intptr_t workspace,
) tuple[source]#

Updates the given workspace descriptor in preparation for backward differentiation of the trace with the zero state.

Parameters:
  • handle (intptr_t) – Library handle.

  • view (intptr_t) – Pauli expansion view to be traced.

  • max_workspace_size (int64_t) – Maximum workspace size limit in bytes.

  • workspace (intptr_t) – Workspace descriptor to be updated with the required workspace buffer size.

Returns:

  • int64_t: Required size (in bytes) of the X and Z bits output buffer for the cotangent expansion.

  • int64_t: Required size (in bytes) of the coefficients output buffer for the cotangent expansion.

Return type:

A 2-tuple containing