Skip to content

Commit

Permalink
use random ucj utility
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed May 29, 2024
1 parent ecfe0e0 commit 927a80e
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions tests/python/qiskit/ucj_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,8 @@ def test_random_ucj_operator(norb: int, nelec: tuple[int, int]):
n_reps = 3
dim = ffsim.dim(norb, nelec)
for _ in range(3):
ucj_op = ffsim.UCJOperator(
diag_coulomb_mats_alpha_alpha=np.stack(
[
ffsim.random.random_real_symmetric_matrix(norb, seed=rng)
for _ in range(n_reps)
]
),
diag_coulomb_mats_alpha_beta=np.stack(
[
ffsim.random.random_real_symmetric_matrix(norb, seed=rng)
for _ in range(n_reps)
]
),
orbital_rotations=np.stack(
[ffsim.random.random_unitary(norb, seed=rng) for _ in range(n_reps)]
),
final_orbital_rotation=ffsim.random.random_unitary(norb, seed=rng),
ucj_op = ffsim.random.random_ucj_operator(
norb, n_reps=n_reps, with_final_orbital_rotation=True, seed=rng
)
gate = ffsim.qiskit.UCJOperatorJW(ucj_op)

Expand Down

0 comments on commit 927a80e

Please sign in to comment.