top of page

Projects In Development

encryption.JPG

In this example, we first encrypt the file using SHA-256, which is a widely-used hash function for data encryption. Then, we use IBM's Qiskit library and its Qiskrypt module to perform quantum state tomography on the file and extract its density matrix. The density matrix is saved to a file as the encrypted file. Note that this code is just a basic example.

01

SHA256 - Quantum File Encryption

Sample Code below written in Python:

import hashlib
from qiskit import ClassicalRegister, QuantumCircuit, QuantumRegister
from qiskit.extensions import Initialize
from qiskit.ignis.verification.tomography import state_tomography_circuits, StateTomographyFitter
import numpy as np

def sha256_encrypt(file_path):
    with open(file_path, 'rb') as file:
        sha256 = hashlib.sha256()
        while True:
            data = file.read(1024)
            if not data:
                break
            sha256.update(data)
    encrypted_file_path = file_path + '.sha256'
    with open(encrypted_file_path, 'wb') as file:
        file.write(sha256.hexdigest().encode('utf-8'))
    return encrypted_file_path

def qiskrypt_encrypt(file_path):
    # load the file into a numpy array
    with open(file_path, 'rb') as file:
        file_bytes = file.read()
    np_array = np.array([int(byte) for byte in file_bytes], dtype=np.uint8)
    
    # initialize the qubits to the desired state
    qubits = QuantumRegister(len(np_array))
    classical_bits = ClassicalRegister(len(np_array))
    qc = QuantumCircuit(qubits, classical_bits)
    initial_state = Initialize(np_array)
    initial_state.label = 'initial_state'
    qc.append(initial_state, range(len(np_array)))

    # perform state tomography to extract the density matrix
    tomography_circuits = state_tomography_circuits(qc, qubits)
    fitter = StateTomographyFitter(tomography_circuits, backend)
    result = fitter.fit(job.result())
    density_matrix = result.density_matrix

    # write the density matrix to a file
    encrypted_file_path = file_path + '.qiskrypt'
    with open(encrypted_file_path, 'wb') as file:
        np.save(file, density_matrix)
    return encrypted_file_path

# encrypt a file using SHA-256 and Qiskit's Qiskrypt
file_path = 'example.txt'
encrypted_file_path = sha256_encrypt(file_path)
encrypted_file_path = qiskrypt_encrypt(encrypted_file_path)

 

02

AI Powered
Price & Trend Predictor

Sample Code below:

​

Compatible with Tradingview.com

​

// This script uses a simple linear regression model to predict future prices

// Define variables
variables:
  length(20), // number of bars to consider for the regression model
  smooth(0.5), // smoothing factor for the regression line
  up_color(color=green), // color for the regression line when trend is up
  down_color(color=red), // color for the regression line when trend is down
  threshold(0.05) // threshold for buy and sell signals

// Calculate the linear regression line
study("Linear Regression Model")
reg = linreg(close, length)

// Calculate the prediction for the next bar
prediction = reg * (1 + smooth)

// Plot the prediction
plot(prediction, title="Prediction", color=trend_up ? up_color : down_color, linewidth=3)

// Define a trend_up variable based on the slope of the regression line
trend_up = slope(reg) > 0

// Calculate the difference between the prediction and the close price
diff = prediction - close

// Buy signal
buy = crossover(diff, threshold)

// Sell signal
sell = crossunder(diff, -threshold)

// Plot the buy and sell signals
plotshape(buy, location=location.bottom, shape=shape.arrowup, color=up_color, size=size.small)
plotshape(sell, location=location.bottom, shape=shape.arrowdown, color=down_color, size=size.small)

buy and sell.JPG

This script uses a linear regression model to predict the next bar's close price based on the previous length bars. The smooth factor is used to smooth the regression line. The trend of the regression line is determined based on the slope of the line, and the color of the line changes accordingly. In this script, we have added a threshold variable to define the difference between the prediction and the close price that triggers a buy or sell signal. The buy signal is triggered when the difference crosses above the threshold, and the sell signal is triggered when the difference crosses below the negative threshold. The buy and sell signals are plotted as arrows on the chart.

03

Price Tracking API Correction on Nomics.com

Sample API below:

import requests

# Set the API endpoint and parameters
endpoint = "https://api.nomics.com/v1/assets/qai-quantumai"
parameters = {
    "key": "YOUR_API_KEY",
    "interval": "1d"
}

# Make the API request
response = requests.get(endpoint, params=parameters)

# Get the data from the response
data = response.json()

# Extract the relevant data
usd_value = data["price"]["usd"]
circulating_supply = data["circulating_supply"]
max_supply = data["max_supply"]
market_cap = data["market_cap"]["usd"]

# Print the data
print("USD Value: $" + usd_value)
print("Circulating Supply: " + circulating_supply)
print("Max Supply: " + max_supply)
print("Market Capitalization: $" + market_cap)

 

04

AI Chatbot

Sample Code below written in php:

