Function Pennylane::LightningGPU::Util::compute_local_index

Function Documentation

inline std::size_t Pennylane::LightningGPU::Util::compute_local_index(const std::size_t index, const std::size_t num_qubits)

Compute the local index from a given index in multi-gpu workflow.

Parameters
  • index – Global index of the target element.

  • num_qubits – Number of wires within the local devices.

Returns

local_index Local index of the target element.