tequila-basic 1.9.3__tar.gz → 1.9.5__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 (126) hide show
  1. {tequila-basic-1.9.3/src/tequila_basic.egg-info → tequila-basic-1.9.5}/PKG-INFO +11 -3
  2. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/README.md +10 -2
  3. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/requirements.txt +0 -1
  4. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/adapt/adapt.py +1 -1
  5. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/qasm.py +25 -11
  6. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/optimizers/__init__.py +1 -14
  7. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/optimizers/optimizer_gpyopt.py +0 -2
  8. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/__init__.py +2 -0
  9. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/chemistry_tools.py +26 -15
  10. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/madness_interface.py +1 -1
  11. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/orbital_optimizer.py +16 -8
  12. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/pyscf_interface.py +1 -0
  13. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/qc_base.py +99 -16
  14. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/version.py +1 -1
  15. {tequila-basic-1.9.3 → tequila-basic-1.9.5/src/tequila_basic.egg-info}/PKG-INFO +11 -3
  16. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila_basic.egg-info/SOURCES.txt +0 -2
  17. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_noise_opt.py +0 -14
  18. tequila-basic-1.9.3/src/tequila/optimizers/optimizer_phoenics.py +0 -348
  19. tequila-basic-1.9.3/tests/test_phoenics.py +0 -68
  20. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/LICENSE +0 -0
  21. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/MANIFEST.in +0 -0
  22. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/setup.cfg +0 -0
  23. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/setup.py +0 -0
  24. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/__init__.py +0 -0
  25. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/__init__.py +0 -0
  26. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/_unary_state_prep_impl.py +0 -0
  27. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/adapt/__init__.py +0 -0
  28. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/krylov/__init__.py +0 -0
  29. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/krylov/krylov.py +0 -0
  30. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/robustness/__init__.py +0 -0
  31. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/robustness/helpers.py +0 -0
  32. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/robustness/interval.py +0 -0
  33. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/apps/unary_state_prep.py +0 -0
  34. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/autograd_imports.py +0 -0
  35. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/__init__.py +0 -0
  36. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/_gates_impl.py +0 -0
  37. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/circuit.py +0 -0
  38. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/compiler.py +0 -0
  39. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/gates.py +0 -0
  40. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/gradient.py +0 -0
  41. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/noise.py +0 -0
  42. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/pyzx.py +0 -0
  43. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/circuit/qpic.py +0 -0
  44. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/__init__.py +0 -0
  45. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/binary_rep.py +0 -0
  46. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/binary_utils.py +0 -0
  47. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/compile_groups.py +0 -0
  48. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/ev_utils.py +0 -0
  49. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/fermionic_functions.py +0 -0
  50. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/fermionic_methods.py +0 -0
  51. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/grouping/overlapping_methods.py +0 -0
  52. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/hamiltonian/__init__.py +0 -0
  53. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/hamiltonian/paulis.py +0 -0
  54. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/hamiltonian/paulistring.py +0 -0
  55. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/hamiltonian/qubit_hamiltonian.py +0 -0
  56. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/ml/__init__.py +0 -0
  57. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/ml/interface_torch.py +0 -0
  58. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/ml/ml_api.py +0 -0
  59. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/ml/utils_ml.py +0 -0
  60. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/objective/__init__.py +0 -0
  61. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/objective/braket.py +0 -0
  62. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/objective/objective.py +0 -0
  63. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/objective/qtensor.py +0 -0
  64. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/optimizers/_containers.py +0 -0
  65. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/optimizers/optimizer_base.py +0 -0
  66. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/optimizers/optimizer_gd.py +0 -0
  67. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/optimizers/optimizer_scipy.py +0 -0
  68. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/encodings.py +0 -0
  69. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/quantumchemistry/psi4_interface.py +0 -0
  70. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/__init__.py +0 -0
  71. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_api.py +0 -0
  72. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_base.py +0 -0
  73. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_cirq.py +0 -0
  74. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_pyquil.py +0 -0
  75. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_qibo.py +0 -0
  76. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_qiskit.py +0 -0
  77. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_qlm.py +0 -0
  78. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_qulacs.py +0 -0
  79. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_qulacs_gpu.py +0 -0
  80. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/simulators/simulator_symbolic.py +0 -0
  81. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/tools/__init__.py +0 -0
  82. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/tools/convenience.py +0 -0
  83. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/tools/qng.py +0 -0
  84. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/tools/random_generators.py +0 -0
  85. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/utils/__init__.py +0 -0
  86. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/utils/bitstrings.py +0 -0
  87. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/utils/exceptions.py +0 -0
  88. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/utils/joined_transformation.py +0 -0
  89. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/utils/keymap.py +0 -0
  90. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/utils/misc.py +0 -0
  91. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/wavefunction/__init__.py +0 -0
  92. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila/wavefunction/qubit_wavefunction.py +0 -0
  93. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila_basic.egg-info/dependency_links.txt +0 -0
  94. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila_basic.egg-info/requires.txt +0 -0
  95. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/src/tequila_basic.egg-info/top_level.txt +0 -0
  96. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_TrotErr.py +0 -0
  97. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_adapt.py +0 -0
  98. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_array.py +0 -0
  99. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_binary_pauli.py +0 -0
  100. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_binary_utils.py +0 -0
  101. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_bitstrings.py +0 -0
  102. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_braket.py +0 -0
  103. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_chemistry.py +0 -0
  104. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_chemistry_f12.py +0 -0
  105. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_chemistry_madness.py +0 -0
  106. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_circuits.py +0 -0
  107. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_fermionic_meas.py +0 -0
  108. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_gd_optimizer.py +0 -0
  109. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_gpyopt.py +0 -0
  110. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_gradient.py +0 -0
  111. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_hamiltonian_arithmetic.py +0 -0
  112. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_krylov.py +0 -0
  113. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_mappings.py +0 -0
  114. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_noise.py +0 -0
  115. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_objectives.py +0 -0
  116. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_pyzx.py +0 -0
  117. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_qasm.py +0 -0
  118. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_qtensor.py +0 -0
  119. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_recompilation_routines.py +0 -0
  120. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_scipy.py +0 -0
  121. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_simulator_backends.py +0 -0
  122. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_symbolic_simulator.py +0 -0
  123. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_torch_interface.py +0 -0
  124. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_unary_state_prep.py +0 -0
  125. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_variable.py +0 -0
  126. {tequila-basic-1.9.3 → tequila-basic-1.9.5}/tests/test_zzz_cleanup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tequila-basic
