Template Function Pennylane::LightningQubit::Measures::probs_bitshift

Function Documentation

template<class PrecisionT, std::size_t n_wires>
auto Pennylane::LightningQubit::Measures::probs_bitshift(const std::complex<PrecisionT> *arr, const std::size_t num_qubits, const std::vector<std::size_t> &wires) -> std::vector<PrecisionT>

Probabilities for a subset of the full system.

Template Parameters
  • PrecisionT – State vector precision.

  • n_wires – Number of wires in the wires vector.

Parameters
  • arr – Pointer to the state vector data.

  • num_qubits – Number of qubits.

  • wires – Wires will restrict probabilities to a subset of the full system.

Returns

Floating point std::vector with probabilities.