Problem Statement
You are given an integer , a real number , an -qubit quantum gate and an -qubit parametric quantum gate of unknown structures.
There exists a vector satisfying the following two conditions:
Using the quantum gates and , implement an operation that prepares the quantum state on a quantum circuit with qubits.
The operation must satisfy within an error of .
Constraints
- The number of applied must not exceed . (If exceeded, a DLE (depth limit exceeded) error will be displayed)
- Global phase is ignored in judge.
- The submitted code must follow the specified format:
Hints
Open
- You can use the inverse gates of the quantum gates and .