Hello @maliasadi ,
thanks for your reply. I followed your instructions but still have the same issue. If you need more information than the qml.about() and the error msg. feel free to approach me.
qml.about()
Name: PennyLane
Version: 0.41.1
Summary: PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Home-page: https://github.com/PennyLaneAI/pennylane
Author:
Author-email:
License: Apache License 2.0
Location: /home/jovyan/.local/lib/python3.11/site-packages
Requires: appdirs, autograd, autoray, cachetools, diastatic-malt, networkx, numpy, packaging, pennylane-lightning, requests, rustworkx, scipy, tomlkit, typing-extensions
Required-by: PennyLane-Catalyst, PennyLane_Lightning, PennyLane_Lightning_GPU, PennyLane_Lightning_Kokkos
Platform info: Linux-5.15.0-142-generic-x86_64-with-glibc2.35
Python version: 3.11.10
Numpy version: 2.3.2
Scipy version: 1.16.1
Installed devices:
- nvidia.custatevec (PennyLane-Catalyst-0.11.0)
- nvidia.cutensornet (PennyLane-Catalyst-0.11.0)
- oqc.cloud (PennyLane-Catalyst-0.11.0)
- softwareq.qpp (PennyLane-Catalyst-0.11.0)
- lightning.gpu (PennyLane_Lightning_GPU-0.41.1)
- default.clifford (PennyLane-0.41.1)
- default.gaussian (PennyLane-0.41.1)
- default.mixed (PennyLane-0.41.1)
- default.qubit (PennyLane-0.41.1)
- default.qutrit (PennyLane-0.41.1)
- default.qutrit.mixed (PennyLane-0.41.1)
- default.tensor (PennyLane-0.41.1)
- null.qubit (PennyLane-0.41.1)
- reference.qubit (PennyLane-0.41.1)
- lightning.qubit (PennyLane_Lightning-0.41.1)
- lightning.kokkos (PennyLane_Lightning_Kokkos-0.41.1)
Error:
[LIB] Running compiler driver in /tmp/vmap.circuitudc846z1
[SYSTEM] /opt/conda/bin/catalyst -o /tmp/vmap.circuitudc846z1/vmap.circuit.ll --module-name vmap.circuit --workspace /tmp/vmap.circuitudc846z1 -verify-each=false --catalyst-pipeline EnforceRuntimeInvariantsPass(split-multiple-tapes;builtin.module(apply-transform-sequence);inline-nested-module),HLOLoweringPass(canonicalize;func.func(chlo-legalize-to-hlo);stablehlo-legalize-to-hlo;func.func(mhlo-legalize-control-flow);func.func(hlo-legalize-to-linalg);func.func(mhlo-legalize-to-std);func.func(hlo-legalize-sort);convert-to-signless;canonicalize;scatter-lowering;hlo-custom-call-lowering;cse;func.func(linalg-detensorize{aggressive-mode});detensorize-scf;canonicalize),QuantumCompilationPass(annotate-function;lower-mitigation;lower-gradients;adjoint-lowering),BufferizationPass(one-shot-bufferize{dialect-filter=memref};inline;gradient-preprocess;gradient-bufferize;scf-bufferize;convert-tensor-to-linalg;convert-elementwise-to-linalg;arith-bufferize;empty-tensor-to-alloc-tensor;func.func(bufferization-bufferize);func.func(tensor-bufferize);catalyst-bufferize;func.func(linalg-bufferize);func.func(tensor-bufferize);quantum-bufferize;func-bufferize;func.func(finalizing-bufferize);canonicalize;gradient-postprocess;func.func(buffer-hoisting);func.func(buffer-loop-hoisting);func.func(buffer-deallocation);convert-arraylist-to-memref;convert-bufferization-to-memref;canonicalize;cp-global-memref),MLIRToLLVMDialect(expand-realloc;convert-gradient-to-llvm;memrefcpy-to-linalgcpy;func.func(convert-linalg-to-loops);convert-scf-to-cf;expand-strided-metadata;lower-affine;arith-expand;convert-complex-to-standard;convert-complex-to-llvm;convert-math-to-llvm;convert-math-to-libm;convert-arith-to-llvm;memref-to-llvm-tbaa;finalize-memref-to-llvm{use-generic-functions};convert-index-to-llvm;convert-catalyst-to-llvm;convert-quantum-to-llvm;emit-catalyst-py-interface;canonicalize;reconcile-unrealized-casts;gep-inbounds;register-inactive-callback), --verbose /tmp/vmap.circuitudc846z1/tmpb1ay7f59.mlir
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
File ~/.local/lib/python3.11/site-packages/catalyst/compiler.py:444, in Compiler.run_from_ir(self, ir, module_name, workspace)
443 print(f"[SYSTEM] {' '.join(cmd)}", file=self.options.logfile)
--> 444 result = subprocess.run(cmd, check=True, capture_output=True, text=True)
445 if self.options.verbose or os.getenv("ENABLE_DIAGNOSTICS"):
File /opt/conda/lib/python3.11/subprocess.py:571, in run(input, capture_output, timeout, check, *popenargs, **kwargs)
570 if check and retcode:
--> 571 raise CalledProcessError(retcode, process.args,
572 output=stdout, stderr=stderr)
573 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['/opt/conda/bin/catalyst', '-o', '/tmp/vmap.circuitudc846z1/vmap.circuit.ll', '--module-name', 'vmap.circuit', '--workspace', '/tmp/vmap.circuitudc846z1', '-verify-each=false', '--catalyst-pipeline', 'EnforceRuntimeInvariantsPass(split-multiple-tapes;builtin.module(apply-transform-sequence);inline-nested-module),HLOLoweringPass(canonicalize;func.func(chlo-legalize-to-hlo);stablehlo-legalize-to-hlo;func.func(mhlo-legalize-control-flow);func.func(hlo-legalize-to-linalg);func.func(mhlo-legalize-to-std);func.func(hlo-legalize-sort);convert-to-signless;canonicalize;scatter-lowering;hlo-custom-call-lowering;cse;func.func(linalg-detensorize{aggressive-mode});detensorize-scf;canonicalize),QuantumCompilationPass(annotate-function;lower-mitigation;lower-gradients;adjoint-lowering),BufferizationPass(one-shot-bufferize{dialect-filter=memref};inline;gradient-preprocess;gradient-bufferize;scf-bufferize;convert-tensor-to-linalg;convert-elementwise-to-linalg;arith-bufferize;empty-tensor-to-alloc-tensor;func.func(bufferization-bufferize);func.func(tensor-bufferize);catalyst-bufferize;func.func(linalg-bufferize);func.func(tensor-bufferize);quantum-bufferize;func-bufferize;func.func(finalizing-bufferize);canonicalize;gradient-postprocess;func.func(buffer-hoisting);func.func(buffer-loop-hoisting);func.func(buffer-deallocation);convert-arraylist-to-memref;convert-bufferization-to-memref;canonicalize;cp-global-memref),MLIRToLLVMDialect(expand-realloc;convert-gradient-to-llvm;memrefcpy-to-linalgcpy;func.func(convert-linalg-to-loops);convert-scf-to-cf;expand-strided-metadata;lower-affine;arith-expand;convert-complex-to-standard;convert-complex-to-llvm;convert-math-to-llvm;convert-math-to-libm;convert-arith-to-llvm;memref-to-llvm-tbaa;finalize-memref-to-llvm{use-generic-functions};convert-index-to-llvm;convert-catalyst-to-llvm;convert-quantum-to-llvm;emit-catalyst-py-interface;canonicalize;reconcile-unrealized-casts;gep-inbounds;register-inactive-callback),', '--verbose', '/tmp/vmap.circuitudc846z1/tmpb1ay7f59.mlir']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
CompileError Traceback (most recent call last)
Cell In[2], line 1
----> 1 circuit(data)
File ~/.local/lib/python3.11/site-packages/pennylane/logging/decorators.py:61, in log_string_debug_func.<locals>.wrapper_entry(*args, **kwargs)
54 s_caller = "::L".join(
55 [str(i) for i in inspect.getouterframes(inspect.currentframe(), 2)[1][1:3]]
56 )
57 lgr.debug(
58 f"Calling {f_string} from {s_caller}",
59 **_debug_log_kwargs,
60 )
---> 61 return func(*args, **kwargs)
File ~/.local/lib/python3.11/site-packages/catalyst/jit.py:594, in QJIT.__call__(self, *args, **kwargs)
590 kwargs = {"static_argnums": self.compile_options.static_argnums, **kwargs}
592 return self.user_function(*args, **kwargs)
--> 594 requires_promotion = self.jit_compile(args, **kwargs)
596 # If we receive tracers as input, dispatch to the JAX integration.
597 if any(isinstance(arg, jax.core.Tracer) for arg in tree_flatten(args)[0]):
File ~/.local/lib/python3.11/site-packages/pennylane/logging/decorators.py:61, in log_string_debug_func.<locals>.wrapper_entry(*args, **kwargs)
54 s_caller = "::L".join(
55 [str(i) for i in inspect.getouterframes(inspect.currentframe(), 2)[1][1:3]]
56 )
57 lgr.debug(
58 f"Calling {f_string} from {s_caller}",
59 **_debug_log_kwargs,
60 )
---> 61 return func(*args, **kwargs)
File ~/.local/lib/python3.11/site-packages/catalyst/jit.py:670, in QJIT.jit_compile(self, args, **kwargs)
667 self.jaxpr, self.out_type, self.out_treedef, self.c_sig = self.capture(args, **kwargs)
669 self.mlir_module = self.generate_ir()
--> 670 self.compiled_function, _ = self.compile()
672 self.fn_cache.insert(self.compiled_function, args, self.out_treedef, self.workspace)
674 elif self.compiled_function is not cached_fn.compiled_fn:
675 # Restore active state from cache.
File ~/.local/lib/python3.11/site-packages/catalyst/debug/instruments.py:145, in instrument.<locals>.wrapper(*args, **kwargs)
142 @functools.wraps(fn)
143 def wrapper(*args, **kwargs):
144 if not InstrumentSession.active:
--> 145 return fn(*args, **kwargs)
147 with ResultReporter(stage_name, has_finegrained) as reporter:
148 self = args[0]
File ~/.local/lib/python3.11/site-packages/pennylane/logging/decorators.py:61, in log_string_debug_func.<locals>.wrapper_entry(*args, **kwargs)
54 s_caller = "::L".join(
55 [str(i) for i in inspect.getouterframes(inspect.currentframe(), 2)[1][1:3]]
56 )
57 lgr.debug(
58 f"Calling {f_string} from {s_caller}",
59 **_debug_log_kwargs,
60 )
---> 61 return func(*args, **kwargs)
File ~/.local/lib/python3.11/site-packages/catalyst/jit.py:799, in QJIT.compile(self)
793 shared_object, llvm_ir = self.compiler.run_from_ir(
794 self.overwrite_ir,
795 str(self.mlir_module.operation.attributes["sym_name"]).replace('"', ""),
796 self.workspace,
797 )
798 else:
--> 799 shared_object, llvm_ir = self.compiler.run(self.mlir_module, self.workspace)
801 compiled_fn = CompiledFunction(
802 shared_object, func_name, restype, self.out_type, self.compile_options
803 )
805 return compiled_fn, llvm_ir
File ~/.local/lib/python3.11/site-packages/pennylane/logging/decorators.py:61, in log_string_debug_func.<locals>.wrapper_entry(*args, **kwargs)
54 s_caller = "::L".join(
55 [str(i) for i in inspect.getouterframes(inspect.currentframe(), 2)[1][1:3]]
56 )
57 lgr.debug(
58 f"Calling {f_string} from {s_caller}",
59 **_debug_log_kwargs,
60 )
---> 61 return func(*args, **kwargs)
File ~/.local/lib/python3.11/site-packages/catalyst/compiler.py:486, in Compiler.run(self, mlir_module, *args, **kwargs)
470 @debug_logger
471 def run(self, mlir_module, *args, **kwargs):
472 """Compile an MLIR module to a shared object.
473
474 .. note::
(...) 483 (str): filename of shared object
484 """
--> 486 return self.run_from_ir(
487 mlir_module.operation.get_asm(
488 binary=False, print_generic_op_form=False, assume_verified=True
489 ),
490 str(mlir_module.operation.attributes["sym_name"]).replace('"', ""),
491 *args,
492 **kwargs,
493 )
File ~/.local/lib/python3.11/site-packages/pennylane/logging/decorators.py:61, in log_string_debug_func.<locals>.wrapper_entry(*args, **kwargs)
54 s_caller = "::L".join(
55 [str(i) for i in inspect.getouterframes(inspect.currentframe(), 2)[1][1:3]]
56 )
57 lgr.debug(
58 f"Calling {f_string} from {s_caller}",
59 **_debug_log_kwargs,
60 )
---> 61 return func(*args, **kwargs)
File ~/.local/lib/python3.11/site-packages/catalyst/compiler.py:451, in Compiler.run_from_ir(self, ir, module_name, workspace)
449 print(result.stderr.strip(), file=self.options.logfile)
450 except subprocess.CalledProcessError as e: # pragma: nocover
--> 451 raise CompileError(f"catalyst failed with error code {e.returncode}: {e.stderr}") from e
453 if os.path.exists(output_ir_name):
454 with open(output_ir_name, "r", encoding="utf-8") as f:
CompileError: catalyst failed with error code 1: Compilation failed:
vmap.circuit:108:7: error: 'quantum.device' op requires attribute 'device_name'
"quantum.device"(%0) {kwargs = "{'shots': 0, 'mcmc': False, 'num_burnin': 0, 'kernel_name': None}", lib = "/home/jovyan/.local/lib/python3.11/site-packages/pennylane_lightning/liblightning_qubit_catalyst.so", name = "LightningSimulator"} : (i64) -> ()
^
vmap.circuit:108:7: note: diagnostic emitted with trace:
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 catalyst 0x000000000ab8194b llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
1 catalyst 0x000000000a9a95d0
2 catalyst 0x000000000a9a9761 mlir::emitError(mlir::Location, llvm::Twine const&) + 17
3 catalyst 0x000000000aa00e19 mlir::Operation::emitError(llvm::Twine const&) + 25
4 catalyst 0x000000000aa01164 mlir::Operation::emitOpError(llvm::Twine const&) + 52
5 catalyst 0x000000000aa026ac mlir::OpState::emitOpError(llvm::Twine const&) + 12
6 catalyst 0x000000000646704f catalyst::quantum::DeviceInitOp::verifyInvariantsImpl() + 175
7 catalyst 0x00000000064371ff
8 catalyst 0x0000000006440fbc
9 catalyst 0x000000000aa304cf
10 catalyst 0x000000000aa31b56
11 catalyst 0x000000000aa2f8f0
12 catalyst 0x000000000aa31b56
13 catalyst 0x000000000aa2f8f0
14 catalyst 0x000000000aa31b56
15 catalyst 0x000000000aa2f8f0
16 catalyst 0x000000000aa32bc4 mlir::verify(mlir::Operation*, bool) + 36
17 catalyst 0x0000000009aaeed2 mlir::parseAsmSourceFile(llvm::SourceMgr const&, mlir::Block*, mlir::ParserConfig const&, mlir::AsmParserState*, mlir::AsmParserCodeCompleteContext*) + 5458
18 catalyst 0x0000000003ddff9d
19 catalyst 0x0000000003de83f7 QuantumDriverMain(catalyst::driver::CompilerOptions const&, catalyst::driver::CompilerOutput&, mlir::DialectRegistry&) + 1095
20 catalyst 0x0000000003ded623 QuantumDriverMainFromCL(int, char**) + 10771
21 libc.so.6 0x00007fe8c2803d90
22 libc.so.6 0x00007fe8c2803e40 __libc_start_main + 128
23 catalyst 0x0000000003dc75ae _start + 46
vmap.circuit:108:7: note: see current operation: "quantum.device"(%1) <{kwargs = "{'shots': 0, 'mcmc': False, 'num_burnin': 0, 'kernel_name': None}", lib = "/home/jovyan/.local/lib/python3.11/site-packages/pennylane_lightning/liblightning_qubit_catalyst.so"}> {name = "LightningSimulator"} : (i64) -> ()
vmap.circuit: vmap.circuit:1:8: error: expected 'module asm'
module @vmap.circuit {
^
Failed to parse module as LLVM or MLIR source