Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloAndresCQ committed Apr 17, 2024
1 parent 4b31e2f commit 1b0d24e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_structured_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,15 +530,15 @@ def test_circ_approx_explicit_ttn(circuit: Circuit) -> None:
# Check for TTNxGate
cfg = Config(truncation_fidelity=0.99, leaf_size=3, float_precision=np.float32)
ttn_gate = simulate(libhandle, circuit, SimulationAlgorithm.TTNxGate, cfg)
assert np.isclose(ttn_gate.get_fidelity(), 0.769, atol=1e-3)
assert np.isclose(ttn_gate.get_fidelity(), 0.751, atol=1e-3)
assert ttn_gate.is_valid()
assert np.isclose(ttn_gate.vdot(ttn_gate), 1.0, atol=cfg._atol)

# Fixed virtual bond dimension
# Check for TTNxGate
cfg = Config(chi=120, leaf_size=3, float_precision=np.float32)
ttn_gate = simulate(libhandle, circuit, SimulationAlgorithm.TTNxGate, cfg)
assert np.isclose(ttn_gate.get_fidelity(), 0.857, atol=1e-3)
assert np.isclose(ttn_gate.get_fidelity(), 0.854, atol=1e-3)
assert ttn_gate.is_valid()
assert np.isclose(ttn_gate.vdot(ttn_gate), 1.0, atol=cfg._atol)

Expand Down

0 comments on commit 1b0d24e

Please sign in to comment.