From 4c649d29a31641bb8a3d15d5bcc2e2436c830ec5 Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Mon, 23 Oct 2023 16:58:47 +0100 Subject: [PATCH] add "tket2" extension suffix for quantum ops --- guppy/prelude/quantum.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/guppy/prelude/quantum.py b/guppy/prelude/quantum.py index 22c18430..c0fcea8d 100644 --- a/guppy/prelude/quantum.py +++ b/guppy/prelude/quantum.py @@ -2,7 +2,6 @@ # mypy: disable-error-code=empty-body -from guppy.guppy_types import GuppyType from guppy.hugr.tys import TypeBound from guppy.prelude import builtin from guppy.extension import GuppyExtension, OpCompiler @@ -10,14 +9,14 @@ class QuantumOpCompiler(OpCompiler): - def __init__(self, op_name: str, ext: str = "quantum"): + def __init__(self, op_name: str, ext: str = "quantum.tket2"): super().__init__(ops.CustomOp(extension=ext, op_name=op_name, args=[])) _hugr_qubit = tys.Opaque(extension="prelude", id="qubit", args=[], bound=TypeBound.Any) -extension = GuppyExtension("quantum", dependencies=[builtin]) +extension = GuppyExtension("quantum.tket2", dependencies=[builtin]) @extension.type(_hugr_qubit, linear=True)