pyqrack-cuda 1.34.5__tar.gz → 1.34.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/Makefile +1 -1
  2. {pyqrack_cuda-1.34.5/pyqrack_cuda.egg-info → pyqrack_cuda-1.34.6}/PKG-INFO +1 -1
  3. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/qrack_circuit.py +10 -5
  4. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6/pyqrack_cuda.egg-info}/PKG-INFO +1 -1
  5. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/setup.py +1 -1
  6. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/LICENSE +0 -0
  7. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/MANIFEST.in +0 -0
  8. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/README.md +0 -0
  9. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyproject.toml +0 -0
  10. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/__init__.py +0 -0
  11. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/neuron_activation_fn.py +0 -0
  12. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/pauli.py +0 -0
  13. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/qrack_neuron.py +0 -0
  14. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/qrack_simulator.py +0 -0
  15. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/qrack_system/__init__.py +0 -0
  16. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/qrack_system/qrack_system.py +0 -0
  17. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/quimb_circuit_type.py +0 -0
  18. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/util/__init__.py +0 -0
  19. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack/util/convert_qiskit_circuit_to_qasm_experiment.py +0 -0
  20. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack_cuda.egg-info/SOURCES.txt +0 -0
  21. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack_cuda.egg-info/dependency_links.txt +0 -0
  22. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack_cuda.egg-info/not-zip-safe +0 -0
  23. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack_cuda.egg-info/requires.txt +0 -0
  24. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/pyqrack_cuda.egg-info/top_level.txt +0 -0
  25. {pyqrack_cuda-1.34.5 → pyqrack_cuda-1.34.6}/setup.cfg +0 -0
@@ -18,7 +18,7 @@ help:
18
18
  build-deps:
19
19
  ifneq ($(OS),Windows_NT)
20
20
  ifeq ($(QRACK_PRESENT),)
21
- git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout 0e8b70f19c0f08a700d9ee63bf1a4b204a746235; cd ..
21
+ git clone https://github.com/unitaryfund/qrack.git; cd qrack; git checkout 3d2bdc25d5a676ce48691e46eef57737b8acdd04; cd ..
22
22
  endif
23
23
  mkdir -p qrack/build
24
24
  ifeq ($(UNAME_S),Linux)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyqrack-cuda
3
- Version: 1.34.5
3
+ Version: 1.34.6
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -74,12 +74,12 @@ class QrackCircuit:
74
74
  nrm = abs(m[0])
75
75
  if (nrm * nrm) < sys.float_info.epsilon:
76
76
  phase = 1.0 + 0.0j
77
- th = math.pi / 2;
77
+ th = math.pi;
78
78
  else:
79
79
  phase = m[0] / nrm
80
80
  if nrm > 1.0:
81
81
  nrm = 1.0
82
- th = math.acos(nrm)
82
+ th = 2 * math.acos(nrm)
83
83
 
84
84
  nrm1 = abs(m[1])
85
85
  nrm2 = abs(m[2])
@@ -107,13 +107,16 @@ class QrackCircuit:
107
107
  return [c + 0j, -el * s, ep * s, ep * el * c]
108
108
 
109
109
  def _u4_to_mtrx(params):
110
- m = _u3_to_mtrx(params)
110
+ m = QrackCircuit._u3_to_mtrx(params)
111
111
  g = np.exp(1j * float(params[3]))
112
112
  for i in range(4):
113
113
  m[i] *= g
114
114
 
115
115
  return m
116
116
 
117
+ def _make_mtrx_unitary(m):
118
+ return QrackCircuit._u4_to_mtrx(QrackCircuit._mtrx_to_u4(m))
119
+
117
120
  def clone(self):
118
121
  """Make a new circuit that is an exact clone of this circuit
119
122
 
@@ -337,6 +340,7 @@ class QrackCircuit:
337
340
  num_gates = int(tokens[i])
338
341
  i += 1
339
342
 
343
+ identity = np.eye(2, dtype=complex)
340
344
  for g in range(num_gates):
341
345
  target = int(tokens[i])
342
346
  i += 1
@@ -361,6 +365,8 @@ class QrackCircuit:
361
365
  mtrx.append(float(amp[0]) + float(amp[1])*1j)
362
366
  i += 1
363
367
 
368
+ mtrx = QrackCircuit._make_mtrx_unitary(mtrx)
369
+
364
370
  op = np.eye(2, dtype=complex)
365
371
  op[0][0] = mtrx[0]
366
372
  op[0][1] = mtrx[1]
@@ -369,14 +375,13 @@ class QrackCircuit:
369
375
 
370
376
  payloads[key] = op
371
377
 
372
- identity = np.eye(2, dtype=complex)
373
378
  gate_list=[]
374
379
  for j in range(1 << control_count):
375
380
  if j in payloads:
376
381
  gate_list.append(payloads[j])
377
382
  else:
378
383
  gate_list.append(identity)
379
- circ.append(UCGate(gate_list), controls + [target])
384
+ circ.append(UCGate(gate_list), [target] + controls)
380
385
 
381
386
  return circ
382
387
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyqrack-cuda
3
- Version: 1.34.5
3
+ Version: 1.34.6
4
4
  Summary: pyqrack - Pure Python vm6502q/qrack Wrapper
5
5
  Home-page: https://github.com/vm6502q/pyqrack
6
6
  Author: Daniel Strano
@@ -7,7 +7,7 @@ from setuptools import setup
7
7
  from setuptools.command.build_py import build_py
8
8
 
9
9
 
10
- VERSION = "1.34.5"
10
+ VERSION = "1.34.6"
11
11
 
12
12
  # Read long description from README.
13
13
  README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md')
File without changes
File without changes
File without changes
File without changes