tequila-basic 1.9.0__py3-none-any.whl → 1.9.1__py3-none-any.whl

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.
tequila/circuit/gates.py CHANGED
@@ -1081,10 +1081,14 @@ class QubitExcitationImpl(impl.GeneralizedRotationImpl):
1081
1081
  def compile(self, exponential_pauli=False, *args, **kwargs):
1082
1082
  # optimized compiling for single and double qubit excitaitons following arxiv:2005.14475
1083
1083
  # Alternative representation in arxiv:2104.05695 (not implemented -> could be added and controlled with optional compile keywords)
1084
+ if self.is_controlled():
1085
+ control = list(self.control)
1086
+ else:
1087
+ control = []
1084
1088
  if self.compile_options == "optimize" and len(self.target) == 2 and exponential_pauli:
1085
1089
  p,q = self.target
1086
1090
  U0 = X(target=p, control=q)
1087
- U1 = Ry(angle=self.parameter, target=q, control=p)
1091
+ U1 = Ry(angle=self.parameter, target=q, control=[p]+control)
1088
1092
  return U0 + U1 + U0
1089
1093
  elif self.compile_options == "optimize" and len(self.target) == 4 and exponential_pauli:
1090
1094
  p,r,q,s = self.target
@@ -1093,10 +1097,11 @@ class QubitExcitationImpl(impl.GeneralizedRotationImpl):
1093
1097
  U0 += X(target=r, control=p)
1094
1098
  U0 += X(target=q)
1095
1099
  U0 += X(target=s)
1096
- U1 = Ry(angle=-self.parameter, target=p, control=[q,r,s])
1100
+ U1 = Ry(angle=-self.parameter, target=p, control=[q,r,s]+control)
1097
1101
  return U0 + U1 + U0.dagger()
1098
1102
  else:
1099
- return Trotterized(angle=self.parameter, generator=self.generator, steps=1)
1103
+ return Trotterized(angle=self.parameter, generator=self.generator, steps=1, control=self.control)
1104
+
1100
1105
 
1101
1106
  def _convert_Paulistring(paulistring: typing.Union[PauliString, str, dict]) -> PauliString:
