Skip to content

Commit ad9ffb4

Browse files
add scipy interface alias
1 parent fbb69de commit ad9ffb4

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/source/faq.rst

+8
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,11 @@ Please refer to the following demos:
119119
# 1
120120
print(c.state()) # collapsed but unnormalized
121121
# [0. +0.j 0. +0.j 0.49999998+0.j 0.49999998+0.j]
122+
123+
124+
How to arange the circuit gate placement in visualization from ``c.tex()``?
125+
----------------------------------------------------------------------------------------------------
126+
127+
Try ``lcompress=True`` or ``rcompress=True`` option in :py:meth:`tensorcircuit.circuit.Circuit.tex` API to make the circuit align from left or from right.
128+
129+
Or try ``c.unitary(0, unitary=tc.backend.eye(2), name="invisible")`` to add placeholder on the circuit which is invisible for circuit visualization.

tensorcircuit/interfaces.py

+3
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,6 @@ def scipy_v(*args: Any, **kws: Any) -> Tensor:
254254
return scipy_vs
255255

256256
return scipy_v
257+
258+
259+
scipy_interface = scipy_optimize_interface

0 commit comments

Comments
 (0)