qat.synthopline.interface.OperatorTableau

class qat.synthopline.interface.OperatorTableau

A class representing a Clifford Tableau.

A detailed introduction can be found in [dB12].

Usage example:

In this example, we use the Tableau structure to conjugate a Pauli operator \(ZZ\) with the Clifford operator that can be implemented via a H gate on qbit 1 and a CNOT gate from 0 to 1.

The resulting Pauli operator is \(IX\) and no phase is picked up.

from qat.synthopline.interface import OperatorTableau, WeylOperator

tableau = OperatorTableau(2)

tableau.h_right(1)
tableau.cnot_right(0, 1)

operator = WeylOperator("ZZ")

operator.conjugate_with(tableau)

phase, pauli = operator.to_pauli()
print(phase, pauli)
False IX
Parameters

n (int) – the number of qubits

cnot_left(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a CNOT to the left of the operator

Parameters
  • control (int) – the control qubit

  • target (int) – the target qubit

cnot_right(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a CNOT to the right of the operator

Parameters
  • control (int) – the control qubit

  • target (int) – the target qubit

cz_left(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a CZ to the left of the operator

Parameters
  • control (int) – the control qubit

  • target (int) – the target qubit

cz_right(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a CZ to the right of the operator

Parameters
  • control (int) – the control qubit

  • target (int) – the target qubit

property dim

The number of qubits

h_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a H to the left of the operator

Parameters

qbit (int) – a qbit index

h_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a H to the right of the operator

Parameters

qbit (int) – a qbit index

inverse(self: qat.synthopline.interface.OperatorTableau) qat.synthopline.interface.OperatorTableau
multiply_right(self: qat.synthopline.interface.OperatorTableau, arg0: qat.synthopline.interface.OperatorTableau) None
rx_minus_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RX(-\pi/2)\) to the left of the operator

Parameters

qbit (int) – a qbit index

rx_minus_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RX(\pi/2)\) to the right of the operator

Warning

Notice the flipped sign in the rotation angle!

Parameters

qbit (int) – a qbit index

rx_plus_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RX(+\pi/2)\) to the left of the operator

Parameters

qbit (int) – a qbit index

rx_plus_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RX(-\pi/2)\) to the right of the operator

Warning

Notice the flipped sign in the rotation angle!

Parameters

qbit (int) – a qbit index

ry_minus_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RY(-\pi/2)\) to the left of the operator

Parameters

qbit (int) – a qbit index

ry_minus_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RY(\pi/2)\) to the right of the operator

Warning

Notice the flipped sign in the rotation angle!

Parameters

qbit (int) – a qbit index

ry_plus_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RY(+\pi/2)\) to the left of the operator

Parameters

qbit (int) – a qbit index

ry_plus_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RY(-\pi/2)\) to the right of the operator

Warning

Notice the flipped sign in the rotation angle!

Parameters

qbit (int) – a qbit index

rz_minus_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RZ(-\pi/2)\) to the left of the operator

Parameters

qbit (int) – a qbit index

rz_minus_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RZ(\pi/2)\) to the right of the operator

Warning

Notice the flipped sign in the rotation angle!

Parameters

qbit (int) – a qbit index

rz_plus_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RZ(+\pi/2)\) to the left of the operator

Parameters

qbit (int) – a qbit index

rz_plus_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a \(RZ(-\pi/2)\) to the right of the operator

Warning

Notice the flipped sign in the rotation angle!

Parameters

qbit (int) – a qbit index

swap_left(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a SWAP to the left of the operator

Parameters
  • control (int) – the control qubit

  • target (int) – the target qubit

swap_right(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a SWAP to the right of the operator

Parameters
  • control (int) – the control qubit

  • target (int) – the target qubit

property tableau

The internal data of the tableau

x_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a X to the left of the operator

Parameters

qbit (int) – a qbit index

x_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a X to the right of the operator

Parameters

qbit (int) – a qbit index

xx_left(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a XX[pi/2] to the left of the operator

Parameters
  • qb1 (int) – the first qubit

  • qb2 (int) – the second qubit

xx_right(self: qat.synthopline.interface.OperatorTableau, arg0: int, arg1: int) None

Applies a XX[pi/2] to the right of the operator

Parameters
  • qb1 (int) – the first qubit

  • qb2 (int) – the second qubit

y_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a Y to the left of the operator

Parameters

qbit (int) – a qbit index

y_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a Y to the right of the operator

Parameters

qbit (int) – a qbit index

z_left(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a Z to the left of the operator

Parameters

qbit (int) – a qbit index

z_right(self: qat.synthopline.interface.OperatorTableau, arg0: int) None

Applies a Z to the right of the operator

Parameters

qbit (int) – a qbit index