pytket.quipper

pytket.quipper#

Parser from Quipper ASCII to tket circuits

pytket.quipper.circuit_from_quipper(input_file: str) Circuit[source]#

Generate a pytket Circuit given a program in Quipper ASCII format. Limitations (due to current limitations of pytket):

  • Subroutines must be defined over the full set of qubits.

  • Global phases are ignored.

  • Only limited support for controlled gates (depending on the gate type).

  • No support for ‘QInit’ and ‘QTerm’. All qubits must run from the begining to the end of the circuit.

  • No support for the legacy keywords (‘QNot’, ‘QMultinot’, ‘QHad’, ‘QSwap’, ‘QW’). These are now represented in Quipper as types of ‘QGate’.

  • No support for ‘QMeas’ (which in Quipper converts a Q wire to a C wire).

  • No support for: ‘GPhase’ (global phase), ‘QPrep’, ‘QUnprep’, ‘QDiscard’, or ‘DTerm’.

  • No support for classical operations (‘CNot’, ‘CGate’, ‘CSwap’, ‘CInit’, ‘CTerm’, ‘CDiscard’).

Parameters:

input_file – name of file to read