quri_parts.tket.circuit.circuit_converter module

convert_gate(gate)

Convert a QURI Parts gate to a tket operation.

Parameters:

gate (QuantumGate) – Gate to convert.

Returns:

A tket operation whose qubit arguments follow the gate’s control indices and then its target indices.

Raises:
  • ValueError – If the gate is parametric or a unitary matrix gate acts on more than three qubits.

  • NotImplementedError – If the gate type has no supported conversion.

Return type:

Op

convert_circuit(circuit)

Convert a QURI Parts circuit to a tket circuit.

Parameters:

circuit (ImmutableQuantumCircuit) – Circuit to convert.

Returns:

A tket circuit with the converted gates and the same qubit count.

Raises:
  • ValueError – If a gate is parametric or a unitary matrix gate acts on more than three qubits.

  • NotImplementedError – If a gate type has no supported conversion.

Return type:

Circuit