qml.about()
# Put code here
Name: PennyLane
Version: 0.36.0
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: /opt/homebrew/lib/python3.10/site-packages
Requires: appdirs, autograd, autoray, cachetools, networkx, numpy, pennylane-lightning, requests, rustworkx, scipy, semantic-version, toml, typing-extensions
Required-by: PennyLane_Lightning
Platform info: macOS-13.0-arm64-arm-64bit
Python version: 3.10.9
Numpy version: 1.24.1
Scipy version: 1.10.0
Installed devices:
- default.clifford (PennyLane-0.36.0)
- default.gaussian (PennyLane-0.36.0)
- default.mixed (PennyLane-0.36.0)
- default.qubit (PennyLane-0.36.0)
- default.qubit.autograd (PennyLane-0.36.0)
- default.qubit.jax (PennyLane-0.36.0)
- default.qubit.legacy (PennyLane-0.36.0)
- default.qubit.tf (PennyLane-0.36.0)
- default.qubit.torch (PennyLane-0.36.0)
- default.qutrit (PennyLane-0.36.0)
- default.qutrit.mixed (PennyLane-0.36.0)
- null.qubit (PennyLane-0.36.0)
- lightning.qubit (PennyLane_Lightning-0.36.0)
Error Message:
line 49
46 noise = [0,0,0,0,0,0,0,0,0,0,0,0]
47 weights = [0,1,0,1,2,3,1,2,1,2,0,1,0,1,2,3,1,2,1,2,4,4,4,4,4,4, 0,1,0,1,2,3,1,2,1,2,0,1,0,1,2,3,1,2,1,2,4,4,4,4,4,4]
---> 49 quantum_circuit(noise,weights)
50 # qml.draw_mpl(mini_circuit)(noise, weights)
51 # qml.draw_mpl(mini_circuit2)(weights[:3*4])
52 # qml.draw_mpl(mini_circuit3)(weights[:3*4])
53 # plt.show()
File /opt/homebrew/lib/python3.10/site-packages/pennylane/workflow/qnode.py:1098, in QNode.__call__(self, *args, **kwargs)
1095 self._update_gradient_fn(shots=override_shots, tape=self._tape)
1097 try:
-> 1098 res = self._execution_component(args, kwargs, override_shots=override_shots)
1099 finally:
1100 if old_interface == "auto":
File /opt/homebrew/lib/python3.10/site-packages/pennylane/workflow/qnode.py:1052, in QNode._execution_component(self, args, kwargs, override_shots)
1049 full_transform_program.prune_dynamic_transform()
1051 # pylint: disable=unexpected-keyword-arg
-> 1052 res = qml.execute(
1053 (self._tape,),
1054 device=self.device,
1055 gradient_fn=self.gradient_fn,
1056 interface=self.interface,
1057 transform_program=full_transform_program,
1058 config=config,
1059 gradient_kwargs=self.gradient_kwargs,
1060 override_shots=override_shots,
1061 **self.execute_kwargs,
1062 )
1063 res = res[0]
1065 # convert result to the interface in case the qfunc has no parameters
File /opt/homebrew/lib/python3.10/site-packages/pennylane/workflow/execution.py:600, in execute(tapes, device, gradient_fn, interface, transform_program, config, grad_on_execution, gradient_kwargs, cache, cachesize, max_diff, override_shots, expand_fn, max_expansion, device_batch_transform, device_vjp)
595 if not device_batch_transform:
596 warnings.warn(
597 "device batch transforms cannot be turned off with the new device interface.",
598 UserWarning,
599 )
--> 600 tapes, post_processing = transform_program(tapes)
601 else:
602 # TODO: Remove once old device are removed
603 tapes, program_post_processing = transform_program(tapes)
File /opt/homebrew/lib/python3.10/site-packages/pennylane/transforms/core/transform_program.py:509, in TransformProgram.__call__(self, tapes)
507 if self._argnums is not None and self._argnums[i] is not None:
508 tape.trainable_params = self._argnums[i][j]
--> 509 new_tapes, fn = transform(tape, *targs, **tkwargs)
510 execution_tapes.extend(new_tapes)
512 fns.append(fn)
File /opt/homebrew/lib/python3.10/site-packages/pennylane/devices/preprocess.py:340, in decompose(tape, stopping_condition, stopping_condition_shots, skip_initial_state_prep, decomposer, max_expansion, name)
334 try:
335 # don't decompose initial operations if its StatePrepBase
336 prep_op = (
337 [tape[0]] if isinstance(tape[0], StatePrepBase) and skip_initial_state_prep else []
338 )
--> 340 new_ops = [
341 final_op
342 for op in tape.operations[bool(prep_op) :]
343 for final_op in _operator_decomposition_gen(
344 op,
345 stopping_condition,
346 decomposer=decomposer,
347 max_expansion=max_expansion,
348 name=name,
349 )
350 ]
351 except RecursionError as e:
352 raise DeviceError(
353 "Reached recursion limit trying to decompose operations. "
354 "Operator decomposition may have entered an infinite loop."
355 ) from e
File /opt/homebrew/lib/python3.10/site-packages/pennylane/devices/preprocess.py:340, in <listcomp>(.0)
334 try:
335 # don't decompose initial operations if its StatePrepBase
336 prep_op = (
337 [tape[0]] if isinstance(tape[0], StatePrepBase) and skip_initial_state_prep else []
338 )
--> 340 new_ops = [
341 final_op
342 for op in tape.operations[bool(prep_op) :]
343 for final_op in _operator_decomposition_gen(
344 op,
345 stopping_condition,
346 decomposer=decomposer,
347 max_expansion=max_expansion,
348 name=name,
349 )
350 ]
351 except RecursionError as e:
352 raise DeviceError(
353 "Reached recursion limit trying to decompose operations. "
354 "Operator decomposition may have entered an infinite loop."
355 ) from e
File /opt/homebrew/lib/python3.10/site-packages/pennylane/devices/preprocess.py:62, in _operator_decomposition_gen(op, acceptance_function, decomposer, max_expansion, current_depth, name)
60 else:
61 try:
---> 62 decomp = decomposer(op)
63 current_depth += 1
64 except qml.operation.DecompositionUndefinedError as e:
File /opt/homebrew/lib/python3.10/site-packages/pennylane/devices/preprocess.py:328, in decompose.<locals>.decomposer(op)
327 def decomposer(op):
--> 328 return op.decomposition()
File /opt/homebrew/lib/python3.10/site-packages/pennylane/operation.py:1285, in Operator.decomposition(self)
1273 def decomposition(self) -> List["Operator"]:
1274 r"""Representation of the operator as a product of other operators.
1275
1276 .. math:: O = O_1 O_2 \dots O_n
(...)
1283 list[Operator]: decomposition of the operator
1284 """
-> 1285 return self.compute_decomposition(
1286 *self.parameters, wires=self.wires, **self.hyperparameters
1287 )
TypeError: Layer.compute_decomposition() got multiple values for argument 'wires'