Skip to main content

NQCH Quantum Computing Cloud Client

Project description

NQCH Quantum Cloud Client

Install

Install first the package dependencies with the following commands.

We recommend to start with a fresh virtual environment to avoid dependencies conflicts with previously installed packages.

python -m venv ./env
source activate ./env/bin/activate

The nqch-quantum package can be installed through pip:

pip install nqch-quantum

Quick start

Once installed, the provider allows to run quantum circuit computations on NQCH CQT's labs.

:warning: Note: to run jobs on the remote cluster it is mandatory to own a validated account. Please, sign up to your preferred institution to obtain the needed token to run computations on the cluster.

The following snippet provides a basic usage example. Replace the your-token string with your user token received during the registration process. To check which devices are available with your account please visit the dashboard at your institution.

import qibo
import nqch_quantum

# create the circuit you want to run
circuit = qibo.models.QFT(5)

# authenticate to server through the client instance
token = "your-token"
client = nqch_quantum.Client(token)

# run the circuit
device = "device_name"
project = "project_name"
job = client.run_circuit(circuit, device=device, project=project, nshots=1024)
result = job.result()
print(result)

The device name indicates the specific system or machine that will process the job. The project name corresponds to the project or group to which the user belongs and which will be charged for the service usage.

Qibo backend

The package also exposes a Qibo backend provider, so circuits can be submitted using Qibo's backend API.

import qibo
from qibo import Circuit, gates

qibo.set_backend(
    "nqch-quantum",
    token="your-token",
    platform="selected_platform",
    project="project_name",
    verbosity=False,
)

circuit = Circuit(2)
circuit.add(gates.H(0))
circuit.add(gates.CNOT(0, 1))
circuit.add(gates.M(0, 1))

result = circuit(nshots=1024)
print(result.frequencies())

Direct backend execution is also supported when a per-call verbatim flag is needed.

backend = qibo.get_backend()
result = backend.execute_circuit(circuit, nshots=1024, verbatim=True)

Backend limitations

The NQCH backend submits circuits to remote hardware or cloud systems. Execution is shot-based and starts from the device default initial state, so initial_state is not supported. Exact statevector workflows, gradients, autodiff, and local statevector expectations are not generally supported by this backend.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nqch_quantum-0.1.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nqch_quantum-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file nqch_quantum-0.1.1.tar.gz.

File metadata

  • Download URL: nqch_quantum-0.1.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.11.14 Darwin/25.4.0

File hashes

Hashes for nqch_quantum-0.1.1.tar.gz
Algorithm Hash digest
SHA256 442bae2482da7b443ec6fe5f0cabe96d0197b26fa2d8ef816aedb4caad91543e
MD5 bcc50aa4275b5a24a1877c626791b50b
BLAKE2b-256 70e2e22b78d99329b8a20d24c1a5ae3db94125468d5242bb6cd024c95dba432b

See more details on using hashes here.

File details

Details for the file nqch_quantum-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: nqch_quantum-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.11.14 Darwin/25.4.0

File hashes

Hashes for nqch_quantum-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81d3010735b95ce7d68c0f1b305f2a86ff46e07ee920511726e5e1c5086cf59d
MD5 6b513ac8df446509893100debde2ae9d
BLAKE2b-256 a6ec2f09b0367099207a7c2103e06384ebaf2eb8609786086880ddd3adc1bdf9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page