git: bd91788f3b9f - main - science/tweedledum: New port: Library for analysis, compilation, synthesis of quantum circuits

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Mon, 08 Aug 2022 03:53:00 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=bd91788f3b9f5af0a5bb0b9f134b199b1c7c3002

commit bd91788f3b9f5af0a5bb0b9f134b199b1c7c3002
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-08-08 03:35:25 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-08-08 03:35:25 +0000

    science/tweedledum: New port: Library for analysis, compilation, synthesis of quantum circuits
---
 science/Makefile             |   1 +
 science/tweedledum/Makefile  |  27 ++++++++++
 science/tweedledum/distinfo  |   3 ++
 science/tweedledum/pkg-descr |   6 +++
 science/tweedledum/pkg-plist | 119 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 156 insertions(+)

diff --git a/science/Makefile b/science/Makefile
index 8cf5f3a1088d..5442d319d9fa 100644
--- a/science/Makefile
+++ b/science/Makefile
@@ -411,6 +411,7 @@
     SUBDIR += thermofun
     SUBDIR += tinker
     SUBDIR += trilinos
+    SUBDIR += tweedledum
     SUBDIR += udunits
     SUBDIR += ukrmol+
     SUBDIR += v_sim
diff --git a/science/tweedledum/Makefile b/science/tweedledum/Makefile
new file mode 100644
index 000000000000..ce6bfa4b34fa
--- /dev/null
+++ b/science/tweedledum/Makefile
@@ -0,0 +1,27 @@
+PORTNAME=	tweedledum
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.1.1
+CATEGORIES=	science python # quantum-computing
+
+MAINTAINER=	yuri@FreeBSD.org
+COMMENT=	Library for analysis, compilation, synthesis of quantum circuits
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		cmake:testing compiler:c++17-lang
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	boschmitt
+
+CMAKE_OFF=	TWEEDLEDUM_PYBINDS # doesn't affect the build result, see https://github.com/boschmitt/tweedledum/issues/175
+CMAKE_ON=	BUILD_SHARED_LIBS
+CMAKE_TESTING_ON=	TWEEDLEDUM_TESTS
+CMAKE_TESTING_TARGET=	${ALL_TARGET} # hack to disable the target
+
+TEST_WRKSRC=	${BUILD_WRKSRC}/tests
+
+post-test: # run tests, all tests pass with 3313 assertions in 73 test cases, see https://github.com/boschmitt/tweedledum/issues/177
+	@cd ${TEST_WRKSRC} && ./run_tests
+
+.include <bsd.port.mk>
diff --git a/science/tweedledum/distinfo b/science/tweedledum/distinfo
new file mode 100644
index 000000000000..9695e73327fe
--- /dev/null
+++ b/science/tweedledum/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1659924254
+SHA256 (boschmitt-tweedledum-v1.1.1_GH0.tar.gz) = ba1c79808dfae1cf65a06eb6c5aeee4daf9e826386c582b5fea0c5c634f4d15b
+SIZE (boschmitt-tweedledum-v1.1.1_GH0.tar.gz) = 5105832
diff --git a/science/tweedledum/pkg-descr b/science/tweedledum/pkg-descr
new file mode 100644
index 000000000000..9a92e5f057f8
--- /dev/null
+++ b/science/tweedledum/pkg-descr
@@ -0,0 +1,6 @@
+tweedledum is a library for synthesis, compilation, and optimization of quantum
+circuits. The library is written to be scalable up to problem sizes in which
+quantum circuits outperform classical ones. Also, it is meant to be used both
+independently and alongside established tools.
+
+WWW: https://github.com/boschmitt/tweedledum
diff --git a/science/tweedledum/pkg-plist b/science/tweedledum/pkg-plist
new file mode 100644
index 000000000000..c6e892f0c8f0
--- /dev/null
+++ b/science/tweedledum/pkg-plist
@@ -0,0 +1,119 @@
+include/tweedledum/Decomposition/BarencoDecomposer.h
+include/tweedledum/Decomposition/BridgeDecomposer.h
+include/tweedledum/Decomposition/OneQubitDecomposer.h
+include/tweedledum/Decomposition/ParityDecomposer.h
+include/tweedledum/Generators/adder.h
+include/tweedledum/Generators/less_than.h
+include/tweedledum/IR/Cbit.h
+include/tweedledum/IR/Circuit.h
+include/tweedledum/IR/Instruction.h
+include/tweedledum/IR/Operator.h
+include/tweedledum/IR/OperatorTraits.h
+include/tweedledum/IR/Qubit.h
+include/tweedledum/IR/WireStorage.h
+include/tweedledum/Operators/All.h
+include/tweedledum/Operators/Extension.h
+include/tweedledum/Operators/Extension/Bridge.h
+include/tweedledum/Operators/Extension/Clifford.h
+include/tweedledum/Operators/Extension/LogicNetwork.h
+include/tweedledum/Operators/Extension/Parity.h
+include/tweedledum/Operators/Extension/Permutation.h
+include/tweedledum/Operators/Extension/TruthTable.h
+include/tweedledum/Operators/Extension/Unitary.h
+include/tweedledum/Operators/Ising.h
+include/tweedledum/Operators/Ising/Rxx.h
+include/tweedledum/Operators/Ising/Ryy.h
+include/tweedledum/Operators/Ising/Rzz.h
+include/tweedledum/Operators/Meta.h
+include/tweedledum/Operators/Meta/Barrier.h
+include/tweedledum/Operators/Reversible.h
+include/tweedledum/Operators/Standard.h
+include/tweedledum/Operators/Standard/H.h
+include/tweedledum/Operators/Standard/Measure.h
+include/tweedledum/Operators/Standard/P.h
+include/tweedledum/Operators/Standard/Rx.h
+include/tweedledum/Operators/Standard/Ry.h
+include/tweedledum/Operators/Standard/Rz.h
+include/tweedledum/Operators/Standard/S.h
+include/tweedledum/Operators/Standard/Swap.h
+include/tweedledum/Operators/Standard/Sx.h
+include/tweedledum/Operators/Standard/T.h
+include/tweedledum/Operators/Standard/U.h
+include/tweedledum/Operators/Standard/X.h
+include/tweedledum/Operators/Standard/Y.h
+include/tweedledum/Operators/Standard/Z.h
+include/tweedledum/Operators/Utils.h
+include/tweedledum/Parser/qasm.h
+include/tweedledum/Parser/tfc.h
+include/tweedledum/Passes/Analysis.h
+include/tweedledum/Passes/Analysis/compute_alap_layers.h
+include/tweedledum/Passes/Analysis/compute_asap_layers.h
+include/tweedledum/Passes/Analysis/compute_critical_paths.h
+include/tweedledum/Passes/Analysis/compute_cuts.h
+include/tweedledum/Passes/Analysis/compute_depth.h
+include/tweedledum/Passes/Analysis/count_operators.h
+include/tweedledum/Passes/Decomposition.h
+include/tweedledum/Passes/Decomposition/barenco_decomp.h
+include/tweedledum/Passes/Decomposition/bridge_decomp.h
+include/tweedledum/Passes/Decomposition/one_qubit_decomp.h
+include/tweedledum/Passes/Decomposition/parity_decomp.h
+include/tweedledum/Passes/Mapping.h
+include/tweedledum/Passes/Mapping/Placer/ApprxSatPlacer.h
+include/tweedledum/Passes/Mapping/Placer/LinePlacer.h
+include/tweedledum/Passes/Mapping/Placer/RandomPlacer.h
+include/tweedledum/Passes/Mapping/Placer/SatPlacer.h
+include/tweedledum/Passes/Mapping/Placer/TrivialPlacer.h
+include/tweedledum/Passes/Mapping/RePlacer/JitRePlacer.h
+include/tweedledum/Passes/Mapping/RePlacer/SabreRePlacer.h
+include/tweedledum/Passes/Mapping/Router/BridgeRouter.h
+include/tweedledum/Passes/Mapping/Router/JitRouter.h
+include/tweedledum/Passes/Mapping/Router/SabreRouter.h
+include/tweedledum/Passes/Mapping/bridge_map.h
+include/tweedledum/Passes/Mapping/jit_map.h
+include/tweedledum/Passes/Mapping/sabre_map.h
+include/tweedledum/Passes/Mapping/sat_map.h
+include/tweedledum/Passes/Optimization.h
+include/tweedledum/Passes/Optimization/gate_cancellation.h
+include/tweedledum/Passes/Optimization/linear_resynth.h
+include/tweedledum/Passes/Optimization/phase_folding.h
+include/tweedledum/Passes/Optimization/steiner_resynth.h
+include/tweedledum/Passes/Simulation/simulate_classically.h
+include/tweedledum/Passes/Utility.h
+include/tweedledum/Passes/Utility/inverse.h
+include/tweedledum/Passes/Utility/reverse.h
+include/tweedledum/Passes/Utility/shallow_duplicate.h
+include/tweedledum/Synthesis/Synthesis.h
+include/tweedledum/Synthesis/a_star_swap_synth.h
+include/tweedledum/Synthesis/all_linear_synth.h
+include/tweedledum/Synthesis/cx_dihedral_synth.h
+include/tweedledum/Synthesis/decomp_synth.h
+include/tweedledum/Synthesis/diagonal_synth.h
+include/tweedledum/Synthesis/gray_synth.h
+include/tweedledum/Synthesis/lhrs_synth.h
+include/tweedledum/Synthesis/linear_synth.h
+include/tweedledum/Synthesis/pkrm_synth.h
+include/tweedledum/Synthesis/pprm_synth.h
+include/tweedledum/Synthesis/sat_swap_synth.h
+include/tweedledum/Synthesis/spectrum_synth.h
+include/tweedledum/Synthesis/steiner_gauss_synth.h
+include/tweedledum/Synthesis/transform_synth.h
+include/tweedledum/Synthesis/xag_synth.h
+include/tweedledum/Target/Device.h
+include/tweedledum/Target/Mapping.h
+include/tweedledum/Target/Placement.h
+include/tweedledum/Utils/Allocators.h
+include/tweedledum/Utils/Classical/xag_optimize.h
+include/tweedledum/Utils/Classical/xag_simulate.h
+include/tweedledum/Utils/Classical/xag_stats.h
+include/tweedledum/Utils/Cut.h
+include/tweedledum/Utils/DynamicBitset.h
+include/tweedledum/Utils/Hash.h
+include/tweedledum/Utils/Intrinsics.h
+include/tweedledum/Utils/LinPhasePoly.h
+include/tweedledum/Utils/Matrix.h
+include/tweedledum/Utils/Numbers.h
+include/tweedledum/Utils/SmallVector.h
+include/tweedledum/Utils/Source.h
+include/tweedledum/Utils/SourceManager.h
+include/tweedledum/Utils/Visualization/string_utf8.h
+lib/libtweedledum.so