Skip to content

Commit e20ea97

Browse files
export the new methods
1 parent eed3703 commit e20ea97

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

qualtran/rotation_synthesis/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The examples assume the following lines have been executed.
1010

1111
```py3
1212
>>> import mpmath
13+
>>> import qualtran.rotation_synthesis as rs
1314
>>> from qualtran.rotation_synthesis import math_config as mc
1415
>>> from qualtran.rotation_synthesis.protocols import clifford_t_synthesis as cts
1516
>>> # 300 digits of precision is enough for eps as low as 10^-30.
@@ -40,7 +41,7 @@ SU2CliffordT(matrix=array([[ZW(coords=(1509861905169903736208, 11747542590833689
4041
ZW(coords=(1509861905169903736208, 960512924518388809952, -151491500481353346337, -1174754259083368969221))]],
4142
dtype=object), gates=())
4243

43-
>>> diagonal.to_matrix().to_sequence() # Print gate names
44+
>>> rs.to_sequence(diagonal.to_matrix()) # Print gate names
4445
('S', 'H', 'Tz', 'Tx', 'Ty', 'Tz', 'Tx', 'Tz', 'Tx', 'Tz', 'Ty', 'Tz', 'Ty', 'Tx', 'Tz', 'Tx', 'Ty', 'Tx', 'Ty', 'Tx', 'Tz', 'Ty', 'Tz', 'Ty', 'Tz', 'Ty', 'Tz', 'Ty', 'Tx', 'Tz', 'Ty', 'Tz', 'Ty', 'Tz', 'Tx', 'Tz', 'Ty', 'Tz', 'Ty', 'Tx', 'Ty', 'Tz', 'Tx', 'Tz', 'Ty', 'Tx', 'Ty', 'Tx', 'Tz', 'Tx', 'Ty', 'Tz', 'Ty', 'Tx', 'Ty', 'Tx', 'Ty', 'Tz', 'Tx', 'Tz', 'Ty', 'Tz', 'Ty', 'Tz', 'Tx', 'Ty', 'Tz', 'Tx', 'Tz', 'Ty', 'Tx', 'Ty', 'Tz', 'Tx', 'Ty', 'Tx', 'Ty', 'Tx', 'Ty', 'Tz', 'Ty', 'Tz')
4546
```
4647

qualtran/rotation_synthesis/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
from qualtran.rotation_synthesis.math_config import NumpyConfig, with_dps
16+
from qualtran.rotation_synthesis.matrix import to_cirq, to_quirk, to_sequence
1617
from qualtran.rotation_synthesis.protocols.clifford_t_synthesis import (
1718
diagonal_unitary_approx,
1819
fallback_protocol,

qualtran/rotation_synthesis/matrix/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
r"""A submodule for compiling $\mathbb{Z}[e^{i \pi/4}]$ matrices to Clifford+T as well as generating them."""
1616

17+
from qualtran.rotation_synthesis.matrix.clifford_t_repr import to_cirq, to_quirk, to_sequence
1718
from qualtran.rotation_synthesis.matrix.generation import (
1819
generate_cliffords,
1920
generate_rotations,

0 commit comments

Comments
 (0)