1102
1107
  '''
@@ -334,11 +334,12 @@ class OptimizerGD(Optimizer):
334
334
 
335
335
 
336
336
  if not self.silent:
337
+ self.__dx = numpy.asarray(self.__dx)
337
338
  print("%3i %+15.8f %+7.2e %7.3e %7.3e %s"
338
339
  % (step,
339
340
  e,
340
341
  e-last,
341
- numpy.max(abs(self.__dx)),
342
+ numpy.max([abs(x) for x in self.__dx]),
342
343
  numpy.sqrt(numpy.average(self.__dx**2)),
343
344
  comment))
344
345
 
@@ -46,7 +46,15 @@ class QuantumChemistryPySCF(QuantumChemistryBase):
46
46
  # solve restricted HF
47
47
  mf = pyscf.scf.RHF(mol)
48
48
  mf.kernel()
49
- self.irreps = mf.get_irrep_nelec()
49
+
50
+ # only works if point_group is not C1
51
+ # otherwise PySCF uses a different SCF object
52
+ # irrep information is however not critical to tequila
53
+ if hasattr(mf, "get_irrep_nelec"):
54
+ self.irreps = mf.get_irrep_nelec()
55
+ else:
56
+ self.irreps = None
57
+
50
58
  orbital_energies = mf.mo_energy
51
59
 
52
60
  # compute mo integrals
tequila/version.py CHANGED
@@ -1,2 +1,2 @@
1
- __version__ = "1.9.0"
1
+ __version__ = "1.9.1"
2
2
  __author__ = "Tequila Developers "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tequila-basic
3
- Version: 1.9.0
3
+ Version: 1.9.1
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
@@ -1,6 +1,6 @@
1
1
  tequila/__init__.py,sha256=FV8-j7GEw_VYadsZUp3M2mGRQxVUYYG3W1jiI6in3CY,1959
2
2
  tequila/autograd_imports.py,sha256=t7V5uYaI0GzjD7pSjkYtiaj3BzSvkm_RL2KcYfNwNhM,1529
3
- tequila/version.py,sha256=yw9TWBqTIoEHnuEUf1CchL2YOOv5s2m16kwwu_Crdkw,57
3
+ tequila/version.py,sha256=OQns-ZLbw14JA1biX794LPwT3m5kGViyNFrR4FKkTfU,57
4
4
  tequila/apps/__init__.py,sha256=GJb04napv8AAx5EHxS5C1CMv9kxQeu7aA-ZMWk6X_eQ,1623
5
5
  tequila/apps/_unary_state_prep_impl.py,sha256=SzRtI0Nx29ODygvYYdC1NnSTCL70wY7NTAvqhiwpMDs,21757
6
6
  tequila/apps/unary_state_prep.py,sha256=QCrD9Ty2RkXc1Mh_MitFPIdaPs_fLxp_dtWVBZi0tSE,9403
@@ -15,7 +15,7 @@ tequila/circuit/__init__.py,sha256=ZgoUEjU_NggxjKYkJjh5aO-6VdUjnO5CLxKB44rHzQc,3
15
15
  tequila/circuit/_gates_impl.py,sha256=iB40Sg9l9UoCCayu0l4vGjgvEHUVVbXMaGdUtXIHa1w,17821
16
16
  tequila/circuit/circuit.py,sha256=u1qwDFNrZspgea4BFcxwG-hk43ZKAtO2GVCchuctu4s,32044
17
17
  tequila/circuit/compiler.py,sha256=fsHnnNZo43VWUl_n34P21b4GAi7k2kwoYdx0xlbAuZY,32685
18
- tequila/circuit/gates.py,sha256=kS81jmbIhFUbQvpobHTGac-75MMFGjYes1RdlGNdqYU,35752
18
+ tequila/circuit/gates.py,sha256=pOvX9_vACFyUAZRG4EGW3_aZGXysUJwUV8oFiKyLJ50,35906
19
19
  tequila/circuit/gradient.py,sha256=Y4dNL6nkZUEkKJvaA3hxaSEa8_b_3XZwxy3j8tGsOmA,10465
20
20
  tequila/circuit/noise.py,sha256=2LJ7Xq5f78x9p4imIz76l_lABQZwgNteNBFkWmUAQvo,8322
21
21
  tequila/circuit/pyzx.py,sha256=XHhKoklhEcbpYkgkWHBLmKF-vyt_Oz-pX-Ctvd4nAOQ,1472
@@ -44,7 +44,7 @@ tequila/objective/qtensor.py,sha256=eSjFOEVW-kLoM8jn1RD2_E_kHVAm579Ji3_lMcJg7cE,
44
44
  tequila/optimizers/__init__.py,sha256=sSyXc_FD0wTzS0cmgkdf1DhH-0XMUp2k5wARMM57nhI,5603
45
45
  tequila/optimizers/_containers.py,sha256=CXbWWQory_aADxlaMw4deIr03K_el-0E12GmpA0vX10,7161
46
46
  tequila/optimizers/optimizer_base.py,sha256=Nc1HwlgfeB6XifoaWdFVLhdyHfeqQuhLvOtmtoFDMPY,32272
47
- tequila/optimizers/optimizer_gd.py,sha256=KCwU2MjfotTMZPahhcAc7RuIICgMtImJEX7uai1Nmjs,38993
47
+ tequila/optimizers/optimizer_gd.py,sha256=QF84K2XDn_-0w9htDlEpIaaGGtfudNamIvVCgx1JkuE,39059
48
48
  tequila/optimizers/optimizer_gpyopt.py,sha256=ZDiln0khwc5PHTBuX83eRkclSKIt-iFVYaTK8A1ZX9w,11313
49
49
  tequila/optimizers/optimizer_phoenics.py,sha256=31GBSC4P_-JqjYn3Bjmn3W7vDXW3Zn8aRxi8FWh2Uqc,13448
50
50
  tequila/optimizers/optimizer_scipy.py,sha256=zqRVQ-Whr74KCGP7Zg1jQkl9S3j9s1kS4oCrCtX30gY,18949
@@ -54,7 +54,7 @@ tequila/quantumchemistry/encodings.py,sha256=y9h6rjq1K9IPVBMbRFQWXyBuAIZzgh2DVw2
54
54
  tequila/quantumchemistry/madness_interface.py,sha256=WbBnbVInjoA_2xtp7ejifj2I1L7ZHtxK5ToOEwMD2BY,36254
55
55
  tequila/quantumchemistry/orbital_optimizer.py,sha256=dmwj9cm0wj6W6oSvhO-JTNJVF6EQH5onF4JOkvsncL0,11745
56
56
  tequila/quantumchemistry/psi4_interface.py,sha256=syNaDvlSmCsyB4f7idn3VGbMKyKo83vJHD5y5LpHwaM,29953
57
- tequila/quantumchemistry/pyscf_interface.py,sha256=U_o0pak2FYkSXRBLYlSv_ytP1XPMOaiqdVBd9OBUqcM,5698
57
+ tequila/quantumchemistry/pyscf_interface.py,sha256=hOHtT8ONiNAc0MNNnztE2tVq1OHMxobUsniRYuZh9sQ,5995
58
58
  tequila/quantumchemistry/qc_base.py,sha256=oze8z7LyP0gvJcwMZzPjuEfa3neOfbzBF2m7O_ds6WA,92858
59
59
  tequila/simulators/__init__.py,sha256=VFw4sJIt4Zc0-__eYnksN8Ku9qMhbPpHJEkXMWUiD30,4
60
60
  tequila/simulators/simulator_api.py,sha256=mLYA6GzujaNAGrDq1rtLQrW8tFZsCeyYnOnWRTlU6Eo,24172
@@ -79,8 +79,8 @@ tequila/utils/keymap.py,sha256=RgQzeHEfRVee0-uoH-QsLYsGsXyMhEp3n33KCH-EV2k,3735
79
79
  tequila/utils/misc.py,sha256=e62ASkFReaLJQXnBXzyYukzXZnXNoURsM1luoMeIXiE,919
80
80
  tequila/wavefunction/__init__.py,sha256=q4DVL0lGFg03PogRMYA6S8MQqqmLYQiU9VNOF-YQxfQ,50
81
81
  tequila/wavefunction/qubit_wavefunction.py,sha256=16Y9vRj6Yc6sBAKRUHVXJG4lJLDjWyN1b5fugf2LAmI,11881
82
- tequila_basic-1.9.0.dist-info/LICENSE,sha256=oG1FtUav5_xrym9ByiG5emJDQRcbnAfTB08fRV9TCiE,1114
83
- tequila_basic-1.9.0.dist-info/METADATA,sha256=DIu64Ji54-ZhDsUFIeVn-fJrRmdWaEhMPfETKD39qqw,19293
84
- tequila_basic-1.9.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
85
- tequila_basic-1.9.0.dist-info/top_level.txt,sha256=VBH0gl6mDMbcLHKlO0yEAqtcq08DqBHz4gRJ9jafl5w,8
86
- tequila_basic-1.9.0.dist-info/RECORD,,
82
+ tequila_basic-1.9.1.dist-info/LICENSE,sha256=oG1FtUav5_xrym9ByiG5emJDQRcbnAfTB08fRV9TCiE,1114
83
+ tequila_basic-1.9.1.dist-info/METADATA,sha256=T_Um6-6ZQ9139PZ718W89V3XSY4tMdDv3mqaw--X730,19293
84
+ tequila_basic-1.9.1.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
85
+ tequila_basic-1.9.1.dist-info/top_level.txt,sha256=VBH0gl6mDMbcLHKlO0yEAqtcq08DqBHz4gRJ9jafl5w,8
86
+ tequila_basic-1.9.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.2)
2
+ Generator: bdist_wheel (0.41.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5