From aae7362ce9ce803385d209840fe7b05fec9d7641 Mon Sep 17 00:00:00 2001 From: "Stefan K. Seritan" Date: Thu, 19 Sep 2024 14:52:22 -0700 Subject: [PATCH] Update and fix tests. --- setup.py | 29 +++++++++++++++-------------- test/unit/objects/test_circuit.py | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 5a15341e3..fcc5cd2f7 100644 --- a/setup.py +++ b/setup.py @@ -46,6 +46,11 @@ 'report_pickling': ['pandas'], 'report_pdf_figures': ['matplotlib'], 'html_reports': ['jinja2', 'MarkupSafe'], + 'reports':[ + 'pygsti[report_pickling]', + 'pygsti[report_pdf_figures]', + 'pygsti[html_reports]' + ], 'notebooks': [ 'ipython', 'notebook', @@ -71,29 +76,25 @@ 'pytest', 'pytest-xdist', 'pytest-cov', + 'cython', # Don't call this pygsti[extensions] for testing_no_cython logic below + 'mpi4py', # Don't call this pygsti[multiprocessor] for no_mpi logic below 'nbval', - 'bson', - 'csaps', - 'cvxopt', - 'cvxpy', - 'cython', - 'matplotlib', - 'mpi4py', - 'msgpack', 'packaging', - 'pandas', 'psutil', 'zmq', - 'jinja2', 'seaborn', 'scipy', 'ply', 'qibo<=0.1.7', 'cirq-core', - 'notebook', - 'ipython', - 'jupyter_server', - 'torch' + 'pygsti[diamond_norm]', + 'pygsti[ibmq]', + 'pygsti[interpygate]', + 'pygsti[msgpack]', + 'pygsti[notebooks]', + 'pygsti[pytorch]', + 'pygsti[reports]', + 'pygsti[serialization]' ] } diff --git a/test/unit/objects/test_circuit.py b/test/unit/objects/test_circuit.py index 49b0daa4e..ba657af41 100644 --- a/test/unit/objects/test_circuit.py +++ b/test/unit/objects/test_circuit.py @@ -497,7 +497,7 @@ def test_convert_to_openqasm(self): ckt = circuit.Circuit([Label('Gxpi2',0), Label(()), Label([Label('Gh',0), Label('Gtdag',1)]), Label('Gcnot', (0,1))], line_labels=(0,1)) - converted_qasm = ckt.convert_to_openqasm() + converted_qasm = ckt.convert_to_openqasm(include_delay_on_idle=True) #this is really just doing a check if anything has changed. I.e. an integration test. expected_qasm = 'OPENQASM 2.0;\ninclude "qelib1.inc";\n\nopaque delay(t) q;\n\nqreg q[2];'\ +'\ncreg cr[2];\n\nu3(1.570796326794897, 4.71238898038469, 1.570796326794897) q[0];\ndelay(0) q[1];'\