RealAmplitudes.ucry¶
- RealAmplitudes.ucry(angle_list, q_controls, q_target)¶
Attach a uniformly controlled (also called multiplexed) Ry rotation gate to a circuit.
The decomposition is base on https://arxiv.org/pdf/quant-ph/0406176.pdf by Shende et al.
- Parameters
angle_list (list[numbers) – list of (real) rotation angles \([a_0,...,a_{2^k-1}]\)
q_controls (QuantumRegister|list[Qubit]) – list of k control qubits (or empty list if no controls). The control qubits are ordered according to their significance in increasing order: For example if
q_controls=[q[0],q[1]]
(withq = QuantumRegister(2)
), the rotationRy(a_0)
is performed ifq[0]
andq[1]
are in the state zero, the rotationRy(a_1)
is performed ifq[0]
is in the state one andq[1]
is in the state zero, and so onq_target (QuantumRegister|Qubit) – target qubit, where we act on with the single-qubit rotation gates
- Returns
the uniformly controlled rotation gate is attached to the circuit.
- Return type
- Raises
QiskitError – if the list number of control qubits does not correspond to the provided number of single-qubit unitaries; if an input is of the wrong type