4
4
#
5
5
# filename = os.path.join(str(tmpdir), 'CQC_File')
6
6
#
7
- # with CQCToFile(filename =filename) as cqc:
7
+ # with CQCToFile(file =filename) as cqc:
8
8
9
9
from cqc .pythonLib import CQCToFile , qubit
10
10
import os
@@ -15,15 +15,15 @@ def test_name(tmpdir):
15
15
16
16
filename = os .path .join (str (tmpdir ), 'CQC_File' )
17
17
18
- with CQCToFile (filename = filename ) as cqc :
18
+ with CQCToFile (file = filename ) as cqc :
19
19
assert cqc .name == 'CQCToFile'
20
20
21
21
22
22
def test_sendSimple (tmpdir ):
23
23
24
24
filename = os .path .join (str (tmpdir ), 'CQC_File' )
25
25
26
- with CQCToFile (filename = filename , binary = False ) as cqc :
26
+ with CQCToFile (file = filename , binary = False ) as cqc :
27
27
cqc .sendSimple (CQC_TP_HELLO )
28
28
29
29
with open (filename ) as f :
@@ -36,7 +36,7 @@ def test_createqubit(tmpdir):
36
36
37
37
filename = os .path .join (str (tmpdir ), 'CQC_File' )
38
38
39
- with CQCToFile (filename = filename , binary = False ) as cqc :
39
+ with CQCToFile (file = filename , binary = False ) as cqc :
40
40
41
41
q = qubit (cqc )
42
42
q .H ()
@@ -54,7 +54,7 @@ def test_releasequbit(tmpdir):
54
54
55
55
filename = os .path .join (str (tmpdir ), 'CQC_File' )
56
56
57
- with CQCToFile (filename = filename , binary = False ) as cqc :
57
+ with CQCToFile (file = filename , binary = False ) as cqc :
58
58
59
59
q = qubit (cqc )
60
60
q .H ()
@@ -74,7 +74,7 @@ def test_Hgate(tmpdir):
74
74
75
75
filename = os .path .join (str (tmpdir ), 'CQC_File' )
76
76
77
- with CQCToFile (filename = filename , binary = False ) as cqc :
77
+ with CQCToFile (file = filename , binary = False ) as cqc :
78
78
79
79
q = qubit (cqc )
80
80
q .H ()
@@ -93,7 +93,7 @@ def test_some_combinations(tmpdir):
93
93
94
94
filename = os .path .join (str (tmpdir ), 'CQC_File' )
95
95
96
- with CQCToFile (filename = filename ) as cqc :
96
+ with CQCToFile (file = filename ) as cqc :
97
97
98
98
q = cqc .createEPR ("Alice" )
99
99
q .H ()
@@ -112,7 +112,7 @@ def test_flushing(tmpdir):
112
112
113
113
filename = os .path .join (str (tmpdir ), 'CQC_File' )
114
114
115
- with CQCToFile (filename = filename , pend_messages = True ) as cqc :
115
+ with CQCToFile (file = filename , pend_messages = True ) as cqc :
116
116
117
117
assert not cqc ._pending_headers
118
118
@@ -132,7 +132,7 @@ def test_qubitIDs(tmpdir):
132
132
133
133
filename = os .path .join (str (tmpdir ), 'CQC_File' )
134
134
135
- with CQCToFile (filename = filename ) as cqc :
135
+ with CQCToFile (file = filename ) as cqc :
136
136
137
137
a = qubit (cqc )
138
138
a .X ()
@@ -150,7 +150,7 @@ def test_measurement(tmpdir):
150
150
151
151
filename = os .path .join (str (tmpdir ), 'CQC_File' )
152
152
153
- with CQCToFile (filename = filename ) as cqc :
153
+ with CQCToFile (file = filename ) as cqc :
154
154
155
155
q = qubit (cqc )
156
156
a = q .measure ()
@@ -161,7 +161,7 @@ def test_flush_on_exit(tmpdir):
161
161
162
162
filename = os .path .join (str (tmpdir ), 'CQC_File' )
163
163
164
- with CQCToFile (filename = filename , pend_messages = True , binary = False ) as cqc :
164
+ with CQCToFile (file = filename , pend_messages = True , binary = False ) as cqc :
165
165
166
166
q = qubit (cqc )
167
167
q .H ()
0 commit comments