Framework To Ease Operating with Quantum Computers

Related tags

Miscellaneous qtype
Overview

QType

Framework To Ease Operating with Quantum Computers

Concept

# define an array of 15 cubits:
a = [Qubit() for i in range(15)]

# Iterate every cubit, superposing and entangling each one with the previous one:
for i in range(1, len(a)):
    a[i].hadamard().cnot(a[i - 1])

# Apply a gate to every qubit within the array    
for q in a: 
    q.not()

# Definying a Qubyte, a sequence of eight qubits operated on as a unit by a quantum computer.
q = Qubyte()

# 00001100 same as initialise q0 =  0, q1 = 0, q2 = 1, q3 = 1, q4 = 0, q5 = 0 … q7 = 0
q.status = 12;

# 11110011 same as apply not to every single qubit individually
q.not();

q.hadamard();  # same as apply hadamard to every single qubit individually
q.h()  # alias of hadamard

# define 3 qubits a, b and c (they are initialized to 0 by default)
a, b, c = Qubit()

a.status = 1  # setting the status of first qubit to 1
b.status = a.not()  # same as a a.cnot(b) (assign variable references is equivalent to entangle cubits themselve)
a.status = 0  # because b is entangle, b is 1
a.status = 1  # due to entanglement, b is 0

# initialize the qubit to 1 by setting the status matrix
a.status = [0, 1]  # density matrix

# superposing the cubit by setting its density matrix:
a.status = [1 / sqrt(2), 1 / sqrt(2)]

a.status = 0  # equivalent to a.status = [1, 0]
a.status = 1  # equivalent to a.status = [0, 1]

a.status.to_bloch().draw()  # draw Bloch sphere of status

c = int(a)  # that makes a to collapse to

c = a.read()  # same, read makes a to collapse to

c = a.read(1000)  # same, but with shots=1000

c = a.read()
d = a.read()  # circuit is being executed again, makes a to collapse to again.





You might also like...
pythonOS: An operating system kernel made in python and assembly
pythonOS: An operating system kernel made in python and assembly

pythonOS An operating system kernel made in python and assembly Wait what? It uses a custom compiler called snek that implements a part of python3.9 (

Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Possible solutions to Wordscapes, a mobile game for the android operating system, downloadable from the play store

Snek-test - An operating system kernel made in python and assembly
Snek-test - An operating system kernel made in python and assembly

pythonOS An operating system kernel made in python and assembly Wait what? It us

The Begin button and menu for the Meadows operating system. The start button for UNIX/Linux.
The Begin button and menu for the Meadows operating system. The start button for UNIX/Linux.

By: Seanpm2001, Meadows Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afri

qecsim is a Python 3 package for simulating quantum error correction using stabilizer codes.

qecsim qecsim is a Python 3 package for simulating quantum error correction using stabilizer codes.

Artificial intelligence based on 5-dimensional quantum selection

Deep Thought An artificial intelligence based on 5-dimensional quantum selection. Algorithm The payload Make an random bit array (e.g. 1101...) Conver

MoBioTools A simple yet versatile toolkit to automatically setup quantum mechanics/molecular mechanics

A simple yet versatile toolkit to setup quantum mechanical/molecular mechanical (QM/MM) calculations from molecular dynamics trajectories.

BlackMamba is a multi client C2/post exploitation framework
BlackMamba is a multi client C2/post exploitation framework

BlackMamba is a multi client C2/post exploitation framework with some spyware features. Powered by Python 3.8.6 and QT Framework.

Viewflow is an Airflow-based framework that allows data scientists to create data models without writing Airflow code.
Viewflow is an Airflow-based framework that allows data scientists to create data models without writing Airflow code.

Viewflow Viewflow is a framework built on the top of Airflow that enables data scientists to create materialized views. It allows data scientists to f

Owner
Antonio Párraga Navarro
Check my bio at https://www.linkedin.com/in/antonioparraga
Antonio Párraga Navarro
A framework that let's you compose websites in Python with ease!

Perry Perry <= A framework that let's you compose websites in Python with ease! Perry works similar to Qt and Flutter, allowing you to create componen

Linkus 13 Oct 9, 2022
Anki for desktop computers

Anki This repo contains the source code for the computer version of Anki. If you'd like to try development builds of Anki but don't feel comfortable b

Ankitects 12.9k Jan 9, 2023
Wordle is fun, so let's ruin it with computers.

ruin-wordle Wordle is fun, so let's ruin it with computers. Metrics This repository assesses two metrics about each algorithm: Success: how many of th

Charles Tapley Hoyt 11 Feb 11, 2022
A frontend to ease the use of pulseaudio's routing capabilities, mimicking voicemeeter's workflow

Pulsemeeter A frontend to ease the use of pulseaudio's routing capabilities, mimicking voicemeeter's workflow Features Create virtual inputs and outpu

Gabriel Carneiro 164 Jan 4, 2023
More routines for operating on iterables, beyond itertools

More Itertools Python's itertools library is a gem - you can compose elegant solutions for a variety of problems with the functions it provides. In mo

null 2.8k Jan 2, 2023
YunoHost is an operating system aiming to simplify as much as possible the administration of a server.

YunoHost is an operating system aiming to simplify as much as possible the administration of a server. This repository corresponds to the core code, written mostly in Python and Bash.

YunoHost 1.5k Jan 9, 2023
pyRTOS is a real-time operating system (RTOS), written in Python.

pyRTOS Introduction pyRTOS is a real-time operating system (RTOS), written in Python. The primary goal of pyRTOS is to provide a pure Python RTOS that

Ben Williams 96 Dec 30, 2022
LSO, also known as Linux Swap Operator, is a software with both GUI and terminal versions that you can manage the Swap area for Linux operating systems.

LSO - Linux Swap Operator Türkçe - LSO Nedir? LSO, diğer adıyla Linux Swap Operator Linux işletim sistemleri için Swap alanını yönetebileceğiniz hem G

Eren İnce 4 Feb 9, 2022
An kind of operating system portal to a variety of apps with pure python

pyos An kind of operating system portal to a variety of apps. Installation Run this on your terminal: git clone https://github.com/arjunj132/pyos.git

null 1 Jan 22, 2022
A Python wrapper API for operating and working with the Neo4j Graph Data Science (GDS) library

gdsclient NOTE: This is a work in progress and many GDS features are known to be missing or not working properly. This repo hosts the sources for gdsc

Neo4j 100 Dec 20, 2022