Decompositions of trapped-ion native gates

Custom decompositions of operations into the \(GPI\), \(GPI2\), and \(MS\) native gate set.

ionizer.decompositions.gpi_cnot(wires)

\(CNOT\) decomposition into \(GPI2\) and \(MS\) gates.

\[CNOT_{ij} = GPI2_i(-\pi/2) GPI2_i(\pi) GPI2_j(\pi) MS_{ij} GPI2_i(\pi/2)\]
Parameters:

wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of trapped ion gates that implements the gate up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_hadamard(wires)

Hadamard decomposition into \(GPI\) and \(GPI2\) gates.

\[H = GPI2(-\pi / 2) GPI(0)\]
Parameters:

wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) and \(GPI2\) rotations that implements the gate up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_pauli_x(wires)

Pauli \(X\) decomposition as a \(GPI\) gate.

\[X = GPI(0)\]
Parameters:

wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) rotations that implements the gate.

Return type:

List[Operation]

ionizer.decompositions.gpi_pauli_y(wires)

Pauli \(Y\) decomposition as a \(GPI\) gate.

\[Y = GPI(\pi / 2)\]
Parameters:

wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) rotations that implements the gate.

Return type:

List[Operation]

ionizer.decompositions.gpi_pauli_z(wires)

Pauli \(Z\) decomposition into \(GPI\) gates.

\[Z = GPI(-\pi / 2) GPI(0)\]
Parameters:

wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) rotations that implements the gate up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_rx(phi, wires)

\(RX\) decomposition into \(GPI\) and \(GPI2\) gates.

\[RX(\phi) = GPI2(\pi/2) GPI(\phi/2 - \pi/2) GPI2(\pi/2)\]
Parameters:
  • phi (tensor) – Rotation angle

  • wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) and \(GPI2\) rotations that implements the gate up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_ry(phi, wires)

\(RY\) decomposition into \(GPI\) and \(GPI2\) gates.

\[RY(\phi) = GPI2(\pi) GPI(\phi/2) GPI2(\pi)\]
Parameters:
  • phi (tensor) – Rotation angle

  • wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) and \(GPI2\) rotations that implements the gate up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_rz(phi, wires)

\(RZ\) decomposition into \(GPI\) gates.

\[RZ(\phi) = GPI(0) GPI(-\pi/2)\]
Parameters:
  • phi (tensor) – Rotation angle

  • wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) rotations that implements the gate up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_single_qubit_unitary(unitary, wires)

Single-qubit unitary matrix decomposition into \(GPI\) and \(GPI2\) gates.

This function is modeled off of PennyLane’s unitary_to_rot transform: https://docs.pennylane.ai/en/stable/code/api/pennylane.transforms.unitary_to_rot.html

Parameters:
  • unitary (tensor) – A unitary matrix.

  • wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The sequence of \(GPI\) and \(GPI2\) rotations that implements the desired unitary up to a global phase.

Return type:

List[Operation]

ionizer.decompositions.gpi_sx(wires)

Square-root of \(X\) decomposition into \(GPI2\) gate.

\[\sqrt{X} = GPI2(0)\]
Parameters:

wires (Sequence[int] or pennylane.Wires) – The wires this gate is acting on.

Returns:

The \(GPI2\) rotation that implements the gate.

Return type:

List[Operation]