Skip to content

Commit

Permalink
update for v1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Dec 8, 2023
1 parent 66b3f1d commit 3bf27c3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
15 changes: 14 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Release notes for `quimb`.

(whats-new-1-7-0)=
## v1.7.0 (unreleased)
## v1.7.0 (12-08-2023)

**Breaking Changes**

Expand All @@ -24,6 +24,7 @@ Release notes for `quimb`.
* add [quimb.schematic.Drawing](quimb.schematic.Drawing) from experimental
submodule, add example docs at {ref}`schematic`. Add methods `text_between`,
`wedge`, `line_offset` and other tweaks for future use by main TN drawing.
- upgrade all contraction to use `cotengra` as the backend
- [`Circuit`](quimb.tensor.Circuit) : allow any gate to be controlled by any
number of qubits.
- [`Circuit`](quimb.tensor.Circuit) : support for parsing `openqasm2`
Expand All @@ -38,6 +39,18 @@ Release notes for `quimb`.
without casting as a [TensorNetwork1D](quimb.tensor.TensorNetwork1D).
- add [MatrixProductState.from_fill_fn](quimb.tensor.tensor_1d.MatrixProductState.from_fill_fn)
for constructing MPS from a function that fills the tensors.
- add [Tensor.idxmin](quimb.tensor.Tensor.idxmin) and
[Tensor.idxmax](quimb.tensor.Tensor.idxmax) for finding the index of the
minimum/maximum element.
- 2D and 3D classical partition function TN builders: allow output indices.
- [`quimb.experimental.belief_propagation`]([`quimb.experimental.belief_propagation`]):
add various 1-norm/2-norm dense/lazy BP algorithms.

**Bug fixes:**

- fixed bug where an output index could be removed by squeezing when
performing tensor network simplifications.


(whats-new-1-6-0)=
## v1.6.0 (2023-09-10)
Expand Down
4 changes: 3 additions & 1 deletion quimb/tensor/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def parse_openqasm2_str(contents):
# then combine this full gate definition, without newlines
gate_body = "".join(gate_lines)
# separate the signature and body
gate_sig, gate_body = re.match("(.*)\s*{(.*)}", gate_body).groups()
gate_sig, gate_body = re.match(
r"(.*)\s*{(.*)}", gate_body
).groups()

# parse the signature
match = rgxs["gate_sig"].match(gate_sig)
Expand Down
5 changes: 3 additions & 2 deletions quimb/tensor/tensor_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -4483,7 +4483,8 @@ def bond(self, coo1, coo2):
return b_ix

def bond_size(self, coo1, coo2):
"""Return the size of the bond between sites at ``coo1`` and ``coo2``.
"""Return the (combined) size of the bond(s) between sites at ``coo1``
and ``coo2``.
"""
b_ix = self.bond(coo1, coo2)
return self[coo1].ind_size(b_ix)
Expand Down Expand Up @@ -5055,7 +5056,7 @@ def from_fill_fn(
The number of columns.
bond_dim : int
The bond dimension.
physical : int, optional
phys_dim : int, optional
The physical indices dimension.
shape : str, optional
How to layout the indices of the tensors, the default is
Expand Down

0 comments on commit 3bf27c3

Please sign in to comment.