@@ -370,10 +370,10 @@ def expval5(x: float, y: float):
370370print (expval5 .mlir )
371371
372372
373- # CHECK-LABEL: public @expval5 (
373+ # CHECK-LABEL: public @expval6 (
374374@qjit (target = "mlir" )
375375@qml .qnode (qml .device ("lightning.qubit" , wires = 3 ))
376- def expval5 (x : float , y : float ):
376+ def expval6 (x : float , y : float ):
377377 # CHECK: [[q0:%.+]] = quantum.custom "RX"
378378 qml .RX (x , wires = 0 )
379379 # CHECK: [[q1:%.+]] = quantum.custom "RY"
@@ -395,13 +395,13 @@ def expval5(x: float, y: float):
395395 return qml .expval (qml .Hamiltonian (coeffs , obs ))
396396
397397
398- print (expval5 .mlir )
398+ print (expval6 .mlir )
399399
400400
401- # CHECK-LABEL: public @expval6 (
401+ # CHECK-LABEL: public @expval7 (
402402@qjit (target = "mlir" )
403403@qml .qnode (qml .device ("lightning.qubit" , wires = 2 ))
404- def expval6 (x : float ):
404+ def expval7 (x : float ):
405405 # CHECK: [[q0:%.+]] = quantum.custom "RX"
406406 qml .RX (x , wires = 0 )
407407
@@ -424,27 +424,27 @@ def expval6(x: float):
424424 return qml .expval (qml .Hamiltonian (coeff , [obs , qml .PauliX (0 )]))
425425
426426
427- print (expval6 .mlir )
427+ print (expval7 .mlir )
428428
429429
430- # CHECK-LABEL: public @expval7 (
430+ # CHECK-LABEL: public @expval8 (
431431@qjit (target = "mlir" )
432432@qml .qnode (qml .device ("lightning.qubit" , wires = 2 ))
433- def expval7 ():
433+ def expval8 ():
434434 A = np .array ([[complex (1.0 , 0.0 ), complex (2.0 , 0.0 )], [complex (2.0 , 0.0 ), complex (1.0 , 0.0 )]])
435435
436436 # CHECK: [[obs:%.+]] = quantum.hermitian
437437 # CHECK: quantum.expval [[obs]] : f64
438438 return qml .expval (qml .Hermitian (A , wires = 0 ))
439439
440440
441- print (expval7 .mlir )
441+ print (expval8 .mlir )
442442
443443
444- # CHECK-LABEL: public @expval8 (
444+ # CHECK-LABEL: public @expval9 (
445445@qjit (target = "mlir" )
446446@qml .qnode (qml .device ("lightning.qubit" , wires = 2 ))
447- def expval8 ():
447+ def expval9 ():
448448 B = np .array (
449449 [
450450 [complex (1.0 , 0.0 ), complex (2.0 , 0.0 ), complex (1.0 , 0.0 ), complex (2.0 , 0.0 )],
@@ -459,13 +459,13 @@ def expval8():
459459 return qml .expval (qml .Hermitian (B , wires = [0 , 1 ]))
460460
461461
462- print (expval8 .mlir )
462+ print (expval9 .mlir )
463463
464464
465- # CHECK-LABEL: public @expval9 (
465+ # CHECK-LABEL: public @expval10 (
466466@qjit (target = "mlir" )
467467@qml .qnode (qml .device ("lightning.qubit" , wires = 3 ))
468- def expval9 (x : float , y : float ):
468+ def expval10 (x : float , y : float ):
469469 # CHECK: [[q0:%.+]] = quantum.custom "RX"
470470 qml .RX (x , wires = 0 )
471471 # CHECK: [[q1:%.+]] = quantum.custom "RY"
@@ -481,13 +481,13 @@ def expval9(x: float, y: float):
481481 return qml .expval (qml .PauliX (0 ) @ qml .PauliZ (1 ) @ qml .Hadamard (2 ))
482482
483483
484- print (expval9 .mlir )
484+ print (expval10 .mlir )
485485
486486
487- # CHECK-LABEL: public @expval10 (
487+ # CHECK-LABEL: public @expval11 (
488488@qjit (target = "mlir" )
489489@qml .qnode (qml .device ("lightning.qubit" , wires = 3 ))
490- def expval10 (x : float , y : float ):
490+ def expval11 (x : float , y : float ):
491491 # CHECK: [[q0:%.+]] = quantum.custom "RX"
492492 qml .RX (x , wires = 0 )
493493 # CHECK: [[q1:%.+]] = quantum.custom "RY"
@@ -511,12 +511,12 @@ def expval10(x: float, y: float):
511511 return qml .expval (qml .PauliX (1 ) @ qml .Hermitian (B , wires = [0 , 2 ]))
512512
513513
514- print (expval10 .mlir )
514+ print (expval11 .mlir )
515515
516516
517- # CHECK-LABEL: @expval11
517+ # CHECK-LABEL: @expval12
518518@qjit (target = "mlir" )
519- def expval11 (num_qubits ):
519+ def expval12 (num_qubits ):
520520 # CHECK: func.func public @circ(%arg0: tensor<i64>) -> tensor<f64>
521521 @qml .qnode (qml .device ("lightning.qubit" , wires = num_qubits ))
522522 def circ ():
@@ -542,8 +542,8 @@ def circ():
542542 return circ ()
543543
544544
545- _ = expval11 (10 )
546- print (expval11 .mlir )
545+ _ = expval12 (10 )
546+ print (expval12 .mlir )
547547
548548
549549# CHECK-LABEL: public @var1(
0 commit comments