Function Pennylane::Util::maxDecimalForQubit

Function Documentation

inline auto Pennylane::Util::maxDecimalForQubit(std::size_t qubitIndex, std::size_t qubits) -> std::size_t

Calculates the decimal value for a qubit, assuming a big-endian convention.

Parameters
  • qubitIndex – the index of the qubit in the range [0, qubits)

  • qubits – the number of qubits in the circuit

Returns

decimal value for the qubit at specified index