@@ -109,13 +109,13 @@ def measure_compile_catalyst(a: ParsedArguments) -> BenchmarkResult:
109109 """Catalyst compilation time measurement procedure"""
110110 import jax
111111 import jax .numpy as jnp
112- import pennylane as qml
112+ import pennylane as qp
113113 from jax .core import ShapedArray
114114
115115 from catalyst import qjit
116116
117117 versions = {
118- "pennylane" : qml .__version__ ,
118+ "pennylane" : qp .__version__ ,
119119 "jax" : jax .__version__ ,
120120 "catalyst" : catalyst_version (),
121121 }
@@ -126,7 +126,7 @@ def measure_compile_catalyst(a: ParsedArguments) -> BenchmarkResult:
126126 from catalyst_benchmark .test_cases .grover_catalyst import qcompile , workflow
127127
128128 p = Problem (
129- qml .device ("lightning.qubit" , wires = a .nqubits ),
129+ qp .device ("lightning.qubit" , wires = a .nqubits ),
130130 a .nlayers ,
131131 expansion_strategy = "device" ,
132132 )
@@ -135,7 +135,7 @@ def measure_compile_catalyst(a: ParsedArguments) -> BenchmarkResult:
135135 from catalyst_benchmark .test_cases .chemvqe_catalyst import qcompile , workflow
136136
137137 p = Problem (
138- qml .device ("lightning.qubit" , wires = a .nqubits ),
138+ qp .device ("lightning.qubit" , wires = a .nqubits ),
139139 diff_method = a .vqe_diff_method ,
140140 expansion_strategy = "device" ,
141141 )
@@ -145,7 +145,7 @@ def measure_compile_catalyst(a: ParsedArguments) -> BenchmarkResult:
145145 from catalyst_benchmark .test_cases .chemvqe_catalyst import workflow_hybrid as workflow
146146
147147 p = Problem (
148- qml .device ("lightning.qubit" , wires = a .nqubits ),
148+ qp .device ("lightning.qubit" , wires = a .nqubits ),
149149 diff_method = a .vqe_diff_method ,
150150 expansion_strategy = "device" ,
151151 )
@@ -154,7 +154,7 @@ def measure_compile_catalyst(a: ParsedArguments) -> BenchmarkResult:
154154 from catalyst_benchmark .test_cases .qft_catalyst import qcompile , workflow
155155
156156 p = Problem (
157- qml .device ("lightning.qubit" , wires = a .nqubits ), a .nlayers , expansion_strategy = "device"
157+ qp .device ("lightning.qubit" , wires = a .nqubits ), a .nlayers , expansion_strategy = "device"
158158 )
159159 else :
160160 raise NotImplementedError (f"Unsupported problem { a .problem } " )
@@ -185,13 +185,13 @@ def measure_runtime_catalyst(a: ParsedArguments) -> BenchmarkResult:
185185 """Catalyst running time measurement procedure"""
186186 import jax
187187 import jax .numpy as jnp
188- import pennylane as qml
188+ import pennylane as qp
189189 from jax .core import ShapedArray
190190
191191 from catalyst import qjit
192192
193193 versions = {
194- "pennylane" : qml .__version__ ,
194+ "pennylane" : qp .__version__ ,
195195 "jax" : jax .__version__ ,
196196 "catalyst" : catalyst_version (),
197197 }
@@ -201,25 +201,25 @@ def measure_runtime_catalyst(a: ParsedArguments) -> BenchmarkResult:
201201 from catalyst_benchmark .test_cases .grover_catalyst import ProblemC as Problem
202202 from catalyst_benchmark .test_cases .grover_catalyst import qcompile , workflow
203203
204- p = Problem (qml .device ("lightning.qubit" , wires = a .nqubits ), a .nlayers )
204+ p = Problem (qp .device ("lightning.qubit" , wires = a .nqubits ), a .nlayers )
205205
206206 elif a .problem == "chemvqe" :
207207 from catalyst_benchmark .test_cases .chemvqe_catalyst import ProblemCVQE as Problem
208208 from catalyst_benchmark .test_cases .chemvqe_catalyst import qcompile , workflow
209209
210- p = Problem (qml .device ("lightning.qubit" , wires = a .nqubits ), diff_method = a .vqe_diff_method )
210+ p = Problem (qp .device ("lightning.qubit" , wires = a .nqubits ), diff_method = a .vqe_diff_method )
211211 elif a .problem == "chemvqe-hybrid" :
212212 from catalyst_benchmark .test_cases .chemvqe_catalyst import ProblemCVQE as Problem
213213 from catalyst_benchmark .test_cases .chemvqe_catalyst import qcompile_hybrid as qcompile
214214 from catalyst_benchmark .test_cases .chemvqe_catalyst import workflow_hybrid as workflow
215215
216- p = Problem (qml .device ("lightning.qubit" , wires = a .nqubits ), diff_method = a .vqe_diff_method )
216+ p = Problem (qp .device ("lightning.qubit" , wires = a .nqubits ), diff_method = a .vqe_diff_method )
217217 elif a .problem == "qft" :
218218 from catalyst_benchmark .test_cases .qft_catalyst import ProblemC as Problem
219219 from catalyst_benchmark .test_cases .qft_catalyst import qcompile , workflow
220220
221221 p = Problem (
222- qml .device ("lightning.qubit" , wires = a .nqubits ),
222+ qp .device ("lightning.qubit" , wires = a .nqubits ),
223223 a .nlayers ,
224224 )
225225 else :
@@ -253,9 +253,9 @@ def _main(weights: ShapedArray(weights.shape, dtype=jnp.float64)):
253253def measure_compile_pennylanejax (a : ParsedArguments ) -> BenchmarkResult :
254254 """PennyLane/Jax compilation time measurement procedure"""
255255 import jax
256- import pennylane as qml
256+ import pennylane as qp
257257
258- versions = {"pennylane" : qml .__version__ , "jax" : jax .__version__ }
258+ versions = {"pennylane" : qp .__version__ , "jax" : jax .__version__ }
259259
260260 jax .config .update ("jax_enable_x64" , True )
261261 jax .config .update ("jax_platform_name" , "cpu" )
@@ -269,7 +269,7 @@ def measure_compile_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
269269 from catalyst_benchmark .test_cases .grover_pennylane import qcompile , size , workflow
270270
271271 p = Problem (
272- qml .device (device , wires = a .nqubits ),
272+ qp .device (device , wires = a .nqubits ),
273273 a .nlayers ,
274274 interface = interface ,
275275 expansion_strategy = "device" ,
@@ -280,7 +280,7 @@ def measure_compile_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
280280 from catalyst_benchmark .test_cases .chemvqe_pennylane import qcompile , size , workflow
281281
282282 p = Problem (
283- qml .device (device , wires = a .nqubits ),
283+ qp .device (device , wires = a .nqubits ),
284284 grad = jax .grad ,
285285 interface = interface ,
286286 diff_method = a .vqe_diff_method ,
@@ -293,7 +293,7 @@ def measure_compile_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
293293 from catalyst_benchmark .test_cases .chemvqe_pennylane import workflow_hybrid as workflow
294294
295295 p = Problem (
296- qml .device (device , wires = a .nqubits ),
296+ qp .device (device , wires = a .nqubits ),
297297 grad = jax .grad ,
298298 interface = interface ,
299299 diff_method = a .vqe_diff_method ,
@@ -304,7 +304,7 @@ def measure_compile_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
304304 from catalyst_benchmark .test_cases .qft_pennylane import qcompile , size , workflow
305305
306306 p = Problem (
307- qml .device (device , wires = a .nqubits ),
307+ qp .device (device , wires = a .nqubits ),
308308 interface = interface ,
309309 nlayers = a .nlayers ,
310310 expansion_strategy = "device" ,
@@ -338,9 +338,9 @@ def _main(weights):
338338def measure_runtime_pennylanejax (a : ParsedArguments ) -> BenchmarkResult :
339339 """Pennylane/Jax running time measurement procedure"""
340340 import jax
341- import pennylane as qml
341+ import pennylane as qp
342342
343- versions = {"pennylane" : qml .__version__ , "jax" : jax .__version__ }
343+ versions = {"pennylane" : qp .__version__ , "jax" : jax .__version__ }
344344
345345 jax .config .update ("jax_enable_x64" , True )
346346 jax .config .update ("jax_platform_name" , "cpu" )
@@ -353,14 +353,14 @@ def measure_runtime_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
353353 from catalyst_benchmark .test_cases .grover_pennylane import ProblemPL as Problem
354354 from catalyst_benchmark .test_cases .grover_pennylane import qcompile , size , workflow
355355
356- p = Problem (qml .device (device , wires = a .nqubits ), a .nlayers , interface = interface )
356+ p = Problem (qp .device (device , wires = a .nqubits ), a .nlayers , interface = interface )
357357
358358 elif a .problem == "chemvqe" :
359359 from catalyst_benchmark .test_cases .chemvqe_pennylane import ProblemCVQE as Problem
360360 from catalyst_benchmark .test_cases .chemvqe_pennylane import qcompile , size , workflow
361361
362362 p = Problem (
363- qml .device (device , wires = a .nqubits ),
363+ qp .device (device , wires = a .nqubits ),
364364 grad = jax .grad ,
365365 interface = interface ,
366366 diff_method = a .vqe_diff_method ,
@@ -372,7 +372,7 @@ def measure_runtime_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
372372 from catalyst_benchmark .test_cases .chemvqe_pennylane import workflow_hybrid as workflow
373373
374374 p = Problem (
375- qml .device (device , wires = a .nqubits ),
375+ qp .device (device , wires = a .nqubits ),
376376 grad = jax .grad ,
377377 interface = interface ,
378378 diff_method = a .vqe_diff_method ,
@@ -381,7 +381,7 @@ def measure_runtime_pennylanejax(a: ParsedArguments) -> BenchmarkResult:
381381 from catalyst_benchmark .test_cases .qft_pennylane import ProblemPL as Problem
382382 from catalyst_benchmark .test_cases .qft_pennylane import qcompile , size , workflow
383383
384- p = Problem (qml .device (device , wires = a .nqubits ), interface = interface , nlayers = a .nlayers )
384+ p = Problem (qp .device (device , wires = a .nqubits ), interface = interface , nlayers = a .nlayers )
385385
386386 else :
387387 raise NotImplementedError (f"Unsupported problme { a .problem } " )
@@ -412,9 +412,9 @@ def _main(weights):
412412
413413def measure_compile_pennylane (a : ParsedArguments ) -> BenchmarkResult :
414414 """PennyLane compilation time measurement procedure"""
415- import pennylane as qml
415+ import pennylane as qp
416416
417- versions = {"pennylane" : qml .__version__ }
417+ versions = {"pennylane" : qp .__version__ }
418418
419419 _ , device , interface = parse_implementation (a .implementation )
420420
@@ -424,7 +424,7 @@ def measure_compile_pennylane(a: ParsedArguments) -> BenchmarkResult:
424424 from catalyst_benchmark .test_cases .grover_pennylane import qcompile , size , workflow
425425
426426 p = Problem (
427- qml .device (device , wires = a .nqubits ),
427+ qp .device (device , wires = a .nqubits ),
428428 a .nlayers ,
429429 interface = interface ,
430430 expansion_strategy = "device" ,
@@ -434,8 +434,8 @@ def measure_compile_pennylane(a: ParsedArguments) -> BenchmarkResult:
434434 from catalyst_benchmark .test_cases .chemvqe_pennylane import qcompile , size , workflow
435435
436436 p = Problem (
437- qml .device (device , wires = a .nqubits ),
438- grad = partial (qml .grad , argnum = 0 ),
437+ qp .device (device , wires = a .nqubits ),
438+ grad = partial (qp .grad , argnum = 0 ),
439439 diff_method = a .vqe_diff_method ,
440440 expansion_strategy = "device" ,
441441 )
@@ -446,8 +446,8 @@ def measure_compile_pennylane(a: ParsedArguments) -> BenchmarkResult:
446446 from catalyst_benchmark .test_cases .chemvqe_pennylane import workflow_hybrid as workflow
447447
448448 p = Problem (
449- qml .device (device , wires = a .nqubits ),
450- grad = partial (qml .grad , argnum = 0 ),
449+ qp .device (device , wires = a .nqubits ),
450+ grad = partial (qp .grad , argnum = 0 ),
451451 diff_method = a .vqe_diff_method ,
452452 expansion_strategy = "device" ,
453453 )
@@ -456,7 +456,7 @@ def measure_compile_pennylane(a: ParsedArguments) -> BenchmarkResult:
456456 from catalyst_benchmark .test_cases .qft_pennylane import qcompile , size , workflow
457457
458458 p = Problem (
459- qml .device (device , wires = a .nqubits ),
459+ qp .device (device , wires = a .nqubits ),
460460 interface = interface ,
461461 nlayers = a .nlayers ,
462462 expansion_strategy = "device" ,
@@ -482,9 +482,9 @@ def measure_compile_pennylane(a: ParsedArguments) -> BenchmarkResult:
482482
483483def measure_runtime_pennylane (a : ParsedArguments ) -> BenchmarkResult :
484484 """PennyLanem running time measurement procedure"""
485- import pennylane as qml
485+ import pennylane as qp
486486
487- versions = {"pennylane" : qml .__version__ }
487+ versions = {"pennylane" : qp .__version__ }
488488
489489 _ , device , interface = parse_implementation (a .implementation )
490490
@@ -493,14 +493,14 @@ def measure_runtime_pennylane(a: ParsedArguments) -> BenchmarkResult:
493493 from catalyst_benchmark .test_cases .grover_pennylane import ProblemPL as Problem
494494 from catalyst_benchmark .test_cases .grover_pennylane import qcompile , size , workflow
495495
496- p = Problem (qml .device (device , wires = a .nqubits ), a .nlayers )
496+ p = Problem (qp .device (device , wires = a .nqubits ), a .nlayers )
497497 elif a .problem == "chemvqe" :
498498 from catalyst_benchmark .test_cases .chemvqe_pennylane import ProblemCVQE as Problem
499499 from catalyst_benchmark .test_cases .chemvqe_pennylane import qcompile , size , workflow
500500
501501 p = Problem (
502- qml .device (device , wires = a .nqubits ),
503- grad = partial (qml .grad , argnum = 0 ),
502+ qp .device (device , wires = a .nqubits ),
503+ grad = partial (qp .grad , argnum = 0 ),
504504 diff_method = a .vqe_diff_method ,
505505 )
506506 elif a .problem == "chemvqe-hybrid" :
@@ -510,16 +510,16 @@ def measure_runtime_pennylane(a: ParsedArguments) -> BenchmarkResult:
510510 from catalyst_benchmark .test_cases .chemvqe_pennylane import workflow_hybrid as workflow
511511
512512 p = Problem (
513- qml .device (device , wires = a .nqubits ),
514- grad = partial (qml .grad , argnum = 0 ),
513+ qp .device (device , wires = a .nqubits ),
514+ grad = partial (qp .grad , argnum = 0 ),
515515 diff_method = a .vqe_diff_method ,
516516 )
517517 elif a .problem == "qft" :
518518 from catalyst_benchmark .test_cases .qft_pennylane import ProblemPL as Problem
519519 from catalyst_benchmark .test_cases .qft_pennylane import qcompile , size , workflow
520520
521521 p = Problem (
522- qml .device (device , wires = a .nqubits ),
522+ qp .device (device , wires = a .nqubits ),
523523 interface = interface ,
524524 nlayers = a .nlayers ,
525525 )
0 commit comments