deltakit.circuit.gates.TwoOperandGate#

class deltakit.circuit.gates.TwoOperandGate(operand1: UT | T, operand2: VT | T, *, tag: str | None = None)#

Bases: Gate, Generic[UT, VT]

Abstraction of a Clifford gate which take two generic operands.

Parameters:
  • operand1 (UT | T) – The first operand of this operation. If the argument is not a Qubit, SweepBit or MeasurementRecord then the input is made into a Qubit.

  • operand2 (VT | T) – The second operand of this operation. If the argument is not a Qubit, SweepBit or MeasurementRecord then the input is made into a Qubit.

stim_string#

The string that stim associates with this gate.

Type:

str

Methods#

TwoOperandGate.from_consecutive

Yield an class instance for each pair in a flattened sequence of data.

TwoOperandGate.stim_targets

Get the stim gate targets which define this operation.

TwoOperandGate.transform_qubits

Transform this gates's qubits according to the id mapping.