rich7420 opened a new issue, #613:
URL: https://github.com/apache/mahout/issues/613
### execute_circuit() error in Amazon Braket backend
A clear and concise description of the bug.
The Amazon Braket backend's execute_circuit() lacked parameter binding
logic. When circuits contained parameterized rotation gates, execution would
fail, making it inconsistent with Qiskit and Cirq backends.
Fix:
Added parameter value checking and processing
Used string keys in inputs dict (as required by Braket API)
Properly bind parameters to circuits
### Steps to Reproduce
1. run #612
### Expected Behavior
```
What should have happened?
parameter_values = backend_config.get("parameter_values", {})
if parameter_values and circuit.parameters:
# Braket accepts parameter names as strings in inputs dict
inputs = {
param_name: value
for param_name, value in parameter_values.items()
if param_name in {p.name for p in circuit.parameters}
}
task = backend.run(circuit, shots=shots, inputs=inputs)
```
### Actual Behavior
What actually happened?
` task = backend.run(circuit, shots=shots)
`
### Screenshots or Logs
Add screenshots or log output if applicable.
### Environment
- **OS:** e.g., Windows, Linux
- **Browser/Tool Version:** e.g., Chrome 96, Python 3.8
### Additional Context
Any other information that may be helpful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]