<!DOCTYPE html>
<html>
  <head>
    <title>AI Chat Box</title>
    <style>
      #chatbox {
        width: 400px;
        height: 400px;
        border: 1px solid black;
        position: fixed;
        bottom: 20px;
        right: 20px;
        padding: 20px;
        overflow-y: scroll;
      }
      #input-form {
        display: flex;
        justify-content: space-between;
        margin-top: 20px;
      }
      #user-input {
        width: 75%;
      }
    </style>
  </head>
  <body>
    <div id="chatbox">
      <div id="chat-output"></div>
      <form id="input-form">
        <input type="text" id="user-input" placeholder="Ask me anything...">
        <button type="button" id="submit-btn">Submit</button>
      </form>
    </div>
    <script>
      const submitBtn = document.querySelector("#submit-btn");
      const userInput = document.querySelector("#user-input");
      const chatOutput = document.querySelector("#chat-output");

      submitBtn.addEventListener("click", function(event) {
        event.preventDefault();

        // Get user input
        const input = userInput.value;

        // Call your AI chat bot function and get response
        const response = callChatBot(input);

        // Display the response in the chat output
        chatOutput.innerHTML += "<p>Bot: " + response + "</p>";

        // Clear the user input
        userInput.value = "";
      });
    </script>
  </body>
</html>

 

AI Working_edited.jpg

Contact us:

​

E-Mail: Cardano.QuantumAI@gmail.com

Built on Cardano Blockchain in works with IOHK - QuantumAI

​

Our Team and Community is not in anyway related or associated to any other Quantum AI Companies or Organizations (e.g. https://the-quantum-ai.com/ or any other Quantum AI sites) We are currently a standalone team providing an open source Cardano Native Token.

 

As a condition of your use of the QuantumAI website or any third party website connecting to it (collectively the “Site”), you agree that you: (i) are at least 18 years of age; (ii) are not barred from using the Protocol, the Site, or any connected services under any law applicable to you; (iii) will not interfere with the intended operation of the Protocol or Site, including by hacking, submitting a virus, fraudulent information or tokens, or attempting to overload, “flood,” or “crash” the Protocol or Site; and (iv) you are, and your use of the Protocol is and will be, in compliance at all times with all laws, rules, regulations or orders applicable to you.

THE PROTOCOL, THE SITE AND ALL INFORMATION CONTAINED ON THE SITE, ARE MADE ACCESSIBLE OR AVAILABLE ON AN “AS IS” AND “AS AVAILABLE” BASIS. YOU EXPRESSLY AGREE THAT USE OF THE SITE OR THE PROTOCOL IS AT YOUR SOLE RISK. TO THE FULLEST EXTENT ALLOWED BY APPLICABLE LAW, NONE OF QuantumAI, ITS SUBSIDIARIES, AFFILIATES, AND PARTNERS, OR ANY DEVELOPER, EMPLOYEE, AGENT OR LICENSOR ASSOCIATED WITH ANY OF THEM, WARRANT THAT USE OF THE SITE OR PROTOCOL WILL BE UNINTERRUPTED, FULLY SECURE, VIRUS- OR ERROR-FREE, NOR DO THEY MAKE ANY WARRANTY AS TO THE RESULTS THAT MAY BE OBTAINED FROM USE OF THE SITE OR THE PROTOCOL. EACH OF THE FOREGOING HEREBY DISCLAIMS ANY AND ALL REPRESENTATIONS, WARRANTIES AND CONDITIONS, WHETHER EXPRESS OR IMPLIED, AS TO THE PROTOCOL, THE SITE OR ANY INFORMATION CONTAINED ON THE SITE, INCLUDING, BUT NOT LIMITED TO, THOSE OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, SUITABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AS WELL AS WARRANTIES IMPLIED FROM A COURSE OF PERFORMANCE OR COURSE OF DEALING.

IN NO EVENT SHALL QuantumAI, ITS SUBSIDIARIES, AFFILIATES, AND PARTNERS, OR ANY DEVELOPER, EMPLOYEE, AGENT OR LICENSOR ASSOCIATED WITH ANY OF THEM, BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR RELATED TO: (I) YOUR USE OF OR INABILITY TO USE THE PROTOCOL, OR THE SITE, OR INFORMATION CONTAINED IN THE SITE, (II) YOUR INTERACTIONS WITH OTHER USERS, OR (III) THESE USE TERMS; INCLUDING BUT NOT LIMITED TO (A) DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES OF ANY KIND, AND (B) LOSS OF REVENUES, PROFITS, GOODWILL, CRYPTOCURRENCIES, TOKENS OR ANYTHING ELSE OF VALUE.

YOU AGREE THAT ANY CAUSE OF ACTION ARISING OUT OF OR RELATED TO THE SITE MUST COMMENCE WITHIN ONE (1) YEAR AFTER THE CAUSE OF ACTION ACCRUES, OR THE CAUSE OF ACTION IS PERMANENTLY BARRED.

bottom of page