core.ansatz.efficient_su2#
Functions#
Creates an Efficient SU2 variational quantum circuit. |
Module Contents#
- create_efficient_su2_circuit(num_qubits: int, rotation_blocks: list[str] | None = None, entanglement: str = 'linear', skip_final_rotation_layer: bool = False, reps: int = 1) qamomile.core.circuit.QuantumCircuit #
Creates an Efficient SU2 variational quantum circuit.
This function generates a parameterized quantum circuit based on the Efficient SU2 ansatz. The circuit consists of alternating layers of rotation gates and entanglement operations.
- Parameters:
num_qubits (int) – The number of qubits in the circuit.
rotation_blocks (list[str] | None) – A list of rotation gates to apply in each rotation layer. If None, defaults to [“ry”, “rz”].
entanglement (str) – The type of entanglement to apply. Options are ‘linear’, ‘full’, ‘circular’, or ‘reverse_linear’.
skip_final_rotation_layer (bool) – If True, skips the final rotation layer.
reps (int) – The number of repetitions of the rotation-entanglement block.
- Returns:
The constructed Efficient SU2 variational quantum circuit.
- Return type:
qm_c.QuantumCircuit
- Raises:
NotImplementedError – If an unsupported rotation gate or entanglement type is specified.
Example
>>> circuit = create_efficient_su2_circuit(3, rotation_blocks=["rx", "ry"], entanglement="full", reps=2)