A drag-and-drop web interface for the QAnsel quantum computer simulator. This does NOT run simulations. It relies on pinging a server running regular QAnsel.
Find a file
2025-11-25 17:00:41 -05:00
imports Tue Nov 25 04:56:01 PM EST 2025 2025-11-25 16:56:01 -05:00
favicon.ico Tue Nov 25 04:56:01 PM EST 2025 2025-11-25 16:56:01 -05:00
index.html Tue Nov 25 04:56:01 PM EST 2025 2025-11-25 16:56:01 -05:00
README.md Update README.md 2025-11-25 17:00:41 -05:00

QAnselWeb

A drag-and-drop web interface for the QAnsel quantum computer simulator. This does NOT run simulations. It relies on pinging a server running regular QAnsel.

API and Web Interface

This web interface expects to connect to an API. The API service is handled through RosadoAPI. Please see the RosadoAPI project in order to set up this service.

Once RosadoAPI is running, a ServiceInfo record will need to be added to the RosadoAPI schema. Below is an example of how this entry may look.

	MariaDB [RosadoAPI]> select * from ServiceInfo;
	+----+---------+---------------------------------+-------------+
	| id | service | path                            | parameters  |
	+----+---------+---------------------------------+-------------+
	|  1 | qansel  | /fakepath/QAnsel                | -q14 -o5 -r |
	+----+---------+---------------------------------+-------------+

The -qX parameter is useful here as it allows one to cap the maximum qubit count allowed for the process in case the hardware running the simulator is not sufficient to handle large qubit counts. In this case, it is capped at 14 to make sure that programs that exceed the limitations of the GPU are rejected.

The web interface expects an API key. The API key is formed in three parts A:B:C where A is the RosadoAPI.AuthInfo.username, B is the RosadoAPI.AuthInfo.authkey, and C is the URL which it needs to ping. It is important that the address does not contain http:// or https://. For example, if the address is http://example.com/api, then C should simply be written as example.com/api.

Once A:B:C is filled out, the entire thing needs to be converted to a base64 string. This can be done in JavaScript in the developer console in the web browser using the btoa() function. This final encoded string functions as the API key for the web interface. Any equal signs at the end of the API key should be removed.

The web interface allows for appending the URL with ?apikey= followed by an API key to auto fill the API key. This can be useful if the service is linked from another source (such as another website or an email) and will prevent the user from having to input the APIkey themselves.