Skip to content

Fix issue #6 #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions engine.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit, execute, Aer
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit, execute, BasicAer

import numpy as np
import matplotlib.pyplot as plt
Expand All @@ -21,7 +21,7 @@

class run_game():

def __init__(self,initialize, success_condition, allowed_gates, vi, qubit_names, eps=0.1, backend='qasm_simulator_py',shots=1024,mode='circle',verbose=False):
def __init__(self,initialize, success_condition, allowed_gates, vi, qubit_names, eps=0.1, backend='qasm_simulator',shots=1024,mode='circle',verbose=False):

def get_total_gate_list():
# get a text block describing allowed gates
Expand Down Expand Up @@ -193,7 +193,7 @@ def given_action(c):

class pauli_grid():

def __init__(self,backend='qasm_simulator_py',shots=1024,mode='circle'):
def __init__(self,backend='qasm_simulator',shots=1024,mode='circle'):

self.backend = backend
self.shots = shots
Expand Down Expand Up @@ -244,7 +244,7 @@ def get_rho(self):
temp_qc.h(self.qr[j])
temp_qc.barrier(self.qr)
temp_qc.measure(self.qr,self.cr)
job = execute(temp_qc, backend=Aer.get_backend(self.backend), shots=self.shots)
job = execute(temp_qc, backend=BasicAer.get_backend(self.backend), shots=self.shots)
results[basis] = job.result().get_counts()
for string in results[basis]:
results[basis][string] = results[basis][string]/self.shots
Expand Down