Namespace qc::literals¶
-
namespace literals
Inline namespace for control literals.
Use
using namespace qc::literalsto enable the literals.Functions
-
inline Control operator""_pc(const unsigned long long int q)
User-defined literal for positive control qubits.
This literal allows to create a positive control qubit from an unsigned integer, for example as
0_pc.- Parameters:
q – Index of the qubit that acts as a control.
- Returns:
A positive control qubit.
-
inline Control operator""_nc(const unsigned long long int q)
User-defined literal for negative control qubits.
This literal allows to create a negative control qubit from an unsigned integer, for example as
0_nc.- Parameters:
q – Index of the qubit that acts as a control.
- Returns:
A negative control qubit.
-
inline Control operator""_pc(const unsigned long long int q)