This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I ran the following code | |
device = 'ibmqx4' | |
print(engine.get_qasm("script")) | |
qobj = engine.compile(["script"], backend=device) | |
print(engine.get_compiled_qasm(qobj,"script")) | |
executedJob = engine.execute(["script"], backend=device, shots=shots, max_credits = 5, wait=2, timeout=600, silent=False) | |
# obviously there was a whole lot of stuff before it too, setting up the code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import math | |
def ClearScreen () : | |
# DESCRIPTION: | |
# Prints a whole bunch of space to screen | |
print("\n"*200) | |
def ColouredString (message,colour) : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
from creative import * | |
def clear_screen(): | |
for _ in range(50): | |
print("") | |
def get_percentage(stats,string): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import select | |
import sys | |
class TimeoutExpired(Exception): | |
pass | |
def timed_input (prompt, timeout): | |
sys.stdout.write(prompt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qr = QuantumRegister(2) | |
qc = QuantumCircuit(qr,cr) | |
qc.h( qr[0] ) | |
qc.cx( qr[0], qr[1] ) | |
qc.ry( np.pi/4, qr[1]) | |
qc.h( qr[1] ) | |
qc.h(qr[0]) | |
qc.h(qr[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit, execute | |
shots = 1024 | |
n = 10 | |
batch = [] | |
for run in range(n): | |
qr = QuantumRegister(1) | |
cr = ClassicalRegister(1) | |
qc = QuantumCircuit(qr, cr) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random |
OlderNewer