Skip to main content

An agentic, virtual kernel for efficient programming of quantum systems

Project description

Creating Your Algorithm

  1. Create your algorithm file (e.g., my_algorithm.py):
import cirq
from qernel import Algorithm

class MyAlgorithm(Algorithm):
    def get_name(self) -> str:
        return "My Algorithm"
    
    def get_type(self) -> str:
        return "my_algorithm"
    
    def build_circuit(self, params: dict) -> cirq.Circuit:
        # Your quantum circuit implementation here
        q = cirq.LineQubit.range(2)
        circuit = cirq.Circuit(
            cirq.H(q[0]),
            cirq.CNOT(q[0], q[1])
        )
        return circuit

# Create an instance for testing
algorithm = MyAlgorithm()
  1. Create your specification file (spec.yaml):
algorithm:
  name: "my_algorithm"
  type: "my_algorithm"
  epsilon: 0.01
  payoff: "max"
  hardware_preset: "GF-realistic"

Using Visualization

Qernel includes a real-time visualization system that provides a live window into quantum algorithm execution. To use it:

from qernel import QernelClient

# Create a standard client
client = QernelClient("https://api.qernel.example.com")

# Run with real-time visualization
result = client.run_algorithm_with_visualization("my_algorithm.py", "spec.yaml")

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

qernel-0.0.1.dev0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

qernel-0.0.1.dev0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file qernel-0.0.1.dev0.tar.gz.

File metadata

  • Download URL: qernel-0.0.1.dev0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.12

File hashes

Hashes for qernel-0.0.1.dev0.tar.gz
Algorithm Hash digest
SHA256 d604c35405c8dd1826320a528efefa3452d4aaa2140ed2dadeee3e69aa6520b6
MD5 3e81561eb1b0e6dd757c12ec9cc66723
BLAKE2b-256 4c81796e3be97565e8c8e9e681fee5b2376f46f7fa3cdb02c30f3f73a1ab81e5

See more details on using hashes here.

File details

Details for the file qernel-0.0.1.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for qernel-0.0.1.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9538fc7912807dc3ed0d1f23d62388edfa4013dcffd75b81fc1ca4db2990e1
MD5 25b4bff62aaae3edbf8142bde303ecf5
BLAKE2b-256 a859646414caeb953c06acfc77e6b0a55d415785ec8239ac306234abb8811171

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