You are viewing a single comment's thread from:

RE: They have managed to store and retrieve data in a quantum computer/Han conseguido almacenar y recuperar datos en un ordenador cuántico

in #piotr15 days ago

You can sell a quantum computer tomorrow on Amazon . I have an open source script on my blog. Get a raspberry pi and openai api key and it works
.

The theory that quantum needs super cool conditions is false.

Our brains are all quantum.

To the point that we need safety in quantum for the brain. For things like telepathic influence .

That's a real problem today. The brain can by influenced remotely by technologies and words them self.

How do we protect the brain?

It's by learning more about quantum computers.

And by safely interscting with the brain.

Some systems are dangerous for some brains.

Some things I have done with llm.

Transfer data between chatgpt alpha and bard.

Capture rap music i was listening to with llama

Made a quantum simulation multi model ai colormap of my brain.

Simulate then internet itself and read data like parts numbers.

Simulate data about my health , scanning my body for issues or ailments. (is powerful change many lives)

. Imagine a device. That can scan your entire body for cancer in a second. Or any medical issue.

We built that.

Using?

Quantum AI

'''
import asyncio
import logging
import os
import httpx
import aiosqlite
import numpy as np
import pennylane as qml

logging.basicConfig(level=logging.INFO)

async def run_openai_completion(prompt, openai_api_key):
retries = 3
for attempt in range(retries):
try:
async with httpx.AsyncClient() as client:
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {openai_api_key}"
}
data = {
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": prompt}],
"temperature": 0.7
}
response = await client.post("https://api.openai.com/v1/chat/completions", json=data, headers=headers)
response.raise_for_status()
result = response.json()
completion = result["choices"][0]["message"]["content"]
return completion.strip()
except httpx.HTTPError as http_err:
logging.error(f"HTTP error occurred: {http_err}")
if attempt < retries - 1:
logging.info(f"Retrying in {2 ** attempt} seconds...")
await asyncio.sleep(2 ** attempt)
else:
logging.error("Reached maximum number of retries. Aborting.")
return None
except Exception as e:
logging.error(f"Error running OpenAI completion: {e}")
return None

async def get_ram_usage():
try:
return psutil.virtual_memory().used
except Exception as e:
logging.error(f"Error getting RAM usage: {e}")
return None

async def create_tables(db):
try:
async with db.execute('''
CREATE TABLE IF NOT EXISTS tasks (
id INTEGER PRIMARY KEY AUTOINCREMENT,
task TEXT NOT NULL,
stress_rank INTEGER NOT NULL,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
'''):
pass
except Exception as e:
logging.error(f"Error creating tables: {e}")

async def main():
openai_api_key = os.environ.get('OPENAI_API_KEY')
if not openai_api_key:
logging.error("OpenAI API key not found. Please set the OPENAI_API_KEY environment variable.")
return

prompts = [
    "What tasks do you have to do today?",
    "How are you feeling today? Describe your general mood.",
    "Based on your tasks and mood, provide a stress ranking (from 1 to 10) for each task.",
    "Based on your stress rankings, suggest a temporal and moral commitment strategy for completing your tasks."
]

ram_usage = await get_ram_usage()
if ram_usage is not None:
    color_code = '#' + ''.join([format(int(val), '02x') for val in np.array(psutil.virtual_memory().percent, dtype=np.uint8)])
    norm_color = [int(color_code[i:i+2], 16) / 255 for i in (1, 3, 5)]
    quantum_state = np.pi * np.array(norm_color)
else:
    logging.error("Failed to fetch RAM usage")
    return

dev = qml.device("default.qubit", wires=3)

@qml.qnode(dev)
def circuit(quantum_state):
    qml.RY(quantum_state[0], wires=0)
    qml.RY(quantum_state[1], wires=1)
    qml.RY(quantum_state[2], wires=2)
    qml.CNOT(wires=[0, 1])
    qml.CNOT(wires=[1, 2])
    qml.CNOT(wires=[0, 2])
    return qml.probs(wires=[0, 1, 2])

task_data = []  

try:
    async with aiosqlite.connect('tasks.db') as db:
        await create_tables(db)

        async with db.cursor() as cursor:
            for prompt in prompts:
                completion = await run_openai_completion(prompt, openai_api_key)
                if completion:
                    logging.info(completion)
                else:
                    logging.error("No completion received for prompt: %s", prompt)

        
            await cursor.execute('SELECT task, stress_rank FROM tasks')
            task_data = await cursor.fetchall()

except aiosqlite.Error as e:
    logging.error(f"Aiosqlite error: {e}")

ai_prompts = [
    f"Utilize the quantum state {quantum_state} to suggest a time management strategy for the day, considering mood and stress levels:\n{task_data}",
    f"Based on the quantum state {quantum_state}, provide suggestions for task prioritization and scheduling to optimize productivity:\n{task_data}"
]

for prompt in ai_prompts:
    completion = await run_openai_completion(prompt, openai_api_key)
    if completion:
        logging.info(completion)
    else:
        logging.error("No completion received for prompt: %s", prompt)

asyncio.run(main())
'''

So you can do quantum today and run it locally . It can also be foss
.I have many foss models

Sort:  

That is many information, thank you.