{"id":483187,"date":"2026-06-10T13:27:23","date_gmt":"2026-06-10T13:27:23","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=483187"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=483187","title":{"rendered":"jBPM as Quantum Orchestration Platform"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>Author: Sergey Lukyanchikov, <a href=\"https:\/\/github.com\/C-NLTX\/Open-Source\" rel=\"noopener noreferrer nofollow\">C-NLTX\/Open-Source<\/a><\/p>\n<p><strong>Disclaimer:<\/strong> The views expressed in this document reflect the author&#8217;s subjective perspective on the current and potential capabilities of jBPM.<\/p>\n<p><strong>TL;DR:<\/strong> Zero &#171;quantum supremacy&#187;. Zero &#171;agentic orchestration&#187;. Zero other hype. Just an approach to achieving an efficient quantum-assisted automation using 100% free open-source components (except for Azure).<\/p>\n<p>In my <a href=\"https:\/\/www.linkedin.com\/pulse\/jbpm-ai-orchestration-platform-sergey-lukyanchikov-o4oie\" rel=\"noopener noreferrer nofollow\">previous article<\/a>, I discussed the rationale for adopting jBPM as an AI orchestration platform. This article extends that discussion by examining jBPM\u2019s ability to automate quantum computations and to incorporate their results into business processes and related analytical workflows:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ede\/beb\/afc\/edebebafc34ad70f8b4e05cf87e7a977.png\" alt=\"Article content\" title=\"Figure 1 Cannibalization Analysis solution running on jBPM and accessed by SuiteCRM users\" width=\"3840\" height=\"2160\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ede\/beb\/afc\/edebebafc34ad70f8b4e05cf87e7a977.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ede\/beb\/afc\/edebebafc34ad70f8b4e05cf87e7a977.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 1 Cannibalization Analysis solution running on jBPM and accessed by SuiteCRM users<\/figcaption><\/div>\n<\/figure>\n<p><strong>A Use Case for Quantum<\/strong><\/p>\n<p>Correlation analysis is one of the fundamental analytical tools used in virtually every business domain. Correlations in sales volumes, often referred to as cannibalization when the focus is on negative correlations among products or promotions, are valuable not only as analytical results in their own right but also as inputs to a wide range of subsequent analytical and decision-making methods.<\/p>\n<p>A common challenge in applying correlation analysis is the lack of sufficiently complete observational data. Reliable correlation estimates typically require observations with few or no missing values across multiple products and time periods. When the analytical focus shifts from products to promotions, data scarcity often becomes even more pronounced. This is because promotional events are represented far more sparsely in sales datasets, further reducing the number of usable observations available for analysis.<\/p>\n<p>To mitigate the bias that may arise from computing correlation coefficients on a fully \u201csanitized\u201d sales and promotion history, that is, a dataset from which periods with missing observations have been excluded, we apply two complementary techniques:<\/p>\n<p>\u00b7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Introducing an externally generated perturbation (i.e., random values independent of the historical data), which is combined with the sales-based results to reduce dependence on the observed history; and<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/82f\/4a0\/f48\/82f4a0f4880b17f9641856f6ca54d908.png\" alt=\"Article content\" title=\"Figure 2 An externally generated correlation matrix used to introduce perturbations into sales-based correlations\" width=\"1447\" height=\"461\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/82f\/4a0\/f48\/82f4a0f4880b17f9641856f6ca54d908.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/82f\/4a0\/f48\/82f4a0f4880b17f9641856f6ca54d908.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 2 An externally generated correlation matrix used to introduce perturbations into sales-based correlations<\/figcaption><\/div>\n<\/figure>\n<p>\u00b7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Averaging (iteratively) the sales-based correlation matrix with the perturbation matrix<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/066\/2c9\/863\/0662c9863a69ab9a587a6a280bf37adf.png\" alt=\"Article content\" title=\"Figure 3 A sales-based correlation matrix (big one) iteratively averaged seven times with a quantum-generated perturbation matrix\" width=\"2232\" height=\"902\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/066\/2c9\/863\/0662c9863a69ab9a587a6a280bf37adf.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/066\/2c9\/863\/0662c9863a69ab9a587a6a280bf37adf.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 3 A sales-based correlation matrix (big one) iteratively averaged seven times with a quantum-generated perturbation matrix<\/figcaption><\/div>\n<\/figure>\n<p>Why is it important that the perturbation be generated externally? In this way, we ensure that it does not follow the same distributions already present in the historical data, making it a genuinely independent perturbation. However, we would like to go even further: we want our perturbation to be not only independent but also genuinely random, i.e., generated using true random numbers rather than pseudorandom numbers produced from a deterministic sequence of values. To achieve this level of randomness, we will use quantum computing.<\/p>\n<p><strong>How Quantum Generates Genuine Randomness<\/strong><\/p>\n<p>We use a very straightforward approach: the qubits in the input register are prepared such that, after applying a Hadamard gate to each qubit and measuring, they produce a statevector whose length is sufficient to enumerate <em>n(n-1)\/2<\/em> cells in the upper triangular part (excluding the diagonal) of an <em>n x n<\/em> correlation matrix. A register of <em>m<\/em> qubits has a statevector of length <em>2\u1d50<\/em>. Since we apply a Hadamard gate to each qubit, <em>m<\/em> must be a positive integer, i.e., <em>m\u22651<\/em>:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/670\/333\/49d\/67033349d2b8e340ec42d2c634700108.png\" alt=\"Article content\" title=\"Figure 4 A quantum circuit with three input qubits, resulting in a statevector of length 2\u00b3 = 8\" width=\"510\" height=\"270\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/670\/333\/49d\/67033349d2b8e340ec42d2c634700108.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/670\/333\/49d\/67033349d2b8e340ec42d2c634700108.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 4 A quantum circuit with three input qubits, resulting in a statevector of length 2\u00b3 = 8<\/figcaption><\/div>\n<\/figure>\n<p>Therefore, the condition is <em>2\u1d50 \u2265 n(n-1)\/2<\/em>, <em>m\u22651<\/em>. The minimum number of qubits is thus given by: <em>m = max(1, \u2308 log\u2082(n(n-1)\/2))\u2309).<\/em> For <em>n=2<\/em>, we have <em>n(n-1)\/2\u00a0= 1<\/em>, and <em>\u2308 log\u2082(1)\u2309\u00a0= 0<\/em>. However, since <em>m\u22651<\/em>, the minimum is <em>m=1<\/em>. Indeed, a single qubit after application of the Hadamard gate yields <em>H|0<\/em>\u27e9<em> = (<\/em>|<em>0<\/em>\u27e9<em>+<\/em>|<em>1<\/em>\u27e9<em>)\/\u221a2<\/em>, whose statevector has at least two amplitudes, thereby satisfying the requirement of at least one representable element. In the table below, the minimum number of qubits <em>m<\/em> has been computed for values of <em>n<\/em> ranging from 2 to 10:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/19d\/db5\/f08\/19ddb5f085093fd0f68cdc956f7cacfb.png\" alt=\"Article content\" title=\"Table 1 Minimum number of qubits required to enumerate n(n-1)\/2 elements of a correlation matrix (diagonal excluded)\" width=\"2232\" height=\"731\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/19d\/db5\/f08\/19ddb5f085093fd0f68cdc956f7cacfb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/19d\/db5\/f08\/19ddb5f085093fd0f68cdc956f7cacfb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Table 1 Minimum number of qubits required to enumerate n(n-1)\/2 elements of a correlation matrix (diagonal excluded)<\/figcaption><\/div>\n<\/figure>\n<p>We observe from the above that, as the size of the correlation matrix grows linearly, the number of required elements grows quadratically, whereas the minimum number of required qubits grows logarithmically.<\/p>\n<p>By repeatedly generating and measuring the circuit described above an appropriately large number of times, and symmetrically populating the matrix (with respect to the diagonal) using empirical averages of the corresponding entries of the measurement bitstrings, we obtain a stochastic model of a correlation matrix whose elements exhibit convergence toward their expected values and a well-defined central tendency.<\/p>\n<p><strong>A Practical Example: Cannibalization Analysis<\/strong><\/p>\n<p>Our Cannibalization Analysis solution is based on the following business scenario: <a href=\"https:\/\/mavenanalytics.io\/data-playground\/cafe-rewards-offers\" rel=\"noopener noreferrer nofollow\">customers of a network of cafes<\/a> participate in promotional offers (promotions) and receive rewards for their participation. Based on a given sales history, we aim to identify which promotions cannibalize each other (i.e., exhibit negative correlations in reward amounts). At the same time, we seek to attenuate the bias present in the historical data to enable the use of cannibalization analysis results in downstream modelling, such as sales price optimization. As discussed previously, this is achieved by \u201cmixing\u201d historical promotion correlations with externally generated noise \u2013 specifically, perturbation matrices computed using quantum methods.<\/p>\n<p>One of the most likely systems to consume cannibalization analysis is a CRM system; therefore, we initiate our workflow in <a href=\"https:\/\/suitecrm.com\/\" rel=\"noopener noreferrer nofollow\">SuiteCRM<\/a> (the open-source CRM software) by creating an analysis scenario record:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c21\/387\/19c\/c2138719ca74ccf0fdf0c94d10943809.png\" alt=\"Article content\" title=\"Figure 5 Creation of a cannibalization analysis scenario: defining the \u201ccannibals\u201d and setting the number of perturbation mixes\" width=\"2232\" height=\"1099\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c21\/387\/19c\/c2138719ca74ccf0fdf0c94d10943809.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c21\/387\/19c\/c2138719ca74ccf0fdf0c94d10943809.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 5 Creation of a cannibalization analysis scenario: defining the \u201ccannibals\u201d and setting the number of perturbation mixes<\/figcaption><\/div>\n<\/figure>\n<p>After saving, the analysis scenario record is added to the record history and becomes the source of input parameters for cannibalization analysis runs initiated by the user who created the scenario:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/969\/b86\/437\/969b864371d11c6ba7cd2075acb12e82.png\" alt=\"Article content\" title=\"Figure 6 An analysis scenario record added to the record history\" width=\"2232\" height=\"1098\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/969\/b86\/437\/969b864371d11c6ba7cd2075acb12e82.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/969\/b86\/437\/969b864371d11c6ba7cd2075acb12e82.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 6 An analysis scenario record added to the record history<\/figcaption><\/div>\n<\/figure>\n<p>To initiate an analysis run, a user creates a request in SuiteCRM that is sent to the jBPM server, which launches a business process implementing the cannibalization analysis logic and orchestrating quantum computations in Microsoft Azure:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/322\/a38\/072\/322a3807219f7ad47d8d92db576f034a.png\" alt=\"Article content\" title=\"Figure 7 A cannibalization analysis request created in SuiteCRM triggers computations orchestrated by jBPM\" width=\"2232\" height=\"1142\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/322\/a38\/072\/322a3807219f7ad47d8d92db576f034a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/322\/a38\/072\/322a3807219f7ad47d8d92db576f034a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 7 A cannibalization analysis request created in SuiteCRM triggers computations orchestrated by jBPM<\/figcaption><\/div>\n<\/figure>\n<p>The business process launched by jBPM sends a computation script, together with the scenario parameters received from SuiteCRM, to a Microsoft Azure quantum workspace, where a quantum computing job is initiated:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9da\/8ec\/014\/9da8ec014ad9cc99a68ae5343299cade.png\" alt=\"Article content\" title=\"Figure 8 A quantum computing job initiated by a jBPM business process in a Microsoft Azure quantum workspace\" width=\"1488\" height=\"833\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9da\/8ec\/014\/9da8ec014ad9cc99a68ae5343299cade.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9da\/8ec\/014\/9da8ec014ad9cc99a68ae5343299cade.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 8 A quantum computing job initiated by a jBPM business process in a Microsoft Azure quantum workspace<\/figcaption><\/div>\n<\/figure>\n<p>The output of the executed job is returned to jBPM, where it is injected into the business process, allowing execution to continue:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b17\/dcb\/c24\/b17dcbc24badaef9dc69a4130d713d01.png\" alt=\"Article content\" title=\"Figure 9 Results of the executed quantum computing job returned to the business process in jBPM\" width=\"1488\" height=\"836\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b17\/dcb\/c24\/b17dcbc24badaef9dc69a4130d713d01.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b17\/dcb\/c24\/b17dcbc24badaef9dc69a4130d713d01.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 9 Results of the executed quantum computing job returned to the business process in jBPM<\/figcaption><\/div>\n<\/figure>\n<p>The quantum artifacts received from Azure by jBPM are available as business process variable values in the jBPM logs:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9e7\/64c\/e40\/9e764ce4061ec6aec666efc66c95d543.png\" alt=\"Article content\" title=\"Figure 10 Azure artifacts in the jBPM server logs\" width=\"2232\" height=\"945\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/9e7\/64c\/e40\/9e764ce4061ec6aec666efc66c95d543.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9e7\/64c\/e40\/9e764ce4061ec6aec666efc66c95d543.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 10 Azure artifacts in the jBPM server logs<\/figcaption><\/div>\n<\/figure>\n<p>The jBPM business process returns the cannibalization analysis output \u2013 the correlation matrix \u2013 to SuiteCRM, where the user can view the results in the newly created analysis run record:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c22\/803\/9e9\/c228039e91e6406a49b31b9a1cc3caf4.png\" alt=\"Article content\" title=\"Figure 11 Cannibalization analysis output returned to SuiteCRM and recorded in a newly created analysis run record\" width=\"1488\" height=\"853\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c22\/803\/9e9\/c228039e91e6406a49b31b9a1cc3caf4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c22\/803\/9e9\/c228039e91e6406a49b31b9a1cc3caf4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 11 Cannibalization analysis output returned to SuiteCRM and recorded in a newly created analysis run record<\/figcaption><\/div>\n<\/figure>\n<p>We observe that one of the products (promotions) selected in the scenario record does not appear in the resulting correlation matrix. The reason is that one of the items is not present in the sales history.<\/p>\n<p>The resulting correlation matrix is stored in a PostgreSQL table:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"\" alt=\"Article content\" title=\"Figure 12 The resulting correlation matrix persisted in PostrgreSQL\"\/><\/p>\n<div><figcaption>Figure 12 The resulting correlation matrix persisted in PostrgreSQL<\/figcaption><\/div>\n<\/figure>\n<p>It is natural to conclude this practical example by demonstrating that the Cannibalization Analysis solution has successfully passed testing with three concurrent users:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60e\/e13\/71c\/60ee1371c7e17d0333a9603b7a62dde1.png\" alt=\"Article content\" title=\"Figure 13 Three testers concurrently working on the Cannibalization Analysis solution\" width=\"1281\" height=\"720\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/60e\/e13\/71c\/60ee1371c7e17d0333a9603b7a62dde1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/60e\/e13\/71c\/60ee1371c7e17d0333a9603b7a62dde1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 13 Three testers concurrently working on the Cannibalization Analysis solution<\/figcaption><\/div>\n<\/figure>\n<p><strong>What Makes jBPM a Quantum Orchestration Platform?<\/strong><\/p>\n<p>Having reviewed the text thus far, it is logical to ask whether jBPM\u2019s quantum orchestration capabilities generalize beyond the above practical example to a broader range of use cases and quantum computing providers. Below, we provide a set of illustrative examples, allowing the reader to draw their own conclusions.<\/p>\n<p>In certain cases, we may first perform quantum circuit automation locally, i.e., using a quantum simulation environment installed directly on a local machine or on one of the machines within a local network:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8cf\/322\/1d2\/8cf3221d23636e4b3fdc33f74d286bdc.png\" alt=\"Article content\" title=\"Figure 14 A jBPM business process implementing orchestration of a local quantum circuit\" width=\"1280\" height=\"676\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8cf\/322\/1d2\/8cf3221d23636e4b3fdc33f74d286bdc.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8cf\/322\/1d2\/8cf3221d23636e4b3fdc33f74d286bdc.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 14 A jBPM business process implementing orchestration of a local quantum circuit<\/figcaption><\/div>\n<\/figure>\n<p>Our quantum circuit execution can be orchestrated inside a quantum computing provider of our choice, assuming that the provider exposes an API sufficient to submit execution code and retrieve the corresponding results:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f63\/5a4\/33c\/f635a433c1b9c19724d84745de04d223.png\" alt=\"Article content\" title=\"Figure 15 SuiteCRM initiates a jBPM business process that orchestrates quantum computations inside the IBM Quantum Platform\" width=\"1282\" height=\"709\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/f63\/5a4\/33c\/f635a433c1b9c19724d84745de04d223.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f63\/5a4\/33c\/f635a433c1b9c19724d84745de04d223.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>Figure 15 SuiteCRM initiates a jBPM business process that orchestrates quantum computations inside the IBM Quantum Platform<\/figcaption><\/div>\n<\/figure>\n<p>The above arguments support our proposed positioning of jBPM as a quantum orchestration platform, in combination with the arguments presented in my <a href=\"https:\/\/www.linkedin.com\/pulse\/jbpm-ai-orchestration-platform-sergey-lukyanchikov-o4oie\" rel=\"noopener noreferrer nofollow\">previous article<\/a>.<\/p>\n<p>For more: <a href=\"https:\/\/github.com\/C-NLTX\/Open-Source\" rel=\"noopener noreferrer nofollow\">C-NLTX\/Open-Source<\/a><\/p>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1046073\/\">https:\/\/habr.com\/ru\/articles\/1046073\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Author: Sergey Lukyanchikov, C-NLTX\/Open-SourceDisclaimer: The views expressed in this document reflect the author&#8217;s subjective perspective on the current and potential capabilities of jBPM.TL;DR: Zero &#171;quantum supremacy&#187;. Zero &#171;agentic orchestration&#187;. Zero other hype. Just an approach to achieving an efficient quantum-assisted automation using 100% free open-source components (except for Azure).In my previous article, I discussed the rationale for adopting jBPM as an AI orchestration platform. This article extends that discussion by examining jBPM\u2019s ability to automate quantum computations and to incorporate their results into business processes and related analytical workflows:Figure 1 Cannibalization Analysis solution running on jBPM and accessed by SuiteCRM usersA Use Case for QuantumCorrelation analysis is one of the fundamental analytical tools used in virtually every business domain. Correlations in sales volumes, often referred to as cannibalization when the focus is on negative correlations among products or promotions, are valuable not only as analytical results in their own right but also as inputs to a wide range of subsequent analytical and decision-making methods.A common challenge in applying correlation analysis is the lack of sufficiently complete observational data. Reliable correlation estimates typically require observations with few or no missing values across multiple products and time periods. When the analytical focus shifts from products to promotions, data scarcity often becomes even more pronounced. This is because promotional events are represented far more sparsely in sales datasets, further reducing the number of usable observations available for analysis.To mitigate the bias that may arise from computing correlation coefficients on a fully \u201csanitized\u201d sales and promotion history, that is, a dataset from which periods with missing observations have been excluded, we apply two complementary techniques:\u00b7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Introducing an externally generated perturbation (i.e., random values independent of the historical data), which is combined with the sales-based results to reduce dependence on the observed history; andFigure 2 An externally generated correlation matrix used to introduce perturbations into sales-based correlations\u00b7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Averaging (iteratively) the sales-based correlation matrix with the perturbation matrixFigure 3 A sales-based correlation matrix (big one) iteratively averaged seven times with a quantum-generated perturbation matrixWhy is it important that the perturbation be generated externally? In this way, we ensure that it does not follow the same distributions already present in the historical data, making it a genuinely independent perturbation. However, we would like to go even further: we want our perturbation to be not only independent but also genuinely random, i.e., generated using true random numbers rather than pseudorandom numbers produced from a deterministic sequence of values. To achieve this level of randomness, we will use quantum computing.How Quantum Generates Genuine RandomnessWe use a very straightforward approach: the qubits in the input register are prepared such that, after applying a Hadamard gate to each qubit and measuring, they produce a statevector whose length is sufficient to enumerate n(n-1)\/2 cells in the upper triangular part (excluding the diagonal) of an n x n correlation matrix. A register of m qubits has a statevector of length 2\u1d50. Since we apply a Hadamard gate to each qubit, m must be a positive integer, i.e., m\u22651:Figure 4 A quantum circuit with three input qubits, resulting in a statevector of length 2\u00b3 = 8Therefore, the condition is 2\u1d50 \u2265 n(n-1)\/2, m\u22651. The minimum number of qubits is thus given by: m = max(1, \u2308 log\u2082(n(n-1)\/2))\u2309). For n=2, we have n(n-1)\/2\u00a0= 1, and \u2308 log\u2082(1)\u2309\u00a0= 0. However, since m\u22651, the minimum is m=1. Indeed, a single qubit after application of the Hadamard gate yields H|0\u27e9 = (|0\u27e9+|1\u27e9)\/\u221a2, whose statevector has at least two amplitudes, thereby satisfying the requirement of at least one representable element. In the table below, the minimum number of qubits m has been computed for values of n ranging from 2 to 10:Table 1 Minimum number of qubits required to enumerate n(n-1)\/2 elements of a correlation matrix (diagonal excluded)We observe from the above that, as the size of the correlation matrix grows linearly, the number of required elements grows quadratically, whereas the minimum number of required qubits grows logarithmically.By repeatedly generating and measuring the circuit described above an appropriately large number of times, and symmetrically populating the matrix (with respect to the diagonal) using empirical averages of the corresponding entries of the measurement bitstrings, we obtain a stochastic model of a correlation matrix whose elements exhibit convergence toward their expected values and a well-defined central tendency.A Practical Example: Cannibalization AnalysisOur Cannibalization Analysis solution is based on the following business scenario: customers of a network of cafes participate in promotional offers (promotions) and receive rewards for their participation. Based on a given sales history, we aim to identify which promotions cannibalize each other (i.e., exhibit negative correlations in reward amounts). At the same time, we seek to attenuate the bias present in the historical data to enable the use of cannibalization analysis results in downstream modelling, such as sales price optimization. As discussed previously, this is achieved by \u201cmixing\u201d historical promotion correlations with externally generated noise \u2013 specifically, perturbation matrices computed using quantum methods.One of the most likely systems to consume cannibalization analysis is a CRM system; therefore, we initiate our workflow in SuiteCRM (the open-source CRM software) by creating an analysis scenario record:Figure 5 Creation of a cannibalization analysis scenario: defining the \u201ccannibals\u201d and setting the number of perturbation mixesAfter saving, the analysis scenario record is added to the record history and becomes the source of input parameters for cannibalization analysis runs initiated by the user who created the scenario:Figure 6 An analysis scenario record added to the record historyTo initiate an analysis run, a user creates a request in SuiteCRM that is sent to the jBPM server, which launches a business process implementing the cannibalization analysis logic and orchestrating quantum computations in Microsoft Azure:Figure 7 A cannibalization analysis request created in SuiteCRM triggers computations orchestrated by jBPMThe business process launched by jBPM sends a computation script, together with the scenario parameters received from SuiteCRM, to a Microsoft Azure quantum workspace, where a quantum computing job is initiated:Figure 8 A quantum computing job initiated by a jBPM business process in a Microsoft Azure quantum workspaceThe output of the executed job is returned to jBPM, where it is injected into the business process, allowing execution to continue:Figure 9 Results of the executed quantum computing job returned to the business process in jBPMThe quantum artifacts received from Azure by jBPM are available as business process variable values in the jBPM logs:Figure 10 Azure artifacts in the jBPM server logsThe jBPM business process returns the cannibalization analysis output \u2013 the correlation matrix \u2013 to SuiteCRM, where the user can view the results in the newly created analysis run record:Figure 11 Cannibalization analysis output returned to SuiteCRM and recorded in a newly created analysis run recordWe observe that one of the products (promotions) selected in the scenario record does not appear in the resulting correlation matrix. The reason is that one of the items is not present in the sales history.The resulting correlation matrix is stored in a PostgreSQL table:Figure 12 The resulting correlation matrix persisted in PostrgreSQLIt is natural to conclude this practical example by demonstrating that the Cannibalization Analysis solution has successfully passed testing with three concurrent users:Figure 13 Three testers concurrently working on the Cannibalization Analysis solutionWhat Makes jBPM a Quantum Orchestration Platform?Having reviewed the text thus far, it is logical to ask whether jBPM\u2019s quantum orchestration capabilities generalize beyond the above practical example to a broader range of use cases and quantum computing providers. Below, we provide a set of illustrative examples, allowing the reader to draw their own conclusions.In certain cases, we may first perform quantum circuit automation locally, i.e., using a quantum simulation environment installed directly on a local machine or on one of the machines within a local network:Figure 14 A jBPM business process implementing orchestration of a local quantum circuitOur quantum circuit execution can be orchestrated inside a quantum computing provider of our choice, assuming that the provider exposes an API sufficient to submit execution code and retrieve the corresponding results:Figure 15 SuiteCRM initiates a jBPM business process that orchestrates quantum computations inside the IBM Quantum PlatformThe above arguments support our proposed positioning of jBPM as a quantum orchestration platform, in combination with the arguments presented in my previous article.For more: C-NLTX\/Open-Source\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 https:\/\/habr.com\/ru\/articles\/1046073\/<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-483187","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/483187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=483187"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/483187\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=483187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=483187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=483187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}