braket.circuits.angled_gate module

class braket.circuits.angled_gate.AngledGate(angle: float, qubit_count: int, ascii_symbols: Sequence[str])[source]

Bases: braket.circuits.gate.Gate

Class AngledGate represents a quantum gate that operates on N qubits and an angle.

Parameters
  • angle (float) – The angle of the gate in radians.

  • qubit_count (int) – The number of qubits that this gate interacts with.

  • ascii_symbols (Sequence[str]) – ASCII string symbols for the gate. These are used when printing a diagram of a circuit. The length must be the same as qubit_count, and index ordering is expected to correlate with the target ordering on the instruction. For instance, if a CNOT instruction has the control qubit on the first index and target qubit on the second index, the ASCII symbols should have ["C", "X"] to correlate a symbol with that index.

Raises

ValueError – If the qubit_count is less than 1, ascii_symbols are None, or ascii_symbols length != qubit_count, or angle is`None`

property angle

Returns the angle for the gate

Returns

angle (float) – The angle of the gate in radians