--- sd_hide_title: true --- # Fixstars Amplify (clients-AmplifyAEClient)= ## Fixstars Amplify Annealing Engine v1 Fixstars Amplify Annealing Engine (Amplify AE) is a solver provided by Fixstars Amplify. It uses heuristic algorithms based on simulated annealing on GPUs, leveraging their parallel computing capabilities to search for solutions with high speed and accuracy. ```{tip} A free API token is available upon [user registration](https://amplify.fixstars.com/register). ``` :**Solver specification**: ```{list-table} :width: 100% :widths: 2 3 * - Client class - {py:class}`amplify.AmplifyAEClient` * - [Execution parameters](amplify.AmplifyAEClient.parameters) - {py:class}`amplify.AmplifyAEClient.Parameters` * - [Execution result](amplify.Result.client_result) - {py:class}`amplify.AmplifyAEClient.Result` * - [Execution time](amplify.Result.execution_time) - {py:attr}`amplify.AmplifyAEClient.Result.execution_time_ms` * - API Method - REST API (JSON) * - API reference - [{bdg-info}`📖 Documents`](../amplify_ae.md) ``` * When the {py:class}`~amplify.AmplifyAEClient.solver` property is set to {py:class}`~amplify.AmplifyAEClient.Solver.Constraint` (default): ```{csv-table} :header-rows: 1 :stub-columns: 1 :width: 100% :widths: 1 1 1 1 1 ,Binary variable,Ising variable,Integer variable,Real variable Objective function,4th,\-,\-,\- Equality constraint,4th,\-,\-,\- Inequality constraint,4th,\-,\-,\- ``` * When the {py:class}`~amplify.AmplifyAEClient.solver` property is set to {py:class}`~amplify.AmplifyAEClient.Solver.Pubo`: ```{csv-table} :header-rows: 1 :stub-columns: 1 :width: 100% :widths: 1 1 1 1 1 ,Binary variable,Ising variable,Integer variable,Real variable Objective function,4th,\-,\-,\- Equality constraint,4th{sup}`*`,\-,\-,\- Inequality constraint,4th{sup}`*`,\-,\-,\- ``` \*: must give a penalty function. * When the {py:class}`~amplify.AmplifyAEClient.solver` property is set to {py:class}`~amplify.AmplifyAEClient.Solver.Qubo`: ```{csv-table} :header-rows: 1 :stub-columns: 1 :width: 100% :widths: 1 1 1 1 1 ,Binary variable,Ising variable,Integer variable,Real variable Objective function,2nd,\-,\-,\- Equality constraint,2nd{sup}`*`,\-,\-,\- Inequality constraint,2nd{sup}`*`,\-,\-,\- ``` \*: must give a penalty function. :**Client class**: In addition to the [common interface of the client class](#client-common-interface), it has the following attributes. ```{list-table} :width: 100% :header-rows: 1 :widths: 1 1 3 * - Attribute - Data type - Details * - {py:attr}`~amplify.AmplifyAEClient.solver` - {py:class}`~amplify.AmplifyAEClient.Solver` - Set the solve mode for Amplify AE. The default is {py:class}`~amplify.AmplifyAEClient.Solver.Constraint`. By setting it to {py:class}`~amplify.AmplifyAEClient.Solver.Pubo` or {py:class}`~amplify.AmplifyAEClient.Solver.Qubo`, you can perform solves that emulate the PUBO / QUBO solvers. For details, please refer to the Amplify AE [documentation](../amplify_ae.md). * - {py:attr}`~amplify.AmplifyAEClient.compression` - {py:class}`bool` - Compress the requested data before sending. The default is {py:obj}`True`; setting it to {py:obj}`False` will reduce request data compression time, but may increase transmission time. ``` :**Configuration example**: Here is an example configuration. For parameter details, please refer to the [Amplify AE documentation](../amplify_ae/api_reference.md). ```{testcode} from amplify import AmplifyAEClient from datetime import timedelta client = AmplifyAEClient() # Set API token client.token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Set the solver mode client.solver = "Constraint" # For general (Default) # client.solver = "Pubo" # For PUBO simulation # client.solver = "Qubo" # For QUBO simulation # Set timeout to 1 second client.parameters.time_limit_ms = timedelta(milliseconds=1000) # Set the number of GPUs to use to 1 client.parameters.num_gpus = 1 # Get all solutions obtained during the search client.parameters.duplicate_solutions = True ``` :**Execution example**: ```python from amplify import Model, VariableGenerator, solve # Define decision variables and the objective function g = VariableGenerator() q = g.array("Binary", 2) f = q[0] * q[1] + q[0] - q[1] + 1 # Create a model model = Model(f) # Run the solver result = solve(model, client) ``` Obtain the solver version and GPU name: ```python >>> client.version '1.0.0+V100' ``` Obtain detailed [execution time](#amplifyae-solvetiming): ```python # Get GPU annealing time >>> print(result.client_result.execution_time_ms) 0:00:01.008328 # Get queue wait time >>> print(result.client_result.queue_time_ms) 0:00:00.000108 # Get the time of request reception >>> print(result.client_result.submitted_at) 2025-08-25 17:37:38.553593+09:00 # Get the time when the request processing started >>> print(result.client_result.started_at) 2025-08-25 17:37:38.553701+09:00 ``` Obtain [runtime parameter information](#amplifyae-solveinfo): ```python # Number of GPUs used for solving >>> result.client_result.num_gpus 1 # Total flip count of all GPUs tried until the execution result is returned >>> result.client_result.num_flips 1567467520 # Number of solutions (samples) obtained until the execution result is returned >>> result.client_result.num_samplings 58 ``` ## [Deprecated] Fixstars Amplify Annealing Engine v0 ```{admonition} Deprecated :class: important Amplify AE v0 is now deprecated. Accordingly, {py:class}`amplify.FixstarsClient` is also deprecated. For new usage, please use Amplify AE v1 and {py:class}`amplify.AmplifyAEClient`. ``` The QUBO solver provided by [Fixstars Amplify](https://amplify.fixstars.com/) uses an algorithm based on Simulated Annealing implemented on GPUs. ```{tip} A free API token is available upon [user registration](https://amplify.fixstars.com/register). ``` :**Solver specification**: ```{list-table} :width: 100% :widths: 2 3 * - Client class - {py:class}`amplify.FixstarsClient` * - [Execution parameters](amplify.FixstarsClient.parameters) - {py:class}`amplify.FixstarsClient.Parameters` * - [Execution result](amplify.Result.client_result) - {py:class}`amplify.FixstarsClient.Result` * - [Execution time](amplify.Result.execution_time) - {py:attr}`amplify.FixstarsClient.Result.execution_time` * - API method - REST API (JSON) * - API reference - [{bdg-info}`📖 API Reference`](https://amplify.fixstars.com/en/docs/amplify/v0/amplify-ae/reference.html) ``` ```{csv-table} :header-rows: 1 :stub-columns: 1 :width: 100% :widths: 1 1 1 1 1 ,Binary variable,Ising variable,Integer variable,Real variable Objective function,2nd,\-,\-,\- Equality constraint,2nd{sup}`*`,\-,\-,\- Inequality constraint,2nd{sup}`*`,\-,\-,\- ``` \*: must give a penalty function. :**Client class**: In addition to the [common interface of the client class](#client-common-interface), it has the following attributes. ```{list-table} :width: 100% :header-rows: 1 :widths: 1 1 3 * - Attribute - Data type - Details * - {py:attr}`~amplify.FixstarsClient.compression` - {py:class}`bool` - Compress the requested data before sending. The default is {py:obj}`True`; setting it to {py:obj}`False` will reduce request data compression time, but may increase transmission time. ``` :**Configuration example**: ```{testcode} from amplify import FixstarsClient from datetime import timedelta client = FixstarsClient() # Set API token client.token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # Set timeout to 1 second client.parameters.timeout = timedelta(milliseconds=1000) # Set the number of GPUs to use to 1 client.parameters.num_gpus = 1 # Get all solutions obtained during the search client.parameters.outputs.num_outputs = 0 ``` :**Execution example**: ```python from amplify import Model, VariableGenerator, solve # Define decision variables and the objective function g = VariableGenerator() q = g.array("Binary", 2) f = q[0] * q[1] + q[0] - q[1] + 1 # Create a model model = Model(f) # Run the solver result = solve(model, client) ``` Obtain the solver version: ```python >>> client.version 'v0.8.5-V100' ``` Obtain detailed execution time: ```python >>> result.client_result.execution_time FixstarsClient.Result.ExecutionTime({ "annealing_time": 9988.965504, "queue_time": 0.047615, "cpu_time": 0.19356399999999996, "time_stamps": [ 8.764683 ] }) ``` Obtain runtime parameter information: ```python >>> result.client_result.execution_parameters FixstarsClient.Result.ExecutionParameters({ "num_gpus": 1, "timeout": 10000, "num_iterations": 585, "penalty_calibration": false, "penalty_multipliers": [], "version": "v0.8.7-V100" }) ```