Coverage for /home/runner/work/tket/tket/pytket/pytket/__init__.py: 82%
15 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-14 11:30 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-03-14 11:30 +0000
1# Copyright Quantinuum
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
15"""Python Interface to tket"""
16import pytket.architecture # noqa: I001
17from pytket.circuit import (
18 Circuit,
19 OpType,
20)
21import pytket.mapping
22import pytket.placement
23import pytket.transform
24from pytket._version import __version__
25from pytket.config import PytketConfig, get_config_file_path
26from pytket.unit_id import (
27 Bit,
28 Qubit,
29)
31# Create pytket config file if it does not exist:
32pytket_config_file = get_config_file_path()
33if not pytket_config_file.exists(): 33 ↛ 34line 33 didn't jump to line 34 because the condition on line 33 was never true
34 config = PytketConfig.default()
35 config.write_file(pytket_config_file)
37__path__ = __import__("pkgutil").extend_path(__path__, __name__)
39"""Flag indicating 64-bit support.
41If True, classical transforms and predicates, and QASM registers, with up to 64
42bits are supported."""
43bit_width_64 = True