2026-06-12

·

Pytket Integration for Marqov SDK

·

Quantum Computing

·

3 min read

About Marqov SDK

Marqov Software Development Kit (SDK) is an open source orchestration layer for heterogeneous computing. Marqov SDK allows users to interact with different quantum and classical backends and integrates with:

  • IBM Quantum
  • AWS Braket
  • Google Cloud
  • NVIDIA
  • Azure Quantum

During Unitary Hack 2026, a PR was opened to address issues #3 and #6, which enabled Quantinuum integration with the Marqov SDK. This article describes the work done to complete the integration successfully, as well as the code review process for releasing the changes to production.

About pytket

Pytket is a Python module used to interface with the quantum computing toolkit and optimising compiler TKET. More information about installation can be found here.

Adding pytket integration to Marqov SDK

This contribution adds pytket support to the Marqov SDK through Circuit.to_pytket() and a new QuantinuumExecutor wired in via the factory. Below, we cover the implementation, design decisions, and bug fixes required for production release.

Circuit.to_pytket() Method

The Marqov SDK translates Marqov circuits into native types:

  • to_qiskit() → Qiskit
  • to_braket() → Braket
  • to_pyquil() → PyQuil

Quantinuum support was not included when Unitary Hack 2026 started, hence issues #3 and #6 were opened. The first step was to add a to_pytket() method.

to_pytket() acts as a bridge between Marqov circuits and pytket (TKET) for compilation, noise analysis, and optimisation. Exporting to pytket is a prerequisite for QuantinuumExecutor.

The method is defined on the Circuit class in marqov/circuit.py. The Circuit class is a backend-agnostic quantum circuit that can be exported to Braket, Qiskit, and PyQuil.

Implementation

Like to_braket(), to_pytket() is an exporter returning a native pytket Circuit object. An ImportError is raised if pytket is not installed, and a NotImplementedError is raised if the circuit contains an unsupported gate after decomposition.

After a lazy import of qiskit_to_tk, self.to_qiskit() is called to produce an interim Qiskit QuantumCircuit. Subsequently, each instruction is validated against a list of supported gates _QISKIT_GATE_MAP. Unlike to_braket() which delegates the circuit directly to QuantumFlow, to_pytket() uses Qiskit as an intermediate representation to support conversion from Qiskit.

The loop walks through qiskit_circuit.data and inspects instruction.operation.name:


# Non-gate instructions to skip silently.
_SKIP_INSTRUCTIONS: set[str] = {"barrier", "measure", "reset", "delay"}

# Qiskit gate name -> Circuit fluent method mapping.
_QISKIT_GATE_MAP: dict[str, str] = {
    "h": "h",
    "x": "x",
    "y": "y",
    "z": "z",
    "s": "s",
    "t": "t",
    "rx": "rx",
    "ry": "ry",
    "rz": "rz",
    "cx": "cnot",
    "cz": "cz",
    "swap": "swap",
}

for instruction in qiskit_circuit.data:
    name = instruction.operation.name
    if name in self._SKIP_INSTRUCTIONS:
        continue
    if name not in self._QISKIT_GATE_MAP:
        raise NotImplementedError(
            f"Unsupported gate '{name}' after decomposition. "
            f"Supported gates: {', '.join(sorted(self._QISKIT_GATE_MAP))}"
        )

If all checks pass successfully, qiskit_to_tk(qiskit_circuit) is returned. The output of this method is then used by QuantinuumExecutor to submit jobs to Quantinuum via pytket-quantinuum.

QuantinuumExecutor Integration

Building on the to_pytket() implementation, the Quantinuum executor can be integrated into the SDK to run quantum circuits on Quantinuum devices. To do so marqov/executors/quantinuum.py was added by following the pattern of existing executors and the instructions in CONTRIBUTING.md. This required defining QuantinuumExecutor and QuantinuumExecutorConfig using pytket-quantinuum.

Similarly to ibm.py and braket.py, necessary libraries were imported, and QuantinuumExcutor was defined to inheret from BaseExecutor

Bugs & fixes

Count normalisation

run_in_executor / partial

Testing

Circuit converter tests

QuantinuumExecutor tests

Conclusions

References