mangeshraut712 opened a new pull request, #1514:
URL: https://github.com/apache/mahout/pull/1514

   ### Related Issues
   
   Closes #1506
   
   ### Changes
   
   - [x] Bug fix
   - [ ] New feature
   - [ ] Refactoring
   - [ ] Documentation
   - [x] Test
   - [ ] CI/CD pipeline
   - [ ] Other
   
   ### Why
   
   `QuMat({"backend_name": "pennylane", "backend_options": {}})` raised 
`ModuleNotFoundError: No module named 'qumat.pennylane_backend'` from 
importlib. An unknown `backend_name` should be a `ValueError` that lists the 
supported backends.
   
   ### How
   
   `QuMat.__init__` checks `backend_name` before importing a backend module. A 
name other than `amazon_braket`, `cirq`, or `qiskit` raises:
   
   ```
   ValueError: Unsupported backend_name 'pennylane'. Supported backends: 
amazon_braket, cirq, qiskit
   ```
   
   `TestBackendConfigValidation.test_unknown_backend_name_raises_valueerror` 
covers that path. The `__init__` docstring now documents the `ValueError`.
   
   ## Checklist
   
   - [x] Added or updated unit tests for all changes
   - [x] Added or updated documentation for all changes
   


-- 
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]

Reply via email to