Skip to content

Commit d8444ef

Browse files
fixed bug: cudaq export
1 parent 388d5b8 commit d8444ef

4 files changed

Lines changed: 11 additions & 7 deletions

File tree

genQC/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.0"
1+
__version__ = "0.2.1"

genQC/platform/backends/circuits_cudaq.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ def check_error_circuit(self,
119119

120120
return True
121121

122-
def genqc_to_backend(self, instructions: CircuitInstructions) -> cudaq.kernel:
122+
def genqc_to_backend(self,
123+
instructions: CircuitInstructions,
124+
**kwargs) -> cudaq.kernel:
123125
"""Convert given genQC `CircuitInstructions` to a `cudaq.kernel`."""
124126

125127
_params = torch.tensor([

settings.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
### Python library ###
44
repo = genQC
55
lib_name = %(repo)s
6-
version = 0.2.0
6+
version = 0.2.1
77
min_python = 3.12
88
license = apache2
99
black_formatting = False

src/platform/backends/circuits_cudaq.ipynb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@
173173
"\n",
174174
" return True\n",
175175
" \n",
176-
" def genqc_to_backend(self, instructions: CircuitInstructions) -> cudaq.kernel:\n",
176+
" def genqc_to_backend(self, \n",
177+
" instructions: CircuitInstructions,\n",
178+
" **kwargs) -> cudaq.kernel:\n",
177179
" \"\"\"Convert given genQC `CircuitInstructions` to a `cudaq.kernel`.\"\"\"\n",
178180
"\n",
179181
" _params = torch.tensor([\n",
@@ -330,7 +332,7 @@
330332
"q2 : ┤ ry(0.1) ├──●───╳───────────────────────\n",
331333
" ╰─────────╯ \n",
332334
"\n",
333-
"Measurement distribution:{ 000:85 010:424 100:83 101:1 110:406 111:1 }\n",
335+
"Measurement distribution:{ 000:81 010:413 100:84 101:1 110:421 }\n",
334336
"\n"
335337
]
336338
}
@@ -422,8 +424,8 @@
422424
"name": "stdout",
423425
"output_type": "stream",
424426
"text": [
425-
"Timeit target='qpp-cpu': 705 μs ± 758 ns per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n",
426-
"Timeit target='nvidia': 4.68 ms ± 23.7 μs per loop (mean ± std. dev. of 7 runs, 100 loops each)\n"
427+
"Timeit target='qpp-cpu': 1.14 ms ± 63.4 μs per loop (mean ± std. dev. of 7 runs, 1,000 loops each)\n",
428+
"Timeit target='nvidia': 157 ms ± 24 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
427429
]
428430
}
429431
],

0 commit comments

Comments
 (0)