isqtools
The isqtools is the Python interface for isQ – a high-level quantum programming language developed by Arclight Quantum. The isqtools library facilitates interaction with isQ, enabling users to construct, analyze, and execute quantum programs seamlessly within Python.
Features
- Integration with isQ
- Quantum Circuit Construction and Simulation
- Support for Quantum Machine Learning
Prerequisites
Before using isqtools, ensure the following requirements are met:
Requirements:
- Python 3.9 or higher version
- NumPy
- isQ Compiler (isqc) version 0.2.5
Additional Requirements:
-
For quantum machine learning:
-
For quantum chemistry simulations:
-
For accessing QuantumCtek quantum hardware:
Installation
To get started with isqtools, we recommend downloading the source code and installing it using pip. Follow these steps:
- Clone the repository or download the source code.
- Navigate to the project directory.
- Run the following command to install:
pip install .
Usage
Here is an example workflow for using isqtools:
Step 1: Create an isQ File
First, create an isQ file (e.g., example.isq) with the following content:
import std;
qbit q[2];
procedure main() {
H(q[0]);
H(q[1]);
M(q[0]);
M(q[1]);
}
This file defines a simple quantum circuit using the isQ language. For more details, please refer to isQ Programming Language.
Step 2: Compile and Simulate Using Python
Run the following Python code to compile the isQ file and simulate its execution:
from pathlib import Path
from isqtools import isqc_compile, isqc_simulate
from isqtools.utils import CompileTarget, IsqcError
# Define the path to your isQ file
temp_file_path = Path("example.isq")
# Compile the isQ file to QIR (or other supported targets)
try:
isqc_compile(file=str(temp_file_path), target=CompileTarget.QIR)
except IsqcError as e:
print(f"Compilation failed: {e}")
exit(1)
# Simulate the compiled QIR
output_file = temp_file_path.with_suffix(".so")
result, err, code = isqc_simulate(output_file)
if code == 0:
print("Simulation Result:", result)
else:
print("Simulation Error:", err)
Notes:
- Replace
example.isqwith the path to your actual isQ file. - Ensure that all required dependencies are installed and that the isqtools environment is properly set up.
License
Metadata
Release files for isqtools 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| isqtools-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for isqtools-1.5.0-py3-none-any.whl |
Release files / isqtools-1.5.0-py3-none-any.whl
| Download URL | isqtools-1.5.0-py3-none-any.whl |
|---|---|
| Size | 66.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd31e9566d532c56333204312c472d9477a225349a31e9a094dc856c7adddb13
|
|
BLAKE2b-256 checksum How to use checksums |
acb828ab996cf91cb7896394153b1b3e09e56017db113b552e4b517032233d43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for isqtools 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.