Problem Statement
You are given an integer . Implement the operation defined by the following matrix on a quantum circuit with qubits:
where denotes the identity matrix and is defined by
Constraints
- Integers must be encoded by little-endian notation, i.e., .
- Global phase is ignored in judge.
- The submitted code must follow the specified format:
Sample Input
- : The matrix is calculated as follows.