I know how to create controlled versions of gates like X, Y, Z. For example, a controlled X gate would be implemented by writing
However, I've tried numerous times to create a controlled R1 gate with no success, and there are no examples available on the Q# documentation or elsewhere on the web from what I've seen. As an example of what I've attempted, I've tried
and get the following error:
The shape of the given tuple does not match the argument type.
From what I gather the issue is that an X gate does not require any additional parameters, whereas an angle needs to be specified for the R1 gate to be well defined.