3737from catalyst .api_extensions import HybridAdjoint , HybridCtrl
3838from catalyst .compiler import get_lib_path
3939from catalyst .device import get_device_capabilities
40- from catalyst .device .qjit_device import CUSTOM_OPERATIONS , get_qjit_device_capabilities
40+ from catalyst .device .qjit_device import RUNTIME_OPERATIONS , get_qjit_device_capabilities
4141from catalyst .device .verification import validate_measurements
4242
4343# pylint: disable = unused-argument, unnecessary-lambda-assignment, unnecessary-lambda
@@ -290,7 +290,7 @@ def test_non_controllable_gate_hybridctrl(self):
290290 # Note: The HybridCtrl operator is not currently supported with the QJIT device, but the
291291 # verification structure is in place, so we test the verification of its nested operators by
292292 # adding HybridCtrl to the list of native gates for the custom base device and by patching
293- # the list of CUSTOM_OPERATIONS for the QJIT device to include HybridCtrl for this test.
293+ # the list of RUNTIME_OPERATIONS for the QJIT device to include HybridCtrl for this test.
294294
295295 @qml .qnode (
296296 get_custom_device (
@@ -302,12 +302,12 @@ def f(x: float):
302302 assert isinstance (op , HybridCtrl ), f"op expected to be HybridCtrl but got { type (op )} "
303303 return qml .expval (qml .PauliX (0 ))
304304
305- runtime_ops_with_qctrl = deepcopy (CUSTOM_OPERATIONS )
305+ runtime_ops_with_qctrl = deepcopy (RUNTIME_OPERATIONS )
306306 runtime_ops_with_qctrl ["HybridCtrl" ] = OperatorProperties (
307307 invertible = True , controllable = True , differentiable = True
308308 )
309309
310- with patch ("catalyst.device.qjit_device.CUSTOM_OPERATIONS " , runtime_ops_with_qctrl ):
310+ with patch ("catalyst.device.qjit_device.RUNTIME_OPERATIONS " , runtime_ops_with_qctrl ):
311311 with pytest .raises (CompileError , match = "PauliZ is not controllable" ):
312312 qjit (f )(1.2 )
313313
@@ -321,7 +321,7 @@ def test_hybridctrl_raises_error(self):
321321 """Test that a HybridCtrl operator is rejected by the verification."""
322322
323323 # TODO: If you are deleting this test because HybridCtrl support has been added, consider
324- # updating the tests that patch CUSTOM_OPERATIONS to inclue HybridCtrl accordingly
324+ # updating the tests that patch RUNTIME_OPERATIONS to inclue HybridCtrl accordingly
325325
326326 @qml .qnode (get_custom_device (non_controllable_gates = {"PauliZ" }, wires = 4 ))
327327 def f (x : float ):
@@ -391,7 +391,7 @@ def test_hybrid_ctrl_containing_adjoint(self, adjoint_type, unsupported_gate_att
391391 # Note: The HybridCtrl operator is not currently supported with the QJIT device, but the
392392 # verification structure is in place, so we test the verification of its nested operators by
393393 # adding HybridCtrl to the list of native gates for the custom base device and by patching
394- # the list of CUSTOM_OPERATIONS for the QJIT device to include HybridCtrl for this test.
394+ # the list of RUNTIME_OPERATIONS for the QJIT device to include HybridCtrl for this test.
395395
396396 def _ops (x , wires ):
397397 if adjoint_type == HybridAdjoint :
@@ -410,12 +410,12 @@ def f(x: float):
410410 assert isinstance (base , adjoint_type ), f"expected { adjoint_type } but got { type (op )} "
411411 return qml .expval (qml .PauliX (0 ))
412412
413- runtime_ops_with_qctrl = deepcopy (CUSTOM_OPERATIONS )
413+ runtime_ops_with_qctrl = deepcopy (RUNTIME_OPERATIONS )
414414 runtime_ops_with_qctrl ["HybridCtrl" ] = OperatorProperties (
415415 invertible = True , controllable = True , differentiable = True
416416 )
417417
418- with patch ("catalyst.device.qjit_device.CUSTOM_OPERATIONS " , runtime_ops_with_qctrl ):
418+ with patch ("catalyst.device.qjit_device.RUNTIME_OPERATIONS " , runtime_ops_with_qctrl ):
419419 with pytest .raises (CompileError , match = f"PauliZ is not { unsupported_gate_attribute } " ):
420420 qjit (f )(1.2 )
421421
@@ -434,7 +434,7 @@ def test_hybrid_adjoint_containing_hybrid_ctrl(self, ctrl_type, unsupported_gate
434434 # Note: The HybridCtrl operator is not currently supported with the QJIT device, but the
435435 # verification structure is in place, so we test the verification of its nested operators by
436436 # adding HybridCtrl to the list of native gates for the custom base device and by patching
437- # the list of CUSTOM_OPERATIONS for the QJIT device to include HybridCtrl for this test.
437+ # the list of RUNTIME_OPERATIONS for the QJIT device to include HybridCtrl for this test.
438438
439439 def _ops (x , wires ):
440440 if ctrl_type == HybridCtrl :
@@ -453,12 +453,12 @@ def f(x: float):
453453 assert isinstance (base , ctrl_type ), f"expected { ctrl_type } but got { type (op )} "
454454 return qml .expval (qml .PauliX (0 ))
455455
456- runtime_ops_with_qctrl = deepcopy (CUSTOM_OPERATIONS )
456+ runtime_ops_with_qctrl = deepcopy (RUNTIME_OPERATIONS )
457457 runtime_ops_with_qctrl ["HybridCtrl" ] = OperatorProperties (
458458 invertible = True , controllable = True , differentiable = True
459459 )
460460
461- with patch ("catalyst.device.qjit_device.CUSTOM_OPERATIONS " , runtime_ops_with_qctrl ):
461+ with patch ("catalyst.device.qjit_device.RUNTIME_OPERATIONS " , runtime_ops_with_qctrl ):
462462 with pytest .raises (CompileError , match = f"PauliZ is not { unsupported_gate_attribute } " ):
463463 qjit (f )(1.2 )
464464
0 commit comments