API Documentation#

API quantuloop_aws_client#

Quantuloop Quantum Simulator AWS Client API documentation.

import quantuloop_aws_client
quantuloop_aws_client.set_server(*, url, private_key, passphrase=None, verify=True, timeout=None)#

Set the server URL and private key for quantum execution

Parameters:
  • url (str) – Server URL, for example, https://example.com or http://127.0.0.1:8080.

  • private_key (PathLike) – Path for the OpenSSH RSA private key.

  • passphrase (Union[bool, bytes, None]) – Password to decrypt the private key. Set to True to prompt for the password, or pass the password in plain text in bytes. Set to None if the key is not encrypted.

  • verify (bool) – Set to False to not verify the SSL certificate that may be invalid if using the Application Load Balancer domain with HTTPS.

  • timeout (Optional[int]) – Set a timeout in seconds for the quantum execution requests.

quantuloop_aws_client.set_simulator(simulator=None, *, seed=None, dump_type=None, shots=None, gpu_count=None, precision=None)#

Set the simulation server as the quantum execution target.

You must run quantuloop_aws_client.set_server() before calling this function.

Quantuloop QueST is not affected by the “precision” and “gpu_count” parameters as it is only available for single GPU and single precision execution.

Warning

Your internet connection can strongly influence the total execution time when setting the “dump_type” parameter to “vector” or “probability”.

Parameters:
  • simulator (Literal['Quantuloop Sparse', 'Quantuloop Dense', 'Quantuloop QuEST', 'KBW Sparse', 'KBW Dense', 'arn:aws:braket:::device/quantum-simulator/amazon/sv1', 'arn:aws:braket:::device/quantum-simulator/amazon/tn1', 'arn:aws:braket:::device/quantum-simulator/amazon/dm1', 'arn:aws:braket:us-west-1::device/qpu/rigetti/Aspen-M-3', 'arn:aws:braket:eu-west-2::device/qpu/oqc/Lucy', 'arn:aws:braket:::device/qpu/ionq/ionQdevice'] | None) – See quantuloop_aws_client.available_simulators() for the available simulators.

  • seed (any | None) – Initialize the simulator RNG.

  • dump_type (Literal['vector', 'probability', 'shots'] | None) – must be “vector”, “probability”, or “shots”, default “vector”.

  • shots (int | None) – select the number of shots if dump_type is “shots”.

  • gpu_count (int | None) – maximum number of GPUs; if set to 0, simulation will use all available GPUs.

  • precision (Literal[1, 2] | None) – floating point precision used in the simulation; positive values are: 1 for single precision (float) and 2 for double precision

quantuloop_aws_client.available_simulators()#

Get a list of the available quantum simulators.

Return type:

list[str]

API quantuloop_simulator#

Quantuloop Quantum Simulator API documentation.

import quantuloop_simulator
quantuloop_simulator.set_simulator(simulator=None, *, token=None, token_file=None, seed=None, dump_type=None, shots=None, gpu_count=None, precision=None)#

Set a Quantuloop simulator as the quantum execution target

Parameters:
  • token (str | None) – A Quantuloop Access Token. This token is used to authenticate access to the simulator. If you do not provide a token, the simulator will not work.

  • token_file (PathLike | None) – A file containing the Quantuloop Access Token. The file must contain a single line with the access token. If you specify both a token and a token file, the function will raise a ValueError.

  • seed (any | None) – A value used to initialize the simulator’s random number generator. If you do not provide a seed, the simulator will generate a random seed.

  • dump_type (Literal['vector', 'probability', 'shots'] | None) – A string that specifies the dump type.

  • shots (int | None) – An integer select the number of shots for dump type “shots”.

  • gpu_count (int | None) – An integer that determine the maximum number of GPUs used in the execution. If set to 0, the simulator will use all available GPUs.

  • precision (Literal[1, 2] | None) – A integer the specifies the floating point precision used in the simulation. Positive values are 1 for single precision (float) and 2 for double precision.