3
- Version: 1.9.3
3
+ Version: 1.9.5
4
4
  Summary: A High-Level Abstraction Framework for Quantum Algorithms
5
5
  Home-page: https://github.com/tequilahub/tequila
6
6
  Author: Tequila Developers
@@ -32,7 +32,7 @@ Tequila can execute the underlying quantum expectation values on state of the ar
32
32
  - [talks and slides](https://kottmanj.github.io/talks_and_material/)
33
33
 
34
34
  # Installation
35
- Recommended Python version is 3.8-3.9.
35
+ Recommended Python version is 3.9 - 3.10.
36
36
  Tequila supports linux, osx and windows. However, not all optional dependencies are supported on windows.
37
37
 
38
38
  ## Install from PyPi
@@ -258,6 +258,14 @@ A.G. Cadavid, I. Montalban, A. Dalal, E. Solano, N.N. Hegade
258
258
  Efficient DCQO Algorithm within the Impulse Regime for Portfolio Optimization
259
259
  [arxiv:2308.15475](https://arxiv.org/abs/2308.15475)
260
260
 
261
+ A. Anand, K. Brown
262
+ Hamiltonians, groups, graphs and ansätze
263
+ [arxiv:2312.17146](https://arxiv.org/abs/2312.17146)
264
+
265
+ P.W.K. Jensen, E.R. Kjellgren, P. Reinholdt, K.M. Ziems, S. Coriani, J. Kongsted, S. Sauer
266
+ Quantum Equation of Motion with Orbital Optimization for Computing Molecular Properties in Near-Term Quantum Computing
267
+ [arxiv:2312.12386](https://arxiv.org/abs/2312.12386)
268
+
261
269
  Let us know, if you want your research project and/or tutorial to be included in this list!
262
270
 
263
271
  # Dependencies
@@ -285,7 +293,7 @@ Currently supported
285
293
  ### [Psi4](https://github.com/psi4/psi4).
286
294
  In a conda environment this can be installed with
287
295
  ```bash
288
- conda install psi4 -c psi4
296
+ conda install psi4 -c conda-forge
289
297
  ```
290
298
  Here is a small [tutorial](https://nbviewer.org/github/tequilahub/tequila-tutorials/blob/main/chemistry/ChemistryModule.ipynb) that illustrates the usage.
291
299
 
@@ -14,7 +14,7 @@ Tequila can execute the underlying quantum expectation values on state of the ar
14
14
  - [talks and slides](https://kottmanj.github.io/talks_and_material/)
15
15
 
16
16
  # Installation
17
- Recommended Python version is 3.8-3.9.
17
+ Recommended Python version is 3.9 - 3.10.
18
18
  Tequila supports linux, osx and windows. However, not all optional dependencies are supported on windows.
19
19
 
20
20
  ## Install from PyPi
@@ -240,6 +240,14 @@ A.G. Cadavid, I. Montalban, A. Dalal, E. Solano, N.N. Hegade
240
240
  Efficient DCQO Algorithm within the Impulse Regime for Portfolio Optimization
241
241
  [arxiv:2308.15475](https://arxiv.org/abs/2308.15475)
242
242
 
243
+ A. Anand, K. Brown
244
+ Hamiltonians, groups, graphs and ansätze
245
+ [arxiv:2312.17146](https://arxiv.org/abs/2312.17146)
246
+
247
+ P.W.K. Jensen, E.R. Kjellgren, P. Reinholdt, K.M. Ziems, S. Coriani, J. Kongsted, S. Sauer
248
+ Quantum Equation of Motion with Orbital Optimization for Computing Molecular Properties in Near-Term Quantum Computing
249
+ [arxiv:2312.12386](https://arxiv.org/abs/2312.12386)
250
+
243
251
  Let us know, if you want your research project and/or tutorial to be included in this list!
244
252
 
245
253
  # Dependencies
@@ -267,7 +275,7 @@ Currently supported
267
275
  ### [Psi4](https://github.com/psi4/psi4).
268
276
  In a conda environment this can be installed with
269
277
  ```bash
270
- conda install psi4 -c psi4
278
+ conda install psi4 -c conda-forge
271
279
  ```
272
280
  Here is a small [tutorial](https://nbviewer.org/github/tequilahub/tequila-tutorials/blob/main/chemistry/ChemistryModule.ipynb) that illustrates the usage.
273
281
 
@@ -20,7 +20,6 @@ openfermion ~= 1.0 # can not be smaller than 1.0
20
20
  #qibo <= 0.1.1 # can not be installed in the same environment as gpyopt
21
21
 
22
22
  #optional optimizers
23
- #phoenics # version on PyPi isc urrently broken, we recommend to install from source (AAG github)
24
23
  #gpyopt # not in combination with qibo as quantum backend
25
24
 
26
25
  #optional third party libraries
@@ -21,7 +21,7 @@ class AdaptParameters:
21
21
  degeneracy_threshold: float = 5.e-4
22
22
  silent: bool = False
23
23
 
24
- def __post__init__(self):
24
+ def __post_init__(self):
25
25
  # avoid stacking of same operator-types in a row
26
26
  if "method_options" in self.optimizer_args:
27
27
  if "gtol" in self.optimizer_args["method_options"]:
@@ -313,19 +313,33 @@ def parse_command(command: str, custom_gates_map: Dict[str, QCircuit], qregister
313
313
  return apply_custom_gate(custom_circuit=custom_circuit, qregisters_values=qregisters_values)
314
314
 
315
315
  if name in ("x", "y", "z", "h", "cx", "cy", "cz", "ch"):
316
- return QCircuit.wrap_gate(gates.impl.QGateImpl(name=(name[1] if name[0] == 'c' else name).upper(),
317
- control=get_qregister(args[0], qregisters) if name[0] == 'c' else None,
318
- target=get_qregister(args[1 if name[0] == 'c' else 0], qregisters)))
316
+ target = get_qregister(args[0], qregisters)
317
+ control = None
318
+ if name[0].lower() == 'c':
319
+ control = get_qregister(args[0], qregisters)
320
+ target = get_qregister(args[1], qregisters)
321
+ name = name[1]
322
+ G = getattr(gates, name.upper())
323
+ return G(control=control, target=target)
324
+
319
325
  if name in ("ccx", "ccy", "ccz"):
320
- return QCircuit.wrap_gate(gates.impl.QGateImpl(name=name.upper()[2],
321
- control=[get_qregister(args[0], qregisters), get_qregister(args[1], qregisters)],
322
- target=get_qregister(args[2], qregisters)))
326
+ G = getattr(gates, name[2].upper())
327
+ control = [get_qregister(args[0], qregisters), get_qregister(args[1], qregisters)]
328
+ target = get_qregister(args[2], qregisters)
329
+ return G(control=control, target=target)
330
+
323
331
  if name.startswith("rx(") or name.startswith("ry(") or name.startswith("rz(") or \
324
332
  name.startswith("crx(") or name.startswith("cry(") or name.startswith("crz("):
325
- return QCircuit.wrap_gate(gates.impl.RotationGateImpl(axis=name[2 if name[0] == 'c' else 1],
326
- angle=get_angle(name)[0],
327
- control=get_qregister(args[0], qregisters) if name[0] == 'c' else None,
328
- target=get_qregister(args[1 if name[0] == 'c' else 0], qregisters)))
333
+ angle = get_angle(name)[0]
334
+ i = name.find('(')
335
+ name = name[0:i]
336
+ name = name.upper()
337
+ name = [x for x in name]
338
+ name[-1] = name[-1].lower()
339
+ name = "".join(name)
340
+ G = getattr(gates, name)
341
+ return G(angle=angle,control=get_qregister(args[0], qregisters) if name[0] == 'C' else None,target=get_qregister(args[1 if name[0] == 'C' else 0], qregisters))
342
+
329
343
  if name.startswith("U("):
330
344
  angles = get_angle(name)
331
345
  return gates.U(theta=angles[0], phi=angles[1], lambd=angles[2],
@@ -362,7 +376,7 @@ def parse_command(command: str, custom_gates_map: Dict[str, QCircuit], qregister
362
376
  control=get_qregister(args[0], qregisters),
363
377
  target=get_qregister(args[1], qregisters))
364
378
  if name in ("s", "t", "sdg", "tdg"):
365
- g = gates.Phase(pi / (2 if name.startswith("s") else 4),
379
+ g = gates.Phase(angle=pi / (2 if name.startswith("s") else 4),
366
380
  control=None,
367
381
  target=get_qregister(args[0], qregisters))
368
382
  if name.find("dg") != -1:
@@ -16,7 +16,7 @@ class _Optimizers:
16
16
  methods: list = None
17
17
 
18
18
 
19
- SUPPORTED_OPTIMIZERS = ['scipy', 'phoenics', 'gpyopt', 'gd']
19
+ SUPPORTED_OPTIMIZERS = ['scipy', 'gpyopt', 'gd']
20
20
  INSTALLED_OPTIMIZERS = {}
21
21
  INSTALLED_OPTIMIZERS['scipy'] = _Optimizers(cls=OptimizerSciPy,
22
22
  minimize=minimize_scipy,
@@ -37,19 +37,6 @@ try:
37
37
  except ImportError:
38
38
  has_gpyopt = False
39
39
 
40
- has_phoenics = False
41
- try:
42
- from tequila.optimizers.optimizer_phoenics import OptimizerPhoenics
43
- from tequila.optimizers.optimizer_phoenics import minimize as minimize_phoenics
44
-
45
- INSTALLED_OPTIMIZERS['phoenics'] = _Optimizers(cls=OptimizerPhoenics,
46
- minimize=minimize_phoenics,
47
- methods=OptimizerPhoenics.available_methods())
48
- has_phoenics = True
49
- except ImportError:
50
- has_phoenics = False
51
-
52
-
53
40
  def show_available_optimizers(module=None):
54
41
  """
55
42
  Returns
@@ -4,8 +4,6 @@ import typing
4
4
  import numbers
5
5
  from tequila.objective.objective import Variable
6
6
  import warnings
7
-
8
- warnings.simplefilter("ignore")
9
7
  import GPyOpt
10
8
  from GPyOpt.methods import BayesianOptimization
11
9
  import numpy as np
@@ -95,6 +95,8 @@ def Molecule(geometry: str = None,
95
95
  if backend is None:
96
96
  if basis_set is None or basis_set.lower() in ["madness", "mra", "pno"]:
97
97
  backend = "madness"
98
+ basis_set = "mra"
99
+ parameters.basis_set = basis_set
98
100
  if orbital_type is not None and orbital_type.lower() not in ["pno", "mra-pno"]:
99
101
  warnings.warn("only PNOs supported as orbital_type without basis set. Setting to pno - You gave={}".format(orbital_type), TequilaWarning)
100
102
  orbital_type = "pno"
@@ -569,7 +569,7 @@ class NBodyTensor:
569
569
  return True
570
570
 
571
571
  def __init__(self, elems: numpy.ndarray = None, active_indices: list = None, ordering: str = None,
572
- size_full: int = None):
572
+ size_full: int = None, verify=False):
573
573
  """
574
574
  Parameters
575
575
  ----------
@@ -611,7 +611,7 @@ class NBodyTensor:
611
611
  if self.order == 4:
612
612
  if ordering is None:
613
613
  ordering = self.identify_ordering()
614
- else:
614
+ elif verify:
615
615
  try: # some RDMs are really sloppy (depends on backend)
616
616
  auto_ordering=self.identify_ordering()
617
617
  if auto_ordering is not ordering:
@@ -804,20 +804,18 @@ class IntegralManager:
804
804
  _one_body_integrals: numpy.ndarray = None
805
805
  _two_body_integrals: NBodyTensor = None
806
806
  _constant_term: float = None
807
- _basis_type: str = "unknown"
808
807
  _basis_name: str = "unknown"
809
808
  _orbital_type: str = "unknown" # e.g. "HF", "PNO", "native"
810
809
  _orbital_coefficients: numpy.ndarray = None
811
810
  _active_space: ActiveSpaceData = None
812
811
  _orbitals: typing.List[OrbitalData] = None
813
812
 
814
- def __init__(self, one_body_integrals, two_body_integrals, basis_type="custom",
813
+ def __init__(self, one_body_integrals, two_body_integrals,
815
814
  basis_name="unknown", orbital_type="unknown",
816
815
  constant_term=0.0, orbital_coefficients=None, active_space=None, overlap_integrals=None, orbitals=None, *args, **kwargs):
817
816
  self._one_body_integrals = one_body_integrals
818
817
  self._two_body_integrals = two_body_integrals
819
818
  self._constant_term = constant_term
820
- self._basis_type = basis_type
821
819
  self._basis_name = basis_name
822
820
  self._orbital_type = orbital_type
823
821
 
@@ -956,9 +954,16 @@ class IntegralManager:
956
954
  """
957
955
  c = self.get_orthonormalized_orbital_coefficients()
958
956
  self.orbital_coefficients=c
959
- self._orbital_type="orthonormalized-{}-basis".format(self._orbital_type)
957
+ self._orbital_type="orthonormalized-{}-basis".format(self._basis_name)
958
+
959
+ def is_unitary(self, U):
960
+ if len(U.shape) != 2: return False
961
+ if U.shape[0] != U.shape[1]: return False
962
+ test = (U.conj().T).dot(U) - numpy.eye(U.shape[0])
963
+ if not numpy.isclose(numpy.linalg.norm(test), 0.0): return False
964
+ return True
960
965
 
961
- def transform_orbitals(self, U):
966
+ def transform_orbitals(self, U, name=None):
962
967
  """
963
968
  Transform orbitals
964
969
  Parameters
@@ -969,10 +974,12 @@ class IntegralManager:
969
974
  -------
970
975
  updates the structure with new orbitals: c = cU
971
976
  """
972
- c = self.orbital_coefficients
973
- c = numpy.einsum("ix, xj -> ij", c, U, optimize="greedy")
974
- self.orbital_coefficients = c
975
- self._orbital_type += "-transformed"
977
+ assert self.is_unitary(U)
978
+ self.orbital_coefficients = numpy.einsum("ix, xj -> ij", self.orbital_coefficients, U, optimize="greedy")
979
+ if name is None:
980
+ self._orbital_type += "-transformed"
981
+ else:
982
+ self._orbital_type = name
976
983
 
977
984
  def get_integrals(self, orbital_coefficients=None, ordering="openfermion", ignore_active_space=False, *args, **kwargs):
978
985
  """
@@ -1001,7 +1008,9 @@ class IntegralManager:
1001
1008
  active_integrals = get_active_space_integrals(one_body_integrals=h, two_body_integrals=g,
1002
1009
  occupied_indices=self._active_space.frozen_reference_orbitals,
1003
1010
  active_indices=self._active_space.active_orbitals)
1011
+
1004
1012
  c = active_integrals[0] + c
1013
+
1005
1014
  h = active_integrals[1]
1006
1015
  g = NBodyTensor(elems=active_integrals[2], ordering="openfermion")
1007
1016
  g.reorder(to=ordering)
@@ -1069,14 +1078,16 @@ class IntegralManager:
1069
1078
  result += str(x) + "\n"
1070
1079
  return result
1071
1080
 
1072
- def print_basis_info(self, *args, **kwargs) -> None:
1073
- print("{:15} : {}".format("basis_type", self._basis_type), *args, **kwargs)
1081
+ def print_basis_info(self, print_coefficients=True, *args, **kwargs) -> None:
1074
1082
  print("{:15} : {}".format("basis_name", self._basis_name), *args, **kwargs)
1075
1083
  print("{:15} : {}".format("orbital_type", self._orbital_type), *args, **kwargs)
1076
- print("{:15} : {}".format("orthogonal", self.basis_is_orthogonal()), *args, **kwargs)
1077
- print("{:15} : {}".format("functions", self.one_body_integrals.shape[0]), *args, **kwargs)
1084
+ print("{:15} : {}".format("orthogonal basis", self.basis_is_orthogonal()), *args, **kwargs)
1085
+ print("{:15} : {}".format("basis functions", self.one_body_integrals.shape[0]), *args, **kwargs)
1086
+ print("{:15} : {}".format("active orbitals", [o.idx_total for o in self.active_orbitals]), *args, **kwargs)
1078
1087
  print("{:15} : {}".format("reference", [x.idx_total for x in self.reference_orbitals]), *args, **kwargs)
1079
1088
 
1089
+ if not print_coefficients: return
1090
+
1080
1091
  print("Current Orbitals", *args, **kwargs)
1081
1092
  for i,x in enumerate(self.orbitals):
1082
1093
  print(x, *args, **kwargs)
@@ -122,7 +122,7 @@ class QuantumChemistryMadness(QuantumChemistryBase):
122
122
  h = "failed"
123
123
  g = "failed"
124
124
 
125
- if "failed" in h or "failed" in g:
125
+ if (isinstance(h, str) and "failed" in h) or (isinstance(g, str) and "failed" in g):
126
126
  status = "found {}_htensor.npy={}\n".format(name, "failed" not in h)
127
127
  status += "found {}_gtensor.npy={}\n".format(name, "failed" not in g)
128
128
  try:
@@ -37,7 +37,7 @@ class OptimizeOrbitalsResult:
37
37
  self.iterations += 1
38
38
 
39
39
  def optimize_orbitals(molecule, circuit=None, vqe_solver=None, pyscf_arguments=None, silent=False,
40
- vqe_solver_arguments=None, initial_guess=None, return_mcscf=False, use_hcb=False, molecule_factory=None, molecule_arguments=None, *args, **kwargs):
40
+ vqe_solver_arguments=None, initial_guess=None, return_mcscf=False, use_hcb=False, molecule_factory=None, molecule_arguments=None, restrict_to_active_space=True, *args, **kwargs):
41
41
  """
42
42
 
43
43
  Parameters
@@ -78,7 +78,12 @@ def optimize_orbitals(molecule, circuit=None, vqe_solver=None, pyscf_arguments=N
78
78
  if pyscf_arguments is None:
79
79
  pyscf_arguments = {"max_cycle_macro": 10, "max_cycle_micro": 3}
80
80
  no = molecule.n_orbitals
81
- pyscf_molecule = QuantumChemistryPySCF.from_tequila(molecule=molecule, transformation=molecule.transformation)
81
+
82
+ if not isinstance(molecule, QuantumChemistryPySCF):
83
+ pyscf_molecule = QuantumChemistryPySCF.from_tequila(molecule=molecule, transformation=molecule.transformation)
84
+ else:
85
+ pyscf_molecule = molecule
86
+
82
87
  mf = pyscf_molecule._get_hf()
83
88
  result=OptimizeOrbitalsResult()
84
89
  mc = mcscf.CASSCF(mf, pyscf_molecule.n_orbitals, pyscf_molecule.n_electrons)
@@ -118,13 +123,15 @@ def optimize_orbitals(molecule, circuit=None, vqe_solver=None, pyscf_arguments=N
118
123
  print(wrapper)
119
124
  if initial_guess is not None:
120
125
  if hasattr(initial_guess, "lower"):
121
- if "random" in initial_guess.lower():
122
- scale = 0.1
126
+ if "random" or "near_zero" in initial_guess.lower():
127
+ scale = 1.e-3
128
+ if "random" in initial_guess.lower():
129
+ scale = 1.0
123
130
  loc = 0.0
124
131
  if "scale" in kwargs:
125
- scale = kwargs["scale"]
132
+ scale = float(initial_guess.split("scale")[1].split("_")[0].split("=")[1])
126
133
  if "loc" in kwargs:
127
- loc = kwargs["loc"]
134
+ loc = float(initial_guess.split("loc")[1].split("_")[0].split("=")[1])
128
135
  initial_guess = numpy.eye(no) + numpy.random.normal(scale=scale, loc=loc, size=no * no).reshape(no, no)
129
136
  else:
130
137
  raise Exception("Unknown initial_guess={}".format(initial_guess.lower()))
@@ -138,10 +145,11 @@ def optimize_orbitals(molecule, circuit=None, vqe_solver=None, pyscf_arguments=N
138
145
  mc.kernel()
139
146
  # make new molecule
140
147
 
141
- transformed_molecule = pyscf_molecule.transform_orbitals(orbital_coefficients=mc.mo_coeff)
148
+ mo_coeff = mc.mo_coeff
149
+ transformed_molecule = pyscf_molecule.transform_orbitals(orbital_coefficients=mo_coeff, name="optimized")
142
150
  result.molecule=transformed_molecule
143
151
  result.old_molecule=molecule
144
- result.mo_coeff=mc.mo_coeff
152
+ result.mo_coeff=mo_coeff
145
153
  result.energy=mc.e_tot
146
154
 
147
155
  if return_mcscf:
@@ -75,6 +75,7 @@ class QuantumChemistryPySCF(QuantumChemistryBase):
75
75
  kwargs["two_body_integrals"] = g_ao
76
76
  kwargs["one_body_integrals"] = h_ao
77
77
  kwargs["orbital_coefficients"] = mo_coeff
78
+ kwargs["orbital_type"] = "hf"
78
79
 
79
80
  if "nuclear_repulsion" not in kwargs:
80
81
  kwargs["nuclear_repulsion"] = mol.energy_nuc()
@@ -94,7 +94,7 @@ class QuantumChemistryBase:
94
94
  else:
95
95
  self.integral_manager = self.initialize_integral_manager(active_orbitals=active_orbitals,
96
96
  reference_orbitals=reference_orbitals,
97
- orbitals=orbitals, frozen_orbitals=frozen_orbitals, orbital_type=orbital_type, *args,
97
+ orbitals=orbitals, frozen_orbitals=frozen_orbitals, orbital_type=orbital_type, basis_name=self.parameters.basis_set, *args,
98
98
  **kwargs)
99
99
 
100
100
  if orbital_type is not None and orbital_type.lower() == "native":
@@ -109,15 +109,23 @@ class QuantumChemistryBase:
109
109
 
110
110
  @classmethod
111
111
  def from_tequila(cls, molecule, transformation=None, *args, **kwargs):
112
- c, h1, h2 = molecule.get_integrals()
112
+ c = molecule.integral_manager.constant_term
113
+ h1 = molecule.integral_manager.one_body_integrals
114
+ h2 = molecule.integral_manager.two_body_integrals
115
+ S = molecule.integral_manager.overlap_integrals
116
+ active_orbitals = [o.idx_total for o in molecule.integral_manager.active_orbitals]
113
117
  if transformation is None:
114
118
  transformation = molecule.transformation
119
+ parameters = molecule.parameters
115
120
  return cls(nuclear_repulsion=c,
116
121
  one_body_integrals=h1,
117
122
  two_body_integrals=h2,
118
- n_electrons=molecule.n_electrons,
123
+ overlap_integrals = S,
124
+ orbital_coefficients = molecule.integral_manager.orbital_coefficients,
125
+ active_orbitals= active_orbitals,
119
126
  transformation=transformation,
120
- parameters=molecule.parameters, *args, **kwargs)
127
+ orbital_type=molecule.integral_manager._orbital_type,
128
+ parameters=parameters, *args, **kwargs)
121
129
 
122
130
  def supports_ucc(self):
123
131
  """
@@ -543,11 +551,13 @@ class QuantumChemistryBase:
543
551
 
544
552
  return manager
545
553
 
546
- def transform_orbitals(self, orbital_coefficients, *args, **kwargs):
554
+ def transform_orbitals(self, orbital_coefficients, ignore_active_space=False, name=None, *args, **kwargs):
547
555
  """
548
556
  Parameters
549
557
  ----------
550
- orbital_coefficients: second index is new orbital indes, first is old orbital index (summed over)
558
+ orbital_coefficients: second index is new orbital indes, first is old orbital index (summed over), indices are assumed to be defined on the active space
559
+ ignore_active_space: if true orbital_coefficients are not assumed to be given in the active space
560
+ name: str, name the new orbitals
551
561
  args
552
562
  kwargs
553
563
 
@@ -556,9 +566,20 @@ class QuantumChemistryBase:
556
566
  New molecule with transformed orbitals
557
567
  """
558
568
 
569
+ U = numpy.eye(self.integral_manager.orbital_coefficients.shape[0])
570
+ # mo_coeff by default only acts on the active space
571
+ active_indices = [o.idx_total for o in self.integral_manager.active_orbitals]
572
+
573
+ if ignore_active_space:
574
+ U = orbital_coefficients
575
+ else:
576
+ for kk,k in enumerate(active_indices):
577
+ for ll,l in enumerate(active_indices):
578
+ U[k][l] = orbital_coefficients[kk][ll]
579
+
559
580
  # can not be an instance of a specific backend (otherwise we get inconsistencies with classical methods in the backend)
560
581
  integral_manager = copy.deepcopy(self.integral_manager)
561
- integral_manager.transform_orbitals(U=orbital_coefficients)
582
+ integral_manager.transform_orbitals(U=U, name=name)
562
583
  result = QuantumChemistryBase(parameters=self.parameters, integral_manager=integral_manager, transformation=self.transformation)
563
584
  return result
564
585
 
@@ -583,7 +604,7 @@ class QuantumChemistryBase:
583
604
  else:
584
605
  integral_manager = copy.deepcopy(self.integral_manager)
585
606
  integral_manager.transform_to_native_orbitals()
586
- result = QuantumChemistryBase(parameters=self.parameters, integral_manager=integral_manager, orbital_type="native", transformation=self.transformation)
607
+ result = QuantumChemistryBase(parameters=self.parameters, integral_manager=integral_manager, transformation=self.transformation)
587
608
  return result
588
609
 
589
610
 
@@ -645,6 +666,68 @@ class QuantumChemistryBase:
645
666
  """
646
667
  return 2 * len(self.integral_manager.active_reference_orbitals)
647
668
 
669
+ def make_annihilation_op(self, orbital, coefficient=1.0):
670
+ """
671
+ Compute annihilation operator on spin-orbital in qubit representation
672
+ Spin-orbital order is always (up,down,up,down,...)
673
+ """
674
+ assert orbital<=self.n_orbitals*2
675
+ aop = openfermion.ops.FermionOperator(f'{orbital}', coefficient)
676
+ return self.transformation(aop)
677
+
678
+ def make_creation_op(self, orbital, coefficient=1.0):
679
+ """
680
+ Compute creation operator on spin-orbital in qubit representation
681
+ Spin-orbital order is always (up,down,up,down,...)
682
+ """
683
+ assert orbital<=self.n_orbitals*2
684
+ cop = openfermion.ops.FermionOperator(f'{orbital}^', coefficient)
685
+ return self.transformation(cop)
686
+
687
+ def make_number_op(self, orbital):
688
+ """
689
+ Compute number operator on spin-orbital in qubit representation
690
+ Spin-orbital order is always (up,down,up,down,...)
691
+ """
692
+ num_op = self.make_creation_op(orbital) * self.make_annihilation_op(orbital)
693
+ return num_op
694
+
695
+ def make_sz_op(self):
696
+ """
697
+ Compute the spin_z operator of the molecule in qubit representation
698
+ """
699
+ sz = QubitHamiltonian()
700
+ for i in range(0, self.n_orbitals * 2, 2):
701
+ one = 0.5 * self.make_creation_op(i) * self.make_annihilation_op(i)
702
+ two = 0.5 * self.make_creation_op(i+1) * self.make_annihilation_op(i+1)
703
+ sz += (one - two)
704
+ return sz
705
+
706
+ def make_sp_op(self):
707
+ """
708
+ Compute the spin+ operator of the molecule in qubit representation
709
+ """
710
+ sp = QubitHamiltonian()
711
+ for i in range(self.n_orbitals):
712
+ sp += self.make_creation_op(i*2) * self.make_annihilation_op(i*2 + 1)
713
+ return sp
714
+
715
+ def make_sm_op(self):
716
+ """
717
+ Compute the spin- operator of the molecule in qubit representation
718
+ """
719
+ sm = QubitHamiltonian()
720
+ for i in range(self.n_orbitals):
721
+ sm += self.make_creation_op(i*2 + 1) * self.make_annihilation_op(i*2)
722
+ return sm
723
+
724
+ def make_s2_op(self):
725
+ """
726
+ Compute the spin^2 operator of the molecule in qubit representation
727
+ """
728
+ s2_op = self.make_sm_op() * self.make_sp_op() + self.make_sz_op() * (self.make_sz_op() + 1)
729
+ return s2_op
730
+
648
731
  def make_hamiltonian(self, *args, **kwargs) -> QubitHamiltonian:
649
732
  """
650
733
  Parameters
@@ -805,13 +888,13 @@ class QuantumChemistryBase:
805
888
  """
806
889
  if U is None:
807
890
  U = QCircuit()
808
-
809
- # consistency
810
- consistency = [x < self.n_orbitals for x in U.qubits]
811
- if not all(consistency):
812
- warnings.warn(
813
- "hcb_to_me: given circuit is not defined on the first {} qubits. Is this a HCB circuit?".format(
814
- self.n_orbitals))
891
+ else:
892
+ ups = [self.transformation.up(i.idx) for i in self.orbitals]
893
+ consistency = [x in ups for x in U.qubits]
894
+ if not all(consistency):
895
+ warnings.warn(
896
+ "hcb_to_me: given circuit is not defined on all first {} qubits. Is this a HCB circuit?".format(
897
+ self.n_orbitals))
815
898
 
816
899
  # map to alpha qubits
817
900
  if condensed:
@@ -1939,7 +2022,7 @@ class QuantumChemistryBase:
1939
2022
  self._rdm2 = _assemble_rdm2_spinful(evals_2) if get_rdm2 else self._rdm2
1940
2023
 
1941
2024
  if get_rdm2:
1942
- rdm2 = NBodyTensor(elems=self.rdm2, ordering="dirac")
2025
+ rdm2 = NBodyTensor(elems=self.rdm2, ordering="dirac", verify=False)
1943
2026
  rdm2.reorder(to=ordering)
1944
2027
  rdm2 = rdm2.elems
1945
2028
  self._rdm2 = rdm2
@@ -1,2 +1,2 @@
1
- __version__ = "1.9.3"
1
+ __version__ = "1.9.5"
2
2
  __author__ = "Tequila Developers "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tequila-basic
3
- Version: 1.9.3
3
+ Version: 1.9.5
4
4
  Summary: A High-Level Abstraction Framework for Quantum Algorithms
5
5
  Home-page: https://github.com/tequilahub/tequila
6
6
  Author: Tequila Developers
@@ -32,7 +32,7 @@ Tequila can execute the underlying quantum expectation values on state of the ar
32
32
  - [talks and slides](https://kottmanj.github.io/talks_and_material/)
33
33
 
34
34
  # Installation
35
- Recommended Python version is 3.8-3.9.
35
+ Recommended Python version is 3.9 - 3.10.
36
36
  Tequila supports linux, osx and windows. However, not all optional dependencies are supported on windows.
37
37
 
38
38
  ## Install from PyPi
@@ -258,6 +258,14 @@ A.G. Cadavid, I. Montalban, A. Dalal, E. Solano, N.N. Hegade
258
258
  Efficient DCQO Algorithm within the Impulse Regime for Portfolio Optimization
259
259
  [arxiv:2308.15475](https://arxiv.org/abs/2308.15475)
260
260
 
261
+ A. Anand, K. Brown
262
+ Hamiltonians, groups, graphs and ansätze
263
+ [arxiv:2312.17146](https://arxiv.org/abs/2312.17146)
264
+
265
+ P.W.K. Jensen, E.R. Kjellgren, P. Reinholdt, K.M. Ziems, S. Coriani, J. Kongsted, S. Sauer
266
+ Quantum Equation of Motion with Orbital Optimization for Computing Molecular Properties in Near-Term Quantum Computing
267
+ [arxiv:2312.12386](https://arxiv.org/abs/2312.12386)
268
+
261
269
  Let us know, if you want your research project and/or tutorial to be included in this list!
262
270
 
263
271
  # Dependencies
@@ -285,7 +293,7 @@ Currently supported
285
293
  ### [Psi4](https://github.com/psi4/psi4).
286
294
  In a conda environment this can be installed with
287
295
  ```bash
288
- conda install psi4 -c psi4
296
+ conda install psi4 -c conda-forge
289
297
  ```
290
298
  Here is a small [tutorial](https://nbviewer.org/github/tequilahub/tequila-tutorials/blob/main/chemistry/ChemistryModule.ipynb) that illustrates the usage.
291
299
 
@@ -51,7 +51,6 @@ src/tequila/optimizers/_containers.py
51
51
  src/tequila/optimizers/optimizer_base.py
52
52
  src/tequila/optimizers/optimizer_gd.py
53
53
  src/tequila/optimizers/optimizer_gpyopt.py
54
- src/tequila/optimizers/optimizer_phoenics.py
55
54
  src/tequila/optimizers/optimizer_scipy.py
56
55
  src/tequila/quantumchemistry/__init__.py
57
56
  src/tequila/quantumchemistry/chemistry_tools.py
@@ -110,7 +109,6 @@ tests/test_mappings.py
110
109
  tests/test_noise.py
111
110
  tests/test_noise_opt.py
112
111
  tests/test_objectives.py
113
- tests/test_phoenics.py
114
112
  tests/test_pyzx.py
115
113
  tests/test_qasm.py
116
114
  tests/test_qtensor.py
@@ -59,20 +59,6 @@ def test_bit_flip_scipy_hessian(p, method):
59
59
  result = tq.optimizer_scipy.minimize(objective=O, samples=1, backend=simulator, method=method, noise=NM, tol=1.e-4,
60
60
  silent=False)
61
61
 
62
-
63
- @pytest.mark.skipif(len(samplers) == 0, reason="Missing necessary backends")
64
- @pytest.mark.skipif(not tq.optimizers.has_phoenics, reason="Missing phoenics installation")
65
- @pytest.mark.parametrize("p", numpy.random.uniform(0.1, .4, 1))
66
- def test_bit_flip_phoenics(p):
67
- simulator = numpy.random.choice(samplers)
68
- qubit = 0
69
- H = paulis.Qm(qubit)
70
- U = gates.Rx(target=qubit, angle=tq.Variable('a'))
71
- O = ExpectationValue(U=U, H=H)
72
- NM = BitFlip(p, 1)
73
- result = tq.optimizers.optimizer_phoenics.minimize(objective=O, maxiter=3, samples=1, backend=simulator, noise=NM)
74
-
75
-
76
62
  @pytest.mark.skipif(len(samplers) == 0, reason="Missing necessary backends")
77
63
  @pytest.mark.skipif(not tq.optimizers.has_gpyopt, reason="Missing gpyopt installation")
78
64
  @pytest.mark.parametrize("p", numpy.random.uniform(0.1, .4, 1))