Skip to content

Commit 3eab8ba

Browse files
fix quafu
1 parent d18ba2c commit 3eab8ba

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Unreleased
44

5+
### Changed
6+
7+
- Downgrading some logger warning to info
8+
9+
### Fixed
10+
11+
- Fix quafu provider
12+
513
## 1.0.1
614

715
### Fixed

tensorcircuit/backends/numpy_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ def jit(
392392
jit_compile: Optional[bool] = None,
393393
**kws: Any
394394
) -> Callable[..., Any]:
395-
logger.warning("numpy backend has no jit interface, just do nothing")
395+
logger.info("numpy backend has no jit interface, just do nothing")
396396
return f
397397
# raise NotImplementedError("numpy backend doesn't support jit compiling")
398398

tensorcircuit/cloud/apis.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@
1818
try:
1919
from . import tencent # type: ignore
2020
except (ImportError, ModuleNotFoundError):
21-
logger.warning("fail to load cloud provider module: tencent")
21+
logger.info("fail to load cloud provider module: tencent")
2222

2323
try:
2424
from . import local
2525
except (ImportError, ModuleNotFoundError):
26-
logger.warning("fail to load cloud provider module: local")
26+
logger.info("fail to load cloud provider module: local")
2727

2828
try:
2929
from . import quafu_provider
3030
except (ImportError, ModuleNotFoundError):
31-
pass
32-
# logger.warning("fail to load cloud provider module: quafu")
31+
logger.info("fail to load cloud provider module: quafu")
3332

3433
package_name = "tensorcircuit"
3534
thismodule = sys.modules[__name__]

tensorcircuit/cloud/quafu_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def c2qasm(c: Any) -> str:
4848
source = c2qasm(circuit)
4949
else:
5050
source = [c2qasm(c) for c in circuit] # type: ignore
51-
user = User()
52-
user.save_apitoken(token)
51+
user = User(token)
52+
user.save_apitoken()
5353

5454
def c2task(source: str) -> Task:
5555
nq = int(source.split("\n")[2].split("[")[1].split("]")[0]) # type: ignore

tensorcircuit/translation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from qiskit.circuit.parametervector import ParameterVectorElement
2323
from qiskit.circuit.quantumcircuitdata import CircuitInstruction
2424
except ImportError:
25-
logger.warning(
25+
logger.info(
2626
"Please first ``pip install -U qiskit`` to enable related functionality in translation module"
2727
)
2828
CircuitInstruction = Any

0 commit comments

Comments
 (0)