License Management

This page describes how to manage your QUBO++ license using the qbpp-license command-line utility. The license system is shared between QUBO++ (C++) and PyQUBO++ (Python).

License Types

QUBO++ offers several license types with different variable count limits and validity periods.

License Type Key Required Validity CPU Variables GPU Variables
Anonymous Trial No 7 days 1,000 1,000
Registered Trial Yes 30 days 10,000 10,000
Standard Yes Agreement term 2,147,483,647 1,000
Professional Yes Agreement term 2,147,483,647 2,147,483,647
Fallback N/A Always 100 100

Setting the License Key

If you have a license key, set it using one of the following methods.

Add the following line to your ~/.bashrc:

export QBPP_LICENSE_KEY=XXXXXX-XXXXXX-XXXXXX-XXXXXX

Then reload the shell:

$ source ~/.bashrc

Method 2: Command-Line Option

Pass the key directly to qbpp-license:

$ qbpp-license -k XXXXXX-XXXXXX-XXXXXX-XXXXXX -a

Method 3: In C++ Code

Set the key programmatically before creating variables:

#include <qbpp/qbpp.hpp>

int main() {
    qbpp::license_key("XXXXXX-XXXXXX-XXXXXX-XXXXXX");
    // ... your QUBO++ code ...
}

Note: For Anonymous Trial, no license key is needed. Simply run qbpp-license -a without setting a key.

Activating a License

A license must be activated on each machine before QUBO++ programs can use it. Activation is node-locked – the license is tied to the specific machine.

$ qbpp-license -a

Checking License Status

To display the current license status without making any changes:

$ qbpp-license

This shows the license type, expiry date, variable limits, and activation usage. The command contacts the license server to refresh the status.

Deactivating a License

To move a license to another machine, first deactivate it on the current machine:

$ qbpp-license -d

Warning: Each license key has a limited number of allowed activations and deactivations. Once the total reaches this limit, you will no longer be able to activate or deactivate that license. Plan your activations carefully.

Command Reference

Usage: qbpp-license [options]

Options:
  -h, --help         Show help message and exit
  -k, --key KEY      Specify a license key
  -a, --activate     Activate the license on this machine
  -d, --deactivate   Deactivate the license on this machine
  -t, --time-out SEC Set the server communication timeout (default: 20 seconds)

Examples

Command Description
qbpp-license Display current license status
qbpp-license -a Activate (Anonymous Trial if no key is set)
qbpp-license -k KEY -a Activate with a specific key
qbpp-license -d Deactivate the license on this machine
qbpp-license -t 60 Check status with a 60-second timeout
qbpp-license -k KEY -t 60 -a Activate with a key and extended timeout

How License Verification Works

Network and Timeout

If your network is slow or behind a firewall/proxy, the default 20-second timeout may not be enough.

To increase the timeout:

$ qbpp-license -t 60 -a

If the server is unreachable, QUBO++ falls back to the cached license status. If no cache exists, QUBO++ runs in Fallback Mode (100-variable limit).

Troubleshooting

“License server timed out”

“Activation limit reached”

“License expired”

Programs work but with limited variables

“Deactivation cooldown”

Floating Licenses

Floating licenses allow shared access across multiple machines within an organization. Instead of being permanently locked to a machine, a floating license uses a lease-based mechanism.

Usage is the same as node-locked licenses:

$ export QBPP_LICENSE_KEY=F-XXXXXX-XXXXXX-XXXXXX-XXXXXX
$ qbpp-license -a

Last updated: