Research Portability

Aṇu Astra SDK Integration

OpenQASM 2.0 Execution at scale.

Execute industry-standard OpenQASM strings directly through the Aṇu Astra SDK for research portability. Build native circuits and export them for cross-platform verification.

Basic QASM References

Standard OpenQASM 2.0 circuits you can copy and test directly in the AnuAstra Lab.

Bell State (Entanglement)

OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];

// Bell State: (|00> + |11>) / sqrt(2)
h q[0];
cx q[0], q[1];
measure q -> c;

3-Qubit GHZ State

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg c[3];

// (|000> + |111>) / sqrt(2)
h q[0];
cx q[0], q[1];
cx q[1], q[2];
measure q -> c;

Superposition

OPENQASM 2.0;
include "qelib1.inc";
qreg q[3];
creg c[3];

// Superposition across all 8 states
h q[0];
h q[1];
h q[2];
measure q -> c;

Python SDK Execution

Direct execution using the Python client.

from anuastra import Client

astra = Client(api_key='your_sk_live_key')

# Define industry-standard OpenQASM 2.0
qasm_str = """OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
h q[0];
cx q[0], q[1];
"""

# Execute directly via the .execute_qasm() method
result = astra.execute_qasm(qasm_str, shots=1024)
print("GHZ Counts:", result['results']['counts'])

Node.js SDK Execution

High-performance ingestion for research portability using JavaScript.

const { AṇuAstra } = require('anuastra');
const astra = new AṇuAstra({ apiKey: 'your_sk_live_key' });

const qasm = "OPENQASM 2.0; qreg q[2]; h q[0]; cx q[0],q[1];";

// High-performance ingestion for research portability
const res = await astra.quantum.executeQasm(qasm, { shots: 1024 });

cURL / REST API

Direct HTTP interaction for custom backends.

curl -X POST "https://astra.cryptopix.in/api/v1/quantum/qasm" \
  -H "Authorization: Bearer sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "qasm": "OPENQASM 2.0; include \"qelib1.inc\"; qreg q[2]; h q[0]; cx q[0],q[1];"
  }'

Industrial Portability: QASM Export

The Bridge Pattern

For research archival and peer-review, Aṇu Astra supports the Bridge Pattern—allowing you to build circuits natively and export them to OpenQASM 2.0 strings for cross-platform verification.

from anuastra import QuantumCircuit

# 1. Build natively via SDK Builder (3-Qubit GHZ State)
qc = QuantumCircuit(3)
qc.h(0).cx(0, 1).cx(1, 2)

# 2. Export to Industry-Standard QASM String
qasm_output = qc.to_qasm()
print(qasm_output)

# Expected Output:
# OPENQASM 2.0;
# include "qelib1.inc";
# qreg q[3];
# h q[0];
# cx q[0], q[1];
# cx q[1], q[2];
Start integrating with Aṇu Astra today to bring true quantum verification to your